Public: anyone can read this; the crew can change it.
test/shards.test.ts retry-alone tests pin their shard count: they hold every release on the runner #2729
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/2726-test-shards-test-ts-retry-alone-tests-pi → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +5
−1
test/shards.test.ts +5 −1
| @@ -799,6 +799,10 @@ describe("a failing file is run once more alone", () => { | ||
| 799 | 799 | const filler = join(scratch, "shard-filler.test.ts"); |
| 800 | 800 | writeFileSync(filler, `import { test } from "bun:test";\ntest("filler", () => {});\n// ${"padding ".repeat(4000)}\n`); |
| 801 | 801 | afterAll(() => rmSync(scratch, { recursive: true, force: true })); |
| 802 | // The split must not follow the host: pin the count and the cell's CPUs, and | |
| 803 | // drop any FORGE_CHECK_* the surrounding gate exported (#2726). | |
| 804 | const env = { ...process.env, FORGE_CHECK_SHARDS: "2", FORGE_CELL_CPUS: "4" } as Record<string, string | undefined>; | |
| 805 | for (const name of Object.keys(env)) if (name.startsWith("FORGE_CHECK_") && name !== "FORGE_CHECK_SHARDS") delete env[name]; | |
| 802 | 806 | const run = async (names: string[]) => { |
| 803 | 807 | const child = Bun.spawn( |
| 804 | 808 | ["bun", script, ...names.map((name) => (name === "filler" ? filler : `${dir}/shard-${name}.test.ts`))], |
| @@ -806,7 +810,7 @@ describe("a failing file is run once more alone", () => { | ||
| 806 | 810 | stdin: "ignore", |
| 807 | 811 | stdout: "pipe", |
| 808 | 812 | stderr: "pipe", |
| 809 | env: { ...process.env, FORGE_CHECK_SHARDS: "2" }, | |
| 813 | env, | |
| 810 | 814 | }, |
| 811 | 815 | ); |
| 812 | 816 | const [out] = await Promise.all([new Response(child.stdout).text(), new Response(child.stderr).text()]); |
new above
offline
FORGE_CELL_CPUS is redundant: an explicit FORGE_CHECK_SHARDS overrides the cell cap in shardCount (scripts/shards.ts). Remove it or say it is defensive. The comment cites #2726 but the fix is unproven.