feat: 통일 대기 시계를 원자적 reconciliation으로 전환

This commit is contained in:
2026-09-03 10:18:44 +00:00
parent a9f23703d9
commit 69ac6028df
22 changed files with 1300 additions and 251 deletions
@@ -133,6 +133,7 @@ export const createRaiseInvaderHandler = (options: {
env: TurnCommandEnv;
loadArchivedNationMaxId?: (serverId: string) => Promise<number>;
maxGeneralsPerMinute?: number;
clockWallNow?: Date;
}): MonthlyEventActionHandler => {
return async (args, environment) => {
const world = options.getWorld();
@@ -166,7 +167,7 @@ export const createRaiseInvaderHandler = (options: {
(candidate) => totalGeneralCount <= maxGeneralsPerMinute * candidate
);
if (nextTerm !== undefined) {
world.changeTurnTerm(nextTerm);
world.changeTurnTerm(nextTerm, options.clockWallNow);
// Reprojection preserves the frozen monthly boundary by tick but
// changes its displayed Date. New generals must join that frozen
// boundary, not the realtime game clock that kept advancing while