Skip to content

Commit 02bc10e

Browse files
lidge-junt
andauthored
wp6: pin Bun 1.4.2 and catch up the drifted workflow (#4064)
* chore(deps): move the pinned Bun runtime to 1.4.2 package.json's dependencies.bun is the single source of truth for the runtime: .github/actions/setup-project-bun reads it with node -p and feeds it to setup-bun, so one line moves fourteen usages across four workflows. The Dockerfile tag and its digest move with it, and tests/ci-workflows/install-scripts.test.ts hard-pins both package.json values, so it has to move in the same commit or CI goes red. MIN_FIXED_BUN_VERSION and MIN_BOUNDED_CODEX_WS_BUN_VERSION stay at 1.4.0. They are thresholds for the lowest release carrying their fixes, not mirrors of the bundled version; raising them would reclassify healthy 1.4.0 and 1.4.1 runtimes as known-bad and push traffic back to legacy-tee. The bunRuntimeVersion fixture in container-bootstrap.test.ts is synthetic and also stays. bun.lock regenerated with bun install --lockfile-only. * ci: catch the orphan-cleanup workflow up to the pinned Bun This workflow opted out of .github/actions/setup-project-bun and named its own version, so it stayed on 1.3.14 through the 1.4.0 bump and would have stayed there through this one. It runs one script with no repository install, so the drift was harmless in practice, but a workflow silently two minor versions behind the pinned runtime is the kind of thing that is only harmless until it is not. Kept as a literal version rather than switching to the composite action: tests/ci-workflows/cleanup-orphaned-workflows.test.ts asserts this workflow references the SHA-pinned oven-sh/setup-bun directly, so adopting the composite is a separate change about that pinning contract. * test(config): give the config-lock child room to exit on Windows The full lane=all dispatch for the Bun 1.4.2 bump failed one assertion on Windows shard 2/6: exit 143 where 0 was expected, in "a live cross-process holder is not stolen". 143 is SIGTERM — this helper's own kill() after its 5 s race lost, not a lock defect. The case measured 5858 ms end to end, so it was sitting right on the boundary. The child polls for the release marker on a 10 ms sleep, so its exit is bounded by the filesystem noticing that write plus one Bun teardown, and both are slower on a loaded Windows runner. 30 s leaves the timeout meaningful for a genuine hang while removing the false red. The assertion itself is unchanged: the child must still exit 0. --------- Co-authored-by: t <[email protected]>
1 parent ff524ae commit 02bc10e

6 files changed

Lines changed: 30 additions & 25 deletions

File tree

‎.github/workflows/cleanup-orphaned-workflows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup Bun
3838
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
3939
with:
40-
bun-version: 1.3.14
40+
bun-version: 1.4.2
4141

4242
- name: Remove stale workflow histories
4343
env:

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22

33
# Keep the runtime aligned with package.json and pin the multi-platform image index.
4-
ARG BUN_IMAGE=oven/bun:1.4.0@sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6
4+
ARG BUN_IMAGE=oven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895
55

66
FROM ${BUN_IMAGE} AS build
77
WORKDIR /home/bun/app

‎bun.lock‎

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@
6666
"@bufbuild/protobuf": "^2.14.0",
6767
"@modelcontextprotocol/sdk": "^1.30.0",
6868
"@napi-rs/keyring": "1.3.0",
69-
"bun": "1.4.0",
69+
"bun": "1.4.2",
7070
"zod": "4.4.3"
7171
},
7272
"devDependencies": {
73-
"@types/bun": "1.4.0",
73+
"@types/bun": "1.4.2",
7474
"typescript": "7.0.2"
7575
},
7676
"overrides": {

‎tests/ci-workflows/install-scripts.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ describe("install scripts", () => {
6565
expect(pkg.main).toBe("./bin/package-main.mjs");
6666
expect(pkg.exports?.["."]?.bun).toBe("./src/index.ts");
6767
expect(pkg.exports?.["."]?.default).toBe("./bin/package-main.mjs");
68-
expect(pkg.dependencies?.bun).toBe("1.4.0");
68+
expect(pkg.dependencies?.bun).toBe("1.4.2");
6969
expect(pkg.dependencies?.zod).toBe("4.4.3");
7070
expect(pkg.devDependencies?.typescript).toBe("7.0.2");
71-
expect(pkg.devDependencies?.["@types/bun"]).toBe("1.4.0");
71+
expect(pkg.devDependencies?.["@types/bun"]).toBe("1.4.2");
7272
expect(pkg.scripts?.dev).toBe("bun run src/cli/index.ts start");
7373
expect(pkg.scripts?.["dev:proxy"]).toBe("bun run src/cli/index.ts start");
7474
expect(pkg.scripts?.["dev:gui"]).toBe("cd gui && bun run dev");

‎tests/config/config-mutation-lock.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,19 @@ async function waitForPath(path: string): Promise<void> {
3333
}
3434

3535
async function waitForOwnedChild(child: ReturnType<typeof Bun.spawn>): Promise<number> {
36+
// The child polls for the release marker on a 10 ms sleep, so its exit is bounded by the
37+
// filesystem noticing that write plus one Bun teardown. On a loaded Windows runner both
38+
// are slower than the 5 s this used to allow: shard 2/6 measured 5858 ms end to end and
39+
// reported exit 143, which is this helper's own `kill()`, not a lock defect. Give the
40+
// teardown room; a genuine hang still fails, it just takes longer to say so.
3641
const result = await Promise.race([
3742
child.exited.then(exitCode => ({ exitCode })),
38-
Bun.sleep(5_000).then(() => null),
43+
Bun.sleep(30_000).then(() => null),
3944
]);
4045
if (result) return result.exitCode;
4146
child.kill();
4247
await child.exited;
43-
throw new Error("Timed out waiting for owned config-lock child");
48+
throw new Error("Timed out waiting for owned config-lock child after 30s");
4449
}
4550

4651
beforeEach(() => {

0 commit comments

Comments
 (0)