Exclude round one records from match history and statistics

This commit is contained in:
2026-09-21 18:07:30 -04:00
parent 50c81456c4
commit 424d6cefb6
12 changed files with 120 additions and 24 deletions
+6 -1
View File
@@ -272,7 +272,7 @@ describe('durable beta test plans', () => {
expect(testView(id)?.servers[0].progress[0].current).toBe(25);
});
it('uses game_end for the legacy match gate without reading logs', async () => {
it('uses game_end at round 2 or later for the legacy match gate without reading logs', async () => {
const { createScript } = await import('../../src/lib/server/fleet/scripts.js');
const { openBeta, getBeta, listBetaServers } = await import('../../src/lib/server/fleet/beta.js');
const { script, version } = createScript({ name: 'Legacy beta', targetRelPath: 'legacy.gsc', content: Buffer.from('main() {}') });
@@ -282,6 +282,11 @@ describe('durable beta test plans', () => {
await appendFile(join(fixture.t5, names[0], 'logs/games_sp.log'), 'ExitLevel: executed\n');
await tick();
expect(getBeta(betaId)?.state).toBe('running');
await postTelemetry(gameEvent('game_end', 1));
await tick();
expect(listBetaServers(betaId)[0].stage).toBe('awaiting-match');
expect(getBeta(betaId)?.state).toBe('running');
await postTelemetry(gameEvent('game_start'));
await postTelemetry(gameEvent('game_end'));
await postTelemetry(gameEvent('game_start'));
await tick();