Skip to content

Commit 1029e37

Browse files
committed
test(subagent): raise fallback suite budget for Windows ACL hooks
Credential install in beforeEach can exceed the default 5s hook budget under isolate on a loaded windows-latest runner (NTFS ACL harden stalls).
1 parent 0c6ef39 commit 1029e37

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎tests/subagent-model-fallback.test.ts‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
1+
import { afterEach, beforeEach, describe, expect, setDefaultTimeout, test } from "bun:test";
22
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
33
import { tmpdir } from "node:os";
44
import { join } from "node:path";
@@ -22,6 +22,11 @@ import { clearAccountNeedsReauth, markAccountNeedsReauth } from "../src/codex/ac
2222
import { clearAccountQuota, updateAccountQuota } from "../src/codex/quota";
2323
import type { OcxConfig } from "../src/types";
2424

25+
// beforeEach writes three Codex credentials (NTFS ACL harden on Windows). Under
26+
// `bun test --isolate` on a loaded windows-latest runner that can exceed the
27+
// default 5s hook budget (seen as beforeEach/afterEach timeout at ~7.6s).
28+
setDefaultTimeout(30_000);
29+
2530
const savedCodexHome = process.env.CODEX_HOME;
2631
const savedOpencodexHome = process.env.OPENCODEX_HOME;
2732
let testDir: string;
@@ -70,6 +75,8 @@ function codexHomeFixture(): string {
7075
return dir;
7176
}
7277

78+
// Credential writes can hit Windows ACL harden stalls under full-suite isolate
79+
// load (GHA: hook timed out ~7.6s on model_fallback terminator case).
7380
beforeEach(() => {
7481
testDir = mkdtempSync(join(tmpdir(), "ocx-subagent-fb-"));
7582
process.env.OPENCODEX_HOME = testDir;
@@ -81,7 +88,7 @@ beforeEach(() => {
8188
clearAccountNeedsReauth("account-a");
8289
clearAccountNeedsReauth("account-b");
8390
clearAccountNeedsReauth("main");
84-
});
91+
}, { timeout: 30_000 });
8592

8693
afterEach(() => {
8794
if (savedCodexHome === undefined) delete process.env.CODEX_HOME;
@@ -95,7 +102,7 @@ afterEach(() => {
95102
clearAccountNeedsReauth("account-b");
96103
clearAccountNeedsReauth("main");
97104
rmSync(testDir, { recursive: true, force: true });
98-
});
105+
}, { timeout: 30_000 });
99106

100107
describe("subagent model fallback chain", () => {
101108
test("buildSubagentModelChain dedupes and preserves order", () => {

0 commit comments

Comments
 (0)