fix(service): align WSL Codex home ownership - #1427
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesCodex-home resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
✅ Deterministic PR hygiene checks passed. |
ac632b9 to
af11b4e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/service.ts`:
- Around line 97-101: Update assertServiceEnvironmentMatchesInstall() to call
currentCodexHome() once, store the resolved path in a local variable, and reuse
that value for both the ownership comparison and any error reporting instead of
resolving it separately.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cfe2238b-0969-405a-8c81-e9d6ad499607
📒 Files selected for processing (3)
src/service.tsstructure/02_config-and-codex-home.mdtests/codex-home-wsl.test.ts
Reuse a single currentCodexHome() result for comparison and error reporting so WSL discovery cannot diverge between the two calls.
|
Thanks @Ingwannu — merged. This closes #1400 with a small but important alignment fix. The runtime already resolved Codex home through the WSL-aware Routing service ownership through the same resolver keeps explicit Appreciate the focused scope and the follow-up fix to resolve the Codex home once per ownership check. |
Summary
CODEX_HOMEauthority while allowing the existing narrow WSL single-Windows-home discovery when it is unsetRoot cause
The runtime already used the WSL-aware
resolveCodexHomeDir(), but service ownership independently recordedCODEX_HOME || ~/.codex. In a Windows Desktop + WSL layout with one discoverable Windows Codex home, the service could therefore record Linux~/.codexwhile the proxy actually used the Windows home. Later repair or uninstall then looked foreign even in the same environment.User impact
New service installs and same-environment ownership checks now agree with runtime Codex-home targeting. The patch does not migrate or take over existing foreign service state.
Verification
bun test tests/codex-home-wsl.test.ts tests/service.test.ts: 106 passed, 0 failedbun run typecheck: passedbun run privacy:scan: passedgit diff --check: passedorigin/devhost showed the documented service-token inheritance failure and the CPU-limited suite showed unrelated endpoint admission timeouts; exact-head GitHub CI remains required before readinessCloses #1400
Summary by CodeRabbit
Bug Fixes
Documentation