From d96027c0984899e610e64ffaa1089a265328412f Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Mon, 31 Aug 2026 04:06:35 +0000 Subject: [PATCH] fix: give the spinning-shard kill test load headroom (30s -> 90s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test spawns and group-kills three real children (one a busy-loop burning a full core) while five sibling shard processes compete for eight vCPUs. Under full-suite load it blew bun's default 30s per-test ceiling at 30,009ms — while passing in isolation in 1.4s — and red the only required lane. Every assertion in it is event-based (statuses, group-kill proof, heartbeat lines); the sole latency claim is the <30s kill-deadline sanity bound, which stays. Explicit 90s headroom, not a weakened oracle. Co-Authored-By: Claude Fable 5 --- test/paid-shards.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/paid-shards.test.ts b/test/paid-shards.test.ts index 7b6335e58..e64cb8532 100644 --- a/test/paid-shards.test.ts +++ b/test/paid-shards.test.ts @@ -159,7 +159,13 @@ describe('shard execution', () => { expect(lines.filter((l) => l.includes(' START ')).length).toBe(3); expect(lines.some((l) => /TIMED-OUT in \d+s/.test(l))).toBe(true); expect(lines.some((l) => /PASSED in \d+s/.test(l))).toBe(true); - }, 30_000); + // 90s, not the default 30s: this test spawns/kills three real children + // (one a busy-loop burning a full core) while 5 sibling shard processes + // compete for 8 vCPUs — observed blowing exactly the 30s ceiling at + // 30009ms under full-suite load while passing in isolation in 1.4s. + // Every assertion above is event-based; the only latency claim is the + // <30s kill-deadline sanity bound, which stays. + }, 90_000); test('exit 0 WITHOUT the terminal summary is FAILED — enforced for injected commands too', async () => { // The invisible-non-execution backstop: previously the paid runner