Repository navigation
fix(tui): join local PTY reaper during teardown - #11676
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughChangesThe PTY runtime now tracks child reaper threads with completion fences. Terminal shutdown joins the reaper within the shared reader deadline and retains timed-out handles. Tests cover successful joins, timeout retention, self-join avoidance, and production reaper cleanup. PTY reaper lifecycle
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to The change makes local PTY shutdown more reliably clean up its child-reaper thread, but overlapping shutdown calls can defer cleanup of a timed-out reaper until a later teardown or object drop. The PR is mergeable with owner awareness of this bounded concurrency risk. Sequence Diagram(s)sequenceDiagram
participant Surface
participant PtyTerminalRuntime
participant ReaperThread
participant ChildProcess
Surface->>PtyTerminalRuntime: finish terminal reader
PtyTerminalRuntime->>ReaperThread: join within shared deadline
ReaperThread->>ChildProcess: wait for child exit
ReaperThread-->>PtyTerminalRuntime: signal completion
PtyTerminalRuntime-->>Surface: complete shutdown or retain handle
🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
Full details: Description checkExplanation The description explains the change, motivation, and validation commands, but it omits the required Demo Video, Review Trigger, and Checklist sections. It also uses “Validation” instead of the template’s “Testing” heading and states that Rust tests were deferred. Full details: Cmux Swift Blocking RuntimeExplanation PASS: The pull-request diff contains only three Rust files ( Full details: Cmux Browser Automation Off-MainExplanation PASS: The PR changes only three Rust TUI files: Full details: Cmux Expensive Synchronous LoadExplanation PASS: The pull-request diff contains only three Rust files ( Full details: Cmux Cache Substitution CorrectnessExplanation PASS: The pull request changes only Full details: Cmux No Hacky SleepsExplanation PASS: The pull request changes only Full details: Cmux Algorithmic ComplexityExplanation PASS. The described PR changes Full details: Cmux Swift ConcurrencyExplanation PASS: The PR diff contains one changed file, Full details: Cmux Swift Package BoundariesExplanation PASS: The pull-request diff contains only three Rust files under
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
All contributors have signed the CLA ✍️ ✅ |
64a6936 to
9af895f
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
93ec66a to
fdfff46
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
1882a43 to
0cef76f
Compare
0cef76f to
4019f02
Compare
Summary
The startup-failure cleanup in #11414 and terminal-host guard work in #11425 are separate.
Validation
Summary by cubic
Local PTY teardown previously left the child reaper unmanaged; it now owns and joins the reaper alongside the reader against one absolute shutdown deadline. If the reaper misses that deadline, shutdown remains bounded while its handle stays owned for later cleanup.
Written for commit 4019f02. Summary will update on new commits.
Summary by CodeRabbit