Repository navigation
test(herdr): a test pane's zsh starts at a prompt, not in zsh's new-user wizard - #502
Conversation
…ser wizard Since #499 the test herdr session starts its panes with an empty ZDOTDIR, so that a pane's zsh reads none of the user's own files. On a Linux host whose login shell is zsh, a zsh with no startup file at all opens its new-user wizard (zsh-newuser-install) in every pane, and the wizard takes the first keys a test types into the shell: `exec '…/claude' …` arrived as `xec '…'`, the fixture never started, and every contract test that runs a program in a pane failed in its setup. The directory now holds an empty .zshrc. zsh reads it as nothing, and with a startup file present it does not open the wizard. A pane reads the file when its shell starts, so a test server already running needs no restart. Measured on Ubuntu with zsh as the login shell, on a herdr session of its own: with the empty directory the wizard showed and a typed command did not run; with the empty .zshrc no wizard and the command ran. On the default test session, server/prompt.contract.test.ts went from failing in its first fixture to 11 passed, and server/pi.contract.test.ts passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe test script now creates ChangesTest setup initialization
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The test helper now prepares its Zsh configuration before checking server readiness. No concrete regression was established, so the change appears ready to merge after normal checks. 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 docstrings
🧪 Generate unit tests (beta)
Comment |
Change
Since #499 the test herdr session starts its panes with an empty
ZDOTDIR, so that a pane's zsh reads none of the user's own files. On a Linux host whose login shell is zsh, a zsh with no startup file at all opens its new-user wizard (zsh-newuser-install) in every pane. The wizard takes the first keys a test types into the shell:exec '…/claude' …arrived asxec '…', the fixture never started, and every contract test that runs a program in a pane failed in its setup (server/prompt.contract.test.tsatexpect(existsSync(log)).toBe(true)).CI is not affected (its panes run bash), and neither were the macOS runs #499 was made on. A developer machine on Linux with zsh is, and so is any session that verifies a PR locally on one.
scripts/test-herdr.tsnow puts an empty.zshrcinto that directory. zsh reads it as nothing, so the pane still reads none of the user's files, and with a startup file present it does not open the wizard. A pane reads the file when its shell starts, so a test server that is already running needs no restart.No changelog entry: nothing a user of the app notices.
Validation
echodid not run; with the empty.zshrcthere was no wizard and the command ran.herdr-web-ui-test, zsh panes):bun test ./server/prompt.contract.test.tsfailed in its first fixture before the change and passes after it (11 passed, 0 failed);bun test ./server/pi.contract.test.tspasses (9 passed).🤖 Generated with Claude Code