From e042b5e7af19020b6cee2154a04697e53a529181 Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 3 Nov 2026 15:44:24 +0000 Subject: [PATCH] test: mark the two intended timing bounds with gstack-timing-ok (GSTA-262) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/helpers/docsync-fault-callbacks.ts | 1 + test/review-army-budget.test.ts | 1 + 2 files changed, 2 insertions(+) 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);