fix(game-engine): 밀린 턴을 월 경계별로 처리

실시간 게임 시계가 여러 달 앞선 경우 장수 턴을 현재 월 경계까지만 실행해 월 표시와 상태 전이 순서를 보존한다. 턴 데몬 전용 NODE_OPTIONS도 지원해 다른 런타임 프로세스와 heap 상한을 분리한다.
This commit is contained in:
2026-08-16 06:48:35 +00:00
parent d8c60bd80f
commit 34a6be0c44
5 changed files with 36 additions and 9 deletions
@@ -233,6 +233,23 @@ describe('buildProcessDefinitions', () => {
}
expect(definitions.frontend.env.VITE_APP_BASE_PATH).toBe('/che');
});
it('applies a dedicated Node heap option only to the turn daemon', () => {
const definitions = buildProcessDefinitions(buildProfile(), {
...processConfig,
baseEnv: {
NODE_OPTIONS: '--max-old-space-size=1536',
TURN_DAEMON_NODE_OPTIONS: '--max-old-space-size=3072',
},
});
expect(definitions.daemon.env.NODE_OPTIONS).toBe('--max-old-space-size=3072');
expect(definitions.frontend.env.NODE_OPTIONS).toBe('--max-old-space-size=1536');
expect(definitions.api.env.NODE_OPTIONS).toBe('--max-old-space-size=1536');
expect(definitions.auction.env.NODE_OPTIONS).toBe('--max-old-space-size=1536');
expect(definitions.battleSim.env.NODE_OPTIONS).toBe('--max-old-space-size=1536');
expect(definitions.tournament.env.NODE_OPTIONS).toBe('--max-old-space-size=1536');
});
});
describe('sanitizeManagedProcessEnv', () => {