Skip to content

Distinguish peer exit from shutdown timeout in the verifier - #282

Merged
DocksDocks merged 3 commits into
mainfrom
281-report-confirmed-peer-exits-separately-from-shutdown-timeouts-279
Dec 1, 2026
Merged

DocksDocks merged 3 commits into
mainfrom
281-report-confirmed-peer-exits-separately-from-shutdown-timeouts-279

Conversation

@DocksDocks

@DocksDocks DocksDocks commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Plan run: #281, correct peer shutdown reporting

Pull request: #282. Checks: passed (run 46643258844). Reviewed head: 448d443ac153e4ccb101c41400d35dea35d263a9.

What changed

The verification driver distinguishes a process exit from its output pipes closing. The closed-peer check requires a confirmed exit before it sends a probe. Both modes report a shutdown deadline as a failure, not an exit code.

Decisions and corrections

The change applies to the checkout verifier only. The shipped CLI and talk protocol do not change.

Delegated decisions

  1. Track exit independently of the bounded pipe drain. A longer deadline or a closed socket does not prove an exit. Revert the fixture change as one unit. See Research decision 1.
  2. Use a virtual clock for the two deadline orderings and run both real verification modes for integration. A real stuck process would be unsafe and unreliable. The tests need no dependency or shared service. See Research decision 2.

Reviews

Plan round 2 passed. Code round 3. Open findings: none.

Verification

46 unit tests passed. Types (including the complete verifier), scoped lint and test formatting passed. Real talk and talk-ui matched their base output (21 and 15 passing checks). The failure controls exited 1 with only the expected failures, preserved stderr and issued no post-close sends. Both modes removed their registries.

Limits and failures

The full local bun run check did not run. The focused tests and both Linux verification modes ran locally; hosted CI checks the full repository.

Kept resources

If merged, none. If left open, keep the plan, pull request and linked branch for review.

After merge

None. No release or deployment.

Checklist

  • Full local bun run check: the full suite did not run locally.
  • Local bun run check:types passed.
  • Tested locally end to end: A2, both real verification modes.
  • Required Full CI passed for the tested merge of this head and current main.
  • Code review passed in round 3.

Fixes #279

Closes #281

A pipe can remain open after its peer exits. Stop the signal clock at
exit while allowing buffered output to finish. Report an unconfirmed
shutdown without probing a socket as if the process had exited.

Verified: bun run test:unit cli/test/unit/verifySmokePeerShutdown.test.ts cli/test/unit/verifySmokeTalkTurns.test.ts cli/test/unit/verifySmokeScan.test.ts; bun run check:types; bun run lint .agents/skills/verify/scripts/omp-smoke.ts .agents/skills/verify/scripts/smokePeerShutdown.ts cli/test/unit/verifySmokePeerShutdown.test.ts cli/test/fixtures/talk/unconfirmed-peer.ts; bun fmt --no-script --check cli/test/unit/verifySmokePeerShutdown.test.ts
Observe the sender without replacing its behavior. Check the last
millisecond of the pipe drain and report signal termination without
inventing an exit status.

Verified: bun run test:unit cli/test/unit/verifySmokePeerShutdown.test.ts cli/test/unit/verifySmokeTalkTurns.test.ts cli/test/unit/verifySmokeScan.test.ts; bun run check:types; bun fmt --no-script --check cli/test/unit/verifySmokePeerShutdown.test.ts; isolated V6 talk and talk-ui with and without the unconfirmed-peer preload
Append the fixture diagnostic without dropping real output. Both the
full-output and tail-only formatters now receive a nonblank excerpt.

Verified: four preload cases with both excerpt policies; bun run test:unit cli/test/unit/verifySmokePeerShutdown.test.ts cli/test/unit/verifySmokeTalkTurns.test.ts cli/test/unit/verifySmokeScan.test.ts; bun run check:types; isolated V6 talk and talk-ui, normal and unconfirmed
@DocksDocks DocksDocks linked an issue Dec 1, 2026 that may be closed by this pull request
@DocksDocks
DocksDocks marked this pull request as ready for review December 1, 2026 12:08
@DocksDocks
DocksDocks merged commit d3731bc into main Dec 1, 2026
10 checks passed
@DocksDocks
DocksDocks deleted the 281-report-confirmed-peer-exits-separately-from-shutdown-timeouts-279 branch December 1, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant