diff --git a/test/helpers/docsync-fault-callbacks.ts b/test/helpers/docsync-fault-callbacks.ts index abdaab99e..65c4b6e14 100644 --- a/test/helpers/docsync-fault-callbacks.ts +++ b/test/helpers/docsync-fault-callbacks.ts @@ -66,6 +66,7 @@ mock.module(path.join(root, 'test/helpers/session-runner.ts'), () => ({ async ru const scenario = legacy ? 'legacy-completion' : options.testName.slice('ship-docsync-'.length); expect(options.maxTurns).toBe(legacy ? 30 : 24); const remaining = (legacy ? CAPTURE_LONG_MS : CAPTURE_MS) - 15_000; + // gstack-timing-ok: runShipDocsFault derives the timeout from elapsed time, so the bound measures the same elapsed time expect(options.timeout).toBeGreaterThanOrEqual(remaining - (Date.now() - bodyStartedAt)); expect(options.timeout).toBeLessThanOrEqual(remaining); expect(options.tools).toEqual(['Bash', 'Read', 'Write', 'Edit', 'Glob', 'Grep']); diff --git a/test/review-army-budget.test.ts b/test/review-army-budget.test.ts index 9ba5d25ea..dd077fe2e 100644 --- a/test/review-army-budget.test.ts +++ b/test/review-army-budget.test.ts @@ -110,6 +110,7 @@ const run = async opts => { opts.signal?.addEventListener('abort', () => events.push('abort-' + attempt), { once: true }); if (attempt === 1) { await new Promise(resolve => opts.signal.addEventListener('abort', resolve, { once: true })); + // gstack-timing-ok: the drain after cancellation is the behavior under test; no deadline remains during it await Bun.sleep(drainMs); } expect(fs.existsSync(opts.workingDirectory)).toBe(true);