Area
Multiple areas
What are you trying to accomplish?
Ship a production-ready Bun 1.4 candidate stack on preview-dev so that when Bun 1.4.0 reaches npm, the stable promotion is a single dependency bump — all compatibility patches, CI qualification, and memory/stream/worker improvements are already landed and verified.
What prevents this today?
- Bun 1.4.0 canary is not yet published on npm (latest canary: 1.3.13-canary.20260425.1, latest stable: 1.3.14)
- CI hardcoded
bun-version: 1.3.14 in 11 places — resolved in c7c34f6 via composite action
preview-dev was not a CI-qualified branch — resolved in c7c34f6
- Stream caps, Worker lifecycle, and fetch paths need runtime-gated Bun 1.4 optimizations
What should OpenCodex do?
When a Bun 1.4 canary becomes available on npm, implement the following commit train on preview-dev:
Commit train (blocked on upstream Bun 1.4 canary)
| # |
Commit |
Status |
| 1 |
ci(runtime): source Bun version from package.json and qualify preview-dev |
✅ Done (c7c34f6) |
| 2 |
chore(runtime): bundle Bun 1.4.0-canary.N on preview-dev |
⏳ Blocked — no canary on npm |
| 3 |
test(runtime): record bundled Bun version and revision across package smokes |
⏳ Depends on #2 |
| 4 |
test(memory): add 1.3.14 versus 1.4 wave and quiescence harness |
⏳ Depends on #2 |
| 5 |
perf(stream): enable eager relay for qualified Bun canary revisions |
⏳ Depends on #2 |
| 6 |
perf(stream): use an exact byte queue and global relay budget |
⏳ Depends on #5 |
| 7 |
fix(fetch): cancel unconsumed response bodies on retry and failure |
⏳ Depends on #2 |
| 8 |
perf(worker): skip Bun 1.3.14 OS join settles on qualified Bun 1.4 |
⏳ Depends on #2 |
| 9 |
test(runtime): prove Bun 1.4 isolate teardown without legacy job splits |
⏳ Depends on #8 |
| 10 |
docs(release): document Bun 1.4 preview-dev promotion and rollback |
⏳ Depends on all |
| D-day |
chore(runtime): promote bundled Bun from canary to 1.4.0 |
⏳ After npm release |
Example usage or interface
Stable-day promotion sequence:
preview-dev → dev → preview → main
Day-of changes limited to:
- "bun": "1.4.0-canary.N"
+ "bun": "1.4.0"
- MIN_FIXED_BUN_VERSION: null
+ MIN_FIXED_BUN_VERSION: "1.4.0"
Alternatives or workarounds
Wait for Bun 1.4.0 stable and scramble on release day — riskier because stream/worker/fetch patches would be untested on the new runtime.
Additional context
- Roadmap docs:
devlog/_plan/260814_bun14-preview-dev/ (000-100 decade docs with diff-level precision)
- CI composite action already landed:
.github/actions/setup-project-bun/action.yml
- Branch:
preview-dev (fast-forward from dev, now CI-qualified)
- Key files to patch:
src/lib/bun-stream-caps.ts, src/server/relay-eager.ts, src/storage/worker-lifecycle.ts, fetch error paths across src/oauth/, src/providers/, src/adapters/
- Rollback devices to preserve until stable 1.4 first release:
OPENCODEX_BUN_PATH, streamMode=legacy-tee, Worker settle fallback, split fresh-process CI jobs
Checks
Area
Multiple areas
What are you trying to accomplish?
Ship a production-ready Bun 1.4 candidate stack on
preview-devso that when Bun 1.4.0 reaches npm, the stable promotion is a single dependency bump — all compatibility patches, CI qualification, and memory/stream/worker improvements are already landed and verified.What prevents this today?
bun-version: 1.3.14in 11 places — resolved in c7c34f6 via composite actionpreview-devwas not a CI-qualified branch — resolved in c7c34f6What should OpenCodex do?
When a Bun 1.4 canary becomes available on npm, implement the following commit train on
preview-dev:Commit train (blocked on upstream Bun 1.4 canary)
ci(runtime): source Bun version from package.json and qualify preview-devchore(runtime): bundle Bun 1.4.0-canary.N on preview-devtest(runtime): record bundled Bun version and revision across package smokestest(memory): add 1.3.14 versus 1.4 wave and quiescence harnessperf(stream): enable eager relay for qualified Bun canary revisionsperf(stream): use an exact byte queue and global relay budgetfix(fetch): cancel unconsumed response bodies on retry and failureperf(worker): skip Bun 1.3.14 OS join settles on qualified Bun 1.4test(runtime): prove Bun 1.4 isolate teardown without legacy job splitsdocs(release): document Bun 1.4 preview-dev promotion and rollbackchore(runtime): promote bundled Bun from canary to 1.4.0Example usage or interface
Stable-day promotion sequence:
Day-of changes limited to:
Alternatives or workarounds
Wait for Bun 1.4.0 stable and scramble on release day — riskier because stream/worker/fetch patches would be untested on the new runtime.
Additional context
devlog/_plan/260814_bun14-preview-dev/(000-100 decade docs with diff-level precision).github/actions/setup-project-bun/action.ymlpreview-dev(fast-forward fromdev, now CI-qualified)src/lib/bun-stream-caps.ts,src/server/relay-eager.ts,src/storage/worker-lifecycle.ts, fetch error paths acrosssrc/oauth/,src/providers/,src/adapters/OPENCODEX_BUN_PATH,streamMode=legacy-tee, Worker settle fallback, split fresh-process CI jobsChecks