Repository navigation
fix(session): settle stdin closure after child exit - #19
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🔇 Additional comments (7)
📝 SummarySummary by CodeRabbit
WalkthroughThe Node session adapter now settles ChangesNode session closure
Priority: ➖ Normal — Impact reflects medium issue severity. Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Node command sessions now complete input shutdown when stdin closes without a finish event, including child-first completion, while retaining input-error and process-exit failure behavior. The added lifecycle and streaming completion coverage leaves no concrete current-head merge risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. A rabbit reads each line, Comment |
|
The final head The prior review covered @coderabbitai review |
|
✅ Action performedReview finished.
|
When a Node child closes stdin during input shutdown without emitting
finish,closeInput()currently remains pending after process exit. This also strands typed Git protocol shutdown and downstream session retirement. Handle terminal stdin or child-processclose, preserve input errors and process exit validation, and remove temporary listeners on every terminal path. Prepare patch release 3.3.1 so git-warp can consume the repair.Closes #18.
Change kind: bug fix and release metadata. Regression commit
21630bbrecords the first failing assertion;93837f8handles stdin close. The downstream real-Git probe exposed process completion before the stdin close notification; a sixth test was observed red against93837f8, and9b60038repairs that ordering.b4cbd46prepares 3.3.1. The Node spawn boundary is injectable for controlled stream-event schedules.Validation: named regression failures rather than runner timeouts; 50 focused lifecycle and real Git protocol tests pass. Final local Docker matrix passes Node 237 tests, Bun 237 tests, and Deno 30 top-level tests / 272 steps. ESLint, touched-JavaScript formatting, and production dependency audit pass. The 3.3.1 npm tarball builds successfully. Commands, oracle, and evidence are in
docs/evidence/session-input-close.md.Hosted CI at
b4cbd46exposed two existing streaming tests that consumed stdout without awaiting process completion, leaving a process/timer/status waiter live in Deno.590d4eeawaitsgitStream.finishedand checks code 0; the exact final-head lint and multi-runtime CI now pass. A separate overloaded local run was stopped after widespread watchdog failures; local verification then ran the same full suites serially with one Node worker. Test timeouts and sanitizer checks were preserved.The runtime dependency audit is clean. The existing development-tool dependency tree still reports 12 audit findings; those dependencies are unchanged by this patch.
Downstream: a git-warp test advances the git-cas idle timer with a fake clock, uses real Git, and holds the writable final callback while allowing real EOF. On Plumbing 3.3.0, git-warp history closure stays pending after child exit; with this repair it completes. The full Node 22 integration lane passes 138 tests across 35 files with the candidate adapter, including all original occurrence assertions. Registry-backed adoption remains pending publication.
Related: git-stunts/git-warp#878. Its historical CI event ordering remains unknown; this is controlled evidence of the reproduced closure mechanism, with the original failure retained.