Repository navigation
test(cli): copy launcher module dependencies into activation fixtures - #7733
Conversation
…n fixtures The PATH-fallback fixture copied the whole TypeScript src tree; the Node launcher only needs its own .mjs import closure (26 modules including src/service/state-record.mjs), copied with a repository-escape guard. A comment on launcherFallbackFixture records which modes share the warmed PATH Bun and which execute a fresh copy via the fixture's synthetic install.js.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Copy the launcher module graph tests/cli/ocx-launcher-runtime.test.ts |
The fixture now traverses the launcher’s imports, rejects sources outside the repository, and copies the discovered modules. It recursively follows imports from .mjs files and uses this helper instead of copying the full src tree. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related issues
- lidge-jun/opencodex#7578 — The issue concerns setup time for a test using the same fixture. This change reduces the copied source set, but does not change the test budget or PATH Bun probe, and does not establish that the issue is resolved.
Possibly related PRs
- lidge-jun/opencodex#7586 — This PR changes the launcher, whose imported module graph is copied by the updated fixture.
- lidge-jun/opencodex#7598 — This PR changes setup for the same launcher runtime test modes.
Merge Risk: 
Minimal · up to a0b77
-
No actionable merge risk remains.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer dev integration record (release 2.93 dev-merge loop), per the MAINTAINERS.md maintainer-integration exception for dev. This is maintainer integration, not an approving review.
|
Summary
Launcher activation fixtures copy the entire TypeScript proxy tree even though they execute the real Node launcher and a small JSON CLI stub. Copy the launcher's imported module graph instead, recursively following its local
.mjsdependencies, and explicitly create the stub'ssrc/clidirectory.The graph currently contains 26 source modules. An ordinary fixture was observed at about 2,186 files / 27.1 MB before and 28–29 files / 243 KB after this change. The real Bun binary copies, synthetic installer, runtime-selection assertions, environment and existing deadlines remain unchanged.
This changes one test file only, based on dev
8ebe46b2. It does not change runtime selection policy.Verification
Official Windows Bun 1.4.4 and Node 24.18.0, with isolated homes/caches and the existing CI hook timeout:
zod/v4before test dispatch; it was retained as a harness failure, then both comparison runs used the same existing dependencies without installation.Sequential execution, OS caches and recursive fixture observation can affect timings, so those measurements do not establish a speedup or the cause of the earlier repair timeout. The claim is the narrower copy scope with preserved observed behavior.
CI run 40239151609 passed on this exact head, including Typecheck, privacy and all four Ubuntu test shards. Its launcher test log also confirms all activation cases and the POSIX rejected-PATH case passed.
A full local suite was not repeated for this one-file fixture change because concurrent Windows worktrees share the validation host. The focused Windows activation runs and the hosted Ubuntu tests cover the changed preparation path. The complete hosted Windows/macOS matrix was not run. No installed app, service or provider call was used.
Checklist
Summary by CodeRabbit