docs(devlog): correct the 122-failure root cause to the missing --isolate - #1787
Merged
Conversation
…late The previous note blamed an absent sandbox. bunfig.toml preloads tests/preload.ts for every bun test invocation, so the sandbox is always present and a bare 'bun test <file>' passes. The real trigger is process sharing: without --isolate all 789 files run in one process behind a single preload, so a suite that mutates OPENCODEX_HOME can leave a later file pointing at the real home. Measured: bun test = 67 refusals/122 fails, bun test --isolate tests = 0/0.
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release-readiness document now attributes 122 test failures to running Bun without ChangesRelease readiness documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrects the root cause recorded in #1783. That note blamed a missing sandbox from
scripts/test.ts; that was wrong, and the correction matters because it pointed at the wrong defense.tests/preload.tsis registered inbunfig.tomlexactly so a barebun teststill gets a sandbox and an armed guard. That defense works — a barebun test <file>on a single file passes.The actual trigger is the missing
--isolate.scripts/test.tsspawnsbun test --isolate ./tests/; without it Bun shares one process across all 789 files. The preload runs once per process, so any suite that mutatesprocess.env.OPENCODEX_HOMEor restores a captured environment inafterEachcan leave a later file pointing at the real home. The guard then correctly refuses, and the refusal surfaces as an unrelated downstream assertion.Verification
Same host, same commit, same machine:
The middle row isolates the variable: no wrapper, no sandbox hand-off, only
--isolateplus the preload — and it is fully green. It is also the exact commandscripts/release.tsruns in preflight, so the release gate is unaffected.Checklist
Summary by CodeRabbit