Repository navigation
test(claude-store): use a Bun stand-in client in the attach-behind-options test, since macOS 27 hides /bin/sh's environment (test-only) - #2105
Conversation
…tions test, since macOS 27 hides /bin/sh's environment (test-only)
On macOS 27 the kernel withholds a platform binary's environment from
KERN_PROCARGS2 (`ps -E` shows none for a /bin/sh child but shows one for a
bun child). The test's /bin/sh client therefore read as "environment
unreadable", and `claudeAttachSession` answered `{ session: null }` where
the test expects `null`. The client is now a Bun process, as the file's
other environment tests already use. Product code is unchanged.
Fixes #1971.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 seconds. View limit details
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 |
|
CI is done on d42f788: everything is green. The one red check is a stale Pull request title run (00:24:01Z). It ran on the PR's first title, where the shell had dropped the apostrophe in |
|
Merging d42f788 (test-only: a Bun stand-in client in the attach-behind-options test). omo-native-code-reviewer passes it: five mutations of the production code it covers each make the test fail. The required checks are green; Fast checks passed on a rerun after its job was cancelled. CodeRabbit did not review this head. Not run on macOS 27 here. |
Change
Test-only. On macOS 27,
server/claude-store.test.ts"readsattachbehind options only from a client whose environment is no background session's" fails on main. Its client was/bin/sh -c 'echo ready; read line', and macOS 27 withholds a platform binary's environment fromKERN_PROCARGS2.ps -Eshows no environment for a/bin/shchild, but does show one for abunchild. So the client read as "environment unreadable", andclaudeAttachSessionanswered{ session: null }where the test expectsnull.The client is now a Bun process (
process.execPath -e "process.stdin.resume(); console.log('ready')"). This matches the file's other environment tests (theKEEP_ALIVEstand-in) and thehermes.contract.test.tsone. What the test asserts is unchanged, and product code is unchanged. macOS 15 (the CI job "Native macOS session identity") still shows/bin/sh's environment, which is why CI never saw this.Fixes #1971.
Verification
0d439606in /tmp,bun test server/claude-store.test.ts -t 'reads .attach. behind options only':Received: { session: null }bun run check fastis green (unit 7774 pass, 0 fail).Two earlier
check fastruns failed only inscripts/ci-browser.test.ts(its stub's 5 s kill timeout) while the host was at load 100 to 144. That file is untouched here and passed on its own.No changelog fragment: test-only.