refactor(logic): 과도한 수치 호환 보정을 제거한다

Core 수치 상태는 JavaScript와 PostgreSQL의 자연 정밀도를 유지한다. 정수 상태 경계와 절삭, 수입 배분 및 사망자 분할 순서는 보존한다.
This commit is contained in:
2026-08-24 19:17:06 +00:00
parent fc9fa0c9a6
commit 60dcf815ea
32 changed files with 148 additions and 522 deletions
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest';
import { LogCategory, LogFormat, LogScope, type City, type MapDefinition, type Nation } from '@sammo-ts/logic';
import { createIncomeHandler, resolveLegacyIncomeCityTrust } from '../src/turn/incomeHandler.js';
import { createIncomeHandler, resolveIncomeCityTrust } from '../src/turn/incomeHandler.js';
import { InMemoryTurnWorld } from '../src/turn/inMemoryWorld.js';
import { calculateNpcNationFinance } from '../src/turn/npcTaxHandler.js';
import {
@@ -146,8 +146,8 @@ const buildWorld = (
};
describe('core monthly event actions at the real month boundary', () => {
it('reads income trust through the PHP six-significant-digit FLOAT representation', () => {
expect(resolveLegacyIncomeCityTrust(98.12674)).toBe(98.1267);
it('uses the full-precision trust value for income', () => {
expect(resolveIncomeCityTrust(98.12674)).toBe(98.12674);
});
it('preserves notice format, NewYear month log, age/belong, and officer lock reset', async () => {