Repository navigation
fix(server): preserve terminal exits when clearing scrollback - #25192
maria-rcks wants to merge 2 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Clearing terminal scrollback now preserves queued process exits and the active event drain, allowing normal exit cleanup and notifications to complete. The change is narrowly scoped and introduces no material new exposure. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
pingdotgg#25192) Cherry-picked from pingdotgg#25192 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alex Southwell <4596216+saphid@users.noreply.github.com>
64b413f to
4a6f460
Compare
Dismissing prior approval to re-evaluate 4a6f460
Problem
Clearing scrollback while an output subscriber is busy drops a queued process exit and releases the active drain. The terminal can remain marked running after its shell exits.
Change
Keep pending exit events, discard pending output, and leave drain ownership with the active consumer. One regression test in the existing terminal manager suite checks exit delivery, discarded output, the observer snapshot, and empty persisted scrollback.
Verification
vp run check:changedpasses: formatting, lint, knip, GraphQL, affected typechecks, and all 44 terminal manager tests.node-pty/ bash reproduction: hold an output subscriber, queue output and exit 7, clear, then release. Observedstarted → output → cleared → exited; observer snapshot: exited, code 7, empty history; persisted log: empty.Takeover
Replaces #22137, with thanks to @saphid for the original implementation.
Built with GPT-6.1-Sol in the Codex harness on T3 Code.