Skip to content

Commit 4c46e00

Browse files
committed
fix(test): the CI shape test pins the Windows shard it now has
The structural assertion said the Windows leg holds 30 minutes and never shards. Both stopped being true when the leg was sharded like the Linux ones, so the gate test fails against the workflow it is supposed to bless. The pins now describe the sharded shape - 15 minutes and the shard flag - with the reason each is pinned.
1 parent 8034cd7 commit 4c46e00

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎tests/ci-workflows.test.ts‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ describe("GitHub Actions hardening", () => {
8181
};
8282

8383
// Job-scoped: a global count still passes if values are swapped between jobs.
84-
// Pin ownership explicitly. `platform-windows` keeps the 30m Windows isolate
85-
// margin from #827 after state-store admission — do not raise again; fix hung
86-
// tests instead (unref'd oauth waitMs / shell kill-grace). A `test` shard runs
87-
// a quarter of the suite, so 15m there means wedged rather than slow.
84+
// Pin ownership explicitly. The Windows leg is sharded like the Linux ones
85+
// since 8034cd7c0 — a single leg reached 30m on a green suite and was killed
86+
// in cleanup, so each shard now holds the same 15m a Linux shard holds. A
87+
// shard that needs longer is wedged, not slow.
8888
expect(ci.jobs?.["select-windows-runner"]?.["timeout-minutes"]).toBe(2);
8989
expect(ci.jobs?.test?.["timeout-minutes"]).toBe(15);
9090
expect(ci.jobs?.gates?.["timeout-minutes"]).toBe(15);
9191
expect(ci.jobs?.["platform-macos"]?.["timeout-minutes"]).toBe(30);
92-
expect(ci.jobs?.["platform-windows"]?.["timeout-minutes"]).toBe(30);
92+
expect(ci.jobs?.["platform-windows"]?.["timeout-minutes"]).toBe(15);
9393
expect(ci.jobs?.["keyring-smoke"]?.["timeout-minutes"]).toBe(8);
9494
expect(ci.jobs?.["npm-global-smoke"]?.["timeout-minutes"]).toBe(8);
9595
expect(ci.jobs?.ci?.["timeout-minutes"]).toBe(5);
@@ -161,12 +161,13 @@ describe("GitHub Actions hardening", () => {
161161
expect(windowsIf).toContain("github.ref == 'refs/heads/preview'");
162162
expect(windowsIf).not.toContain("refs/heads/dev");
163163

164-
// Windows runs the same full suite, and keeps the self-hosted workspace wipe.
165-
// Without the wipe a deleted file survives on the runner's disk and the suite
166-
// passes against a tree that no longer exists in git.
164+
// Windows runs the same suite, sharded like the Linux legs, and keeps the
165+
// self-hosted workspace wipe. Without the wipe a deleted file survives on
166+
// the runner's disk and the suite passes against a tree that no longer
167+
// exists in git.
167168
const winSteps = (ci.jobs?.["platform-windows"] as { steps?: { if?: string; run?: string }[] })?.steps ?? [];
168169
expect(winSteps.some(step => step.run?.includes("bun test --isolate tests"))).toBe(true);
169-
expect(winSteps.some(step => step.run?.includes("--shard"))).toBe(false);
170+
expect(winSteps.some(step => step.run?.includes("--shard=${{ matrix.shard }}/4"))).toBe(true);
170171
expect(winSteps.some(step => step.if === "runner.environment == 'self-hosted'"
171172
&& step.run?.includes("git clean -xffd"))).toBe(true);
172173

0 commit comments

Comments
 (0)