Skip to content

Make review cancellation wait for authoritative turn terminal #106

Description

@lynnswap

Parent: #96

Contract

A successful turn/interrupt response means that cancellation was accepted; it is not review completion. Cleanup and product terminal publication must wait for the authoritative target-turn terminal, except when the interrupt request is explicitly rejected.

UI cancellation and MCP review_cancel must share this owner.

Acceptance criteria

  • Accepted or outcome-unknown interrupts wait for the matching turn terminal before cleanup.
  • Explicit request rejection returns without waiting for a terminal that cannot arrive.
  • When interrupt and terminal-barrier failures overlap, the original typed request error is preserved.
  • Source, detached review, redirected child, and stale turn identities cannot satisfy one another's barrier.
  • Cleanup, retry, and restart do not delete the review thread before terminal publication and Persist ReviewMonitor-owned review history and logs locally #102 commit.
  • Cancellation of one review remains independent of concurrent reviews.
  • Deterministic tests cover terminal-before-response, response-before-terminal, request failure, connection failure, retry, duplicate terminal, and shutdown.

Historical evidence

The current behavior was established by PR #90 (4eaeccf) through 9e8be21, 9daf2df, 95b589d, and 1d3336d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions