fix(realtime): invalidate committed global activity logs

This commit is contained in:
2026-08-12 16:45:48 +00:00
parent 719c0c0e35
commit d1efa425eb
6 changed files with 286 additions and 13 deletions
@@ -271,6 +271,7 @@ integration('monthly nation betting persistence', () => {
durationMs: 0,
partial: false,
});
expect(hooks.takeCommittedReadModelChanges()?.worldHistoryChanged).toBe(true);
expect(await db.nationBetting.findUniqueOrThrow({ where: { id: bettingId } })).toMatchObject({
name: '천통국 예상',
@@ -320,6 +321,7 @@ integration('monthly nation betting persistence', () => {
})
).toBe(true);
await world.advanceMonth(new Date('0200-02-01T00:00:00.000Z'));
expect(world.peekDirtyState().logs).toEqual([]);
await hooks.hooks.flushChanges?.({
lastTurnTime: state.lastTurnTime.toISOString(),
processedGenerals: 0,
@@ -327,6 +329,7 @@ integration('monthly nation betting persistence', () => {
durationMs: 0,
partial: false,
});
expect(hooks.takeCommittedReadModelChanges()?.worldHistoryChanged).toBe(true);
expect(await db.nationBetting.findUniqueOrThrow({ where: { id: bettingId } })).toMatchObject({
finished: true,