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
@@ -1,3 +1,5 @@
import { createHash } from 'node:crypto';
import { asNumber, asRecord, JosaUtil } from '@sammo-ts/common';
import { LogCategory, LogFormat, LogScope, type LogEntryDraft } from '@sammo-ts/logic';
@@ -163,6 +165,14 @@ export const createUnificationHandler = (options: {
});
}
}
const sourceRevision = world.getGameClockState().revision;
const suspensionId = `unification-wait-${createHash('sha256')
.update(`${serverId}:${sourceRevision}`)
.digest('hex')
.slice(0, 32)}`;
world.beginUnificationWait(suspensionId);
} else {
world.completeGameClock();
}
queueYearbookSnapshot(world, options.profileName, context.currentYear, context.currentMonth);