fix: 모든 토너먼트 writer의 source revision을 원자화

API store뿐 아니라 월 자동 개막과 runtime clock shift도 공통 Lua writer를 사용한다. 프로필 초기화 시 revision key도 함께 제거한다.
This commit is contained in:
2026-08-16 18:49:33 +00:00
parent dd4645e4d0
commit 346f796cfc
12 changed files with 192 additions and 64 deletions
@@ -171,6 +171,7 @@ export const buildTournamentRuntimeKeys = (profileName: string): string[] => [
`sammo:${profileName}:tournament:participants`,
`sammo:${profileName}:tournament:matches`,
`sammo:${profileName}:tournament:betting`,
`sammo:${profileName}:tournament:source-revision`,
];
export const clearTournamentRuntimeKeys = async (
@@ -12,6 +12,7 @@ describe('tournament reset state', () => {
'sammo:che:1010:tournament:participants',
'sammo:che:1010:tournament:matches',
'sammo:che:1010:tournament:betting',
'sammo:che:1010:tournament:source-revision',
]);
expect(buildTournamentRuntimeKeys('hwe:915')).not.toContain('sammo:che:1010:tournament:state');
});
@@ -28,7 +29,7 @@ describe('tournament reset state', () => {
'che:1010'
);
expect(deleted).toBe(4);
expect(deleted).toBe(5);
expect(calls).toEqual([buildTournamentRuntimeKeys('che:1010')]);
});
});