Repository navigation
test: stub stdin ref/unref in cli premature-exit regression test - #2337
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
jatmn
left a comment
There was a problem hiding this comment.
— jatmn's PR Review agent
I found no actionable code defects in the three-dot diff. Details below.
Merge readiness
- Draft PR: GitHub reports
mergeable_state: blockedbecause the pull request is still a draft. Mark it ready for review when you want merge-queue / required-review gating to apply beyond CI. - CI (head
04f9c1d908e4e87c467e5b272a2dd792450cf87a): All required PR checks on the head commit completed success (eightunit-testsshards,smoke-and-tests,typecheck,dedicated-tests,launcher-compatibilityfor Node 22 and 24.11.x,launcher-node-floor,pr-intent-scan, CodeQL family).webskipped (no web diff). Combined commit status success; CodeRabbit success. - Node 24 vs local verification: The regression describe block targets Node 24 / #1678, but CI
unit-testsruns Bun shards on Node 22 and the subprocess uses whatevernodeis onPATH(also 22 in that job).launcher-compatibilityexercises Node 24.11.x foropenclaude --versiononly—not this integration test. That matrix gap predates this PR; your Node 22 verification still matches what CI exercises forcli.test.ts. Not a merge blocker for this two-line harness fix. - Scope: Single file, test-only, no dependency on other open PRs.
🟢 Thanks for the contribution. I do not see any actionable issues from my review.
Summary
cli.test.ts) now stubsrefandunrefnext tosetRawMode.Appcallsstdin.ref()before attaching its input listener. Without the stub it throws, Ink unmounts the app and logs[Ink:uncaught] TypeError: stdin.ref is not a function, so the test passed against an unmounted UI instead of the interactive startup it is meant to cover.Impact
Testing
bun run buildok,bun run typecheckok,bun run checkok (0 failures in every shard).bun test src/entrypoints/cli.test.ts5/5 pass, 0 runs log the Ink error (on main: 20/20 pass, 20/20 log it).Notes
Summary by CodeRabbit