Repository navigation
test(cli): stop two tests from depending on the developer's setup - #2039
Conversation
completion-tip sandboxes HOME but not $ZSH. Oh My Zsh exports $ZSH, the zsh installer looks for completions under it, finds a real install and retires the tip, so two tests failed on such machines. Clear $ZSH and $ZSH_CUSTOM the way zsh-installer.test.ts already does. The workset launch-failure test puts a claude with a missing interpreter first on PATH. Spawning it fails with ENOENT and the PATH search moves on to the next entry, so with Claude Code installed the real one ran instead of failing. Drop the directories that hold a claude from PATH in that test.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughTwo tests now isolate their environments from local Claude Code and Oh My Zsh installations. The changes adjust PATH and clear ZSH-related environment variables. ChangesTest environment isolation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to These changes isolate two tests from local machine settings without changing product behavior; no concrete merge-blocking risk is identified. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
alfred-openspec
left a comment
There was a problem hiding this comment.
Approved. These are narrowly scoped test-isolation fixes: shell-completion tests no longer inherit Oh My Zsh paths, and the launch-failure test cannot fall through to a developer's real Claude binary. The two targeted files pass 60 tests locally, and full cross-platform CI is green.
Closes #2038
What this changes
Two test files read things from the developer's machine that CI doesn't have, so three tests failed locally and passed on CI.
completion-tip.test.tsnow clears$ZSHand$ZSH_CUSTOMinbeforeEach, likezsh-installer.test.tsalready does. With Oh My Zsh exported, the zsh installer found the developer's real completions under$ZSHand retired the tip.afterEachalready restores the whole environment, so nothing else changes.claude,claude.exeorclaude.cmdbefore putting its broken fake first. Without that, the spawn failed with ENOENT on the fake and went on to the developer's real Claude Code.Only test files change.
How you verified it
main(2500d6d):pnpm testgave 6,400 passed and 3 failed (the three tests in Three tests fail locally when Oh My Zsh or Claude Code is installed #2038).workset.test.tsandcompletion-tip.test.tspass 60/60, and the fullpnpm testpasses 6,403/6,403.pnpm build,pnpm exec tsc --noEmitandpnpm lintpass.claudeon PATH and the filter removes nothing there.Notes
pnpm changesetif this affects users, and committed the fileSummary by CodeRabbit