Skip to content

Fix pane watcher audit regressions#578

Merged
brickfrog merged 3 commits into
feature/pane-watcher-revivalfrom
feature/pane-watcher-revival.pane-audit-fix-1781353854343-11308-0
Jun 13, 2026
Merged

Fix pane watcher audit regressions#578
brickfrog merged 3 commits into
feature/pane-watcher-revivalfrom
feature/pane-watcher-revival.pane-audit-fix-1781353854343-11308-0

Conversation

@brickfrog

Copy link
Copy Markdown
Owner

Fixes Sarcasmotron audit receipt f2358fc8 for feature/pane-watcher-revival.

Closes audit finding 1 from receipt f2358fc8: apply_recovered_agent registered recovered agents but never reattached pane watching. Alive recovered agents with terminal targets now call watch_pane and the regression asserts watched_agents plus resolved pane id after recovery.

Closes audit findings 2 and 3 from receipt f2358fc8: pre-TDD leaf no-handoff still sent a LocalTerminalInput prod and the Prod/prodded_at machinery survived. The decision enum is now binary, pre-TDD escalates directly to the parent at the idle threshold, worker_no_handoff_prodded_at and reload serialization are deleted, and targeted tests assert nothing is sent to the leaf pane.

Closes audit finding 4 from receipt f2358fc8: src/runtime pane watcher used @exec through a native default. PaneWatcher::new is now hermetic with an empty host; the serve path continues injecting the native dump-screen adapter at the bin/server boundary, and src/runtime no longer imports choir/src/exec.

Closes audit finding 5 from receipt f2358fc8: missing host-observable live zellij dump-screen check. Added a self-skipping real exec integration test that creates a scratch tab only when ZELLIJ_SESSION_NAME points at a live session, resolves pane/tab ids, asserts dump-screen --pane-id returns text without changing query-tab-names output, and closes by tab id.

Also removes stale stop_subscribe naming in the pane-watch drop path.

Verified:

  • moon test --target native
  • moon build src/bin/choir_lint --target native && _build/native/debug/build/src/bin/choir_lint/choir_lint.exe
  • moon info --target native
  • ! grep -rEn "WorkerNoHandoffDecision::Prod|worker_no_handoff_prodded_at|leaf_pre_tdd_stall_prod_text|_prod_text" src/
  • ! grep -rEn "@exec.|choir/src/exec" src/runtime/
  • moon fmt

Verification

Generated by Choir from commands executed in the leaf workspace.

  • moon test --target native
    • exit: 0
    • head: 55590e4
    • output tail:
Warning: Main package `choir/src/bin/choir` uses blackbox-only test inputs (`_test.mbt` files) in package directory "/mnt/data/Code/choir/.choir/worktrees/pane-audit-fix-1781353854343-11308-0/src/bin/choir". Main packages will stop generating blackbox tests in a future release. Move public behavior into a non-main package and keep the main package as an entrypoint.
4
Total tests: 2009, passed: 2009, failed: 0.
  • moon build src/bin/choir_lint --target native && _build/native/debug/build/src/bin/choir_lint/choir_lint.exe
    • exit: 0
    • head: 55590e4
    • output tail:
Finished. moon: no work to do
  • ! grep -rEn "WorkerNoHandoffDecision::Prod|worker_no_handoff_prodded_at|_prod_text" src/

  • ! grep -rEn "@exec\.|choir/src/exec" src/runtime/

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself).

@brickfrog brickfrog merged commit 21d53d8 into feature/pane-watcher-revival Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant