Repository navigation
test(launcher): assert the scoped env and versioned bundled runtime in source oracles - #7365
Conversation
…n source oracles #7362 changed the bundled-runtime return and the spawn env line that two source-invariant oracles pinned literally (dev test 4/4, run 39218333499). Assert the new lines; the scoped inheritedEnv must sit inside the spawn call.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
✨ Finishing Touches
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 |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16d2b0ae7f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| expect(source).toContain("const bunRuntime = resolveBun({ allowInstall: !codexCliUpdateInspection });"); | ||
| expect(source).toContain("const bun = bunRuntime.path;"); | ||
| expect(source).toContain('return { path: bin, source: "bundled" };'); | ||
| expect(source).toContain('return { path: bin, source: "bundled", version: bundledBunVersion(bunDir) };'); |
There was a problem hiding this comment.
Cover the post-install bundled return
When the bundled binary is initially unusable but install.js repairs it, resolveBun takes the second bundled return at bin/ocx.mjs:1061. This toContain is already satisfied by the fast-path return at line 1052, so the post-install branch could again omit version, pass this oracle, and send undefined to scopeTranspilerCacheToRuntime; assert both occurrences or scope an assertion to each branch.
Useful? React with 👍 / 👎.
Summary
#7362 changed two lines in
bin/ocx.mjsthat source-invariant oracles pin literally, sodevfailstest 4/4(PR run 39218333499, job 117947637695):ocx.mjs package launcher (source invariants) > the Bun child receives the runtime provenance the launcher actually selected (#848)expectedreturn { path: bin, source: "bundled" };… > the inspection child does not inherit a duplicate copy of the snapshotted valuesexpected...inheritedEnv,Both oracles now assert the new lines without dropping either guarantee:
{ path: bin, source: "bundled", version: bundledBunVersion(bunDir) }, so path, source and version still come from one resolution. The other [Bug]: doctor repeats OPENCODEX_BUN_PATH guidance when a Bun canary override is already active #848 assertions (marker inside the spawn env,bunRuntimefromresolveBun, the TS constant mirror) are unchanged....scopeTranspilerCacheToRuntime(inheritedEnv, bunRuntime.version, join),, so the child still receives the de-duplicatedinheritedEnvand neverprocess.env. This is stricter than before: the line must sit inside the spawn call, not just anywhere in the file. The lowercase-key delete, the inspection-only guard and the...process.envban are unchanged.I missed these because
test:changedfollows imports and these oracles readbin/ocx.mjsas text. This PR changes only the test file.Verification
Against dev 7dfc141 (includes #7362 and #7364):
bin/ocx.mjs, plus the runtime, startup-action, startup-health, cache-scope and lab-boundary suites (26 files): 598 pass, 0 fail.ci-workflows,ci-scope-reduction,ci-review-lanes,linux-desktop-packaged-ci): 172 pass, 0 fail.bun x tsc --noEmitpasses.Checklist
Summary by CodeRabbit