fix(review): bound TUISink.Wait, join the pump, surface drops (crew findings)

main

Commit

peyton-alt2mo ago

The live full-crew review of this branch (approve-path run, 3/3 reviewers succeeded through the hardened sink) returned three findings:

  • Wait() blocked unconditionally on done, so the deferred teardown wait could still hang forever if Bubble Tea never returns from Run even after Kill — the wedge class survived at command exit. Wait now escalates: one grace period, Kill, one more grace, then abandons the goroutine. This also fixes the pre-existing early-error-path hang where nothing ever quit a healthy TUI before the deferred Wait.
  • pumpDone was created and closed but never joined; Wait now joins the pump whenever the program actually exited.
  • The dropped counter was invisible in production; PostRunComplete now debug-logs a non-zero count — the first diagnostic a future wedge investigation needs.

Pinned by a stubbornProgram fake whose Run never returns even after Kill: Wait must return within the bounded escalation.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com Entire-Checkpoint: 01KX0JNDR51T3R0G488FSB63K7

Checkpoints

test(review): pin that codex $name skills survive the legacy repair + native invocation

Claude Code
View session
Checkpoint 1