test: qa-only fixture keeps its caller-set 30 s deadline

The qa-only-no-fix fixture tells the model to start the guard with 30 s
(a caller limit), so its deadline assertion's default stays 30 000 ms; the
product's Browser Quick default (180 s) does not apply to it. Reverts the
helper and its test to their base.
This commit is contained in:
garrytan committed 2026-10-04 19:41:20 +00:00
1 parent c74c3df073
commit e36e622add
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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');
+3 -3
View File
@@ -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');