From eb0923e719056af3600f897a186ee8fe790cdfac Mon Sep 17 00:00:00 2001 From: bitkyc08-arch Date: Thu, 6 Aug 2026 22:26:59 +0900 Subject: [PATCH] fix(test): give the contended restore its real production wait budget The case waits out a 5s SQLite busy timeout twice plus the retry delay -- about 11s of deliberate waiting -- so a 15s CLI watchdog had almost no margin and fired on a loaded macOS runner (dev run 31105071651). The 45s test timeout still bounds the case. --- tests/codex-composed-acceptance.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/codex-composed-acceptance.test.ts b/tests/codex-composed-acceptance.test.ts index 315b32e836..ad15dc0434 100644 --- a/tests/codex-composed-acceptance.test.ts +++ b/tests/codex-composed-acceptance.test.ts @@ -477,7 +477,13 @@ describe("WP13 composed toggle acceptance", () => { `], { cwd: repoRoot, env: fx.env(), stdout: "pipe", stderr: "pipe" }); fx.children.push(holder); await waitFor(() => existsSync(held) ? true : null, "history BEGIN IMMEDIATE"); - const blocked = await fx.runCli(["restore", "--json"], fx.homeA, fx.userprofileA, 15_000); + // The contended restore deliberately waits out PRODUCTION's retry budget: + // a 5 s SQLite busy timeout per attempt, two attempts, plus the delay + // between them — ~11 s of intentional waiting before it can report `busy`. + // A 15 s watchdog left almost no margin and fired on a loaded macOS runner + // (dev CI run 31105071651). Give the wait its budget plus real headroom; + // the case's own 45 s test timeout still bounds it. + const blocked = await fx.runCli(["restore", "--json"], fx.homeA, fx.userprofileA, 30_000); expect(blocked.exitCode).toBe(1); const envelope = JSON.parse(blocked.stdout) as { success: boolean; artifacts: { history: { state: string; reason?: string } } }; expect(envelope).toMatchObject({ success: false, artifacts: { history: { state: "failed", reason: "busy" } } });