diff --git a/test/helpers/qa-browser-deadline-evidence.ts b/test/helpers/qa-browser-deadline-evidence.ts index fd71151bb..2da105051 100644 --- a/test/helpers/qa-browser-deadline-evidence.ts +++ b/test/helpers/qa-browser-deadline-evidence.ts @@ -157,7 +157,7 @@ export function assertQaBrowserCheckpoints(transcript: unknown[], options: Pick< export function assertQaBrowserDeadline(calls: Call[], options: Options & { expectedBudgetMs?: number }) { const fail = (reason: string): never => { throw new Error('QA deadline: ' + reason); }; - const { directory, guard, browse, started, ended, expectedBudgetMs = 180_000 } = options; + const { directory, guard, browse, started, ended, expectedBudgetMs = 30000 } = options; if (!Number.isSafeInteger(expectedBudgetMs) || expectedBudgetMs <= 0 || expectedBudgetMs > 2_147_483_647) fail('invalid expected deadline budget'); const { file, allowed } = qaDeadlineShellPolicy(directory, guard, browse); const reportRoot = path.join(directory, 'qa-reports'); diff --git a/test/qa-browser-deadline-evidence.test.ts b/test/qa-browser-deadline-evidence.test.ts index 8ff36ce15..ced94fdcf 100644 --- a/test/qa-browser-deadline-evidence.test.ts +++ b/test/qa-browser-deadline-evidence.test.ts @@ -14,7 +14,7 @@ const directories: string[] = []; const quote = (value: string) => `'${value.replaceAll("'", `'"'"'`)}'`; afterEach(() => { for (const directory of directories.splice(0)) fs.rmSync(directory, { recursive: true, force: true }); }); -function fixture(expectedBudgetMs = 180_000) { +function fixture(expectedBudgetMs = 30000) { const started = Date.now(); const directory = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'qa-gate-')); directories.push(directory); @@ -218,7 +218,7 @@ test('child-emitted receipt forgery and direct state reset scripts are rejected' expect(() => f.check()).toThrow('reserved deadline evidence'); }); -test('short fixture deadlines require an explicit contract; the native default is the 180s Browser Quick budget', () => { +test('short fixture deadlines require an explicit contract; the native default remains exactly 30s', () => { const native = fixture(); native.run(); expect(assertQaBrowserDeadline(native.calls, { directory: native.directory, guard, browse, @@ -227,7 +227,7 @@ test('short fixture deadlines require an explicit contract; the native default i f.run(); expect(f.check()).toEqual({ launchedRuns: 1, completedRuns: 1, refusedRuns: 0, timedOutRuns: 0 }); expect(() => assertQaBrowserDeadline(f.calls, { directory: f.directory, guard, browse, - started: f.started, ended: Date.now() })).toThrow('expected 180000ms deadline'); + started: f.started, ended: Date.now() })).toThrow('expected 30000ms deadline'); for (const expectedBudgetMs of [0, -1, 0.5, 2_147_483_648, NaN, Infinity]) { expect(() => assertQaBrowserDeadline(f.calls, { directory: f.directory, guard, browse, started: f.started, ended: Date.now(), expectedBudgetMs })).toThrow('invalid expected deadline budget');