Repository navigation
Description
Priority: P0, urgent. Milestone: M1 — Safe, inspectable execution. Related #282 (review run ID reuse), #486 (review recovery after a permission stop), #563 (the permission stops that interrupted these reviews).
Problem and evidence
On PR #554 (work item #503, head be91c43 throughout), four review runs each published a complete review-contract comment between 2026-11-29 21:16 and 2026-11-30 15:30, although three of them ended with a permission_required stop and were relaunched with --from review. Every run numbered its findings from REV-001 again, so the same identifier names different findings:
| Comment | Review status | REV-001 means |
|---|---|---|
| 2026-11-29 21:16 | BLOCKED |
operator adoption is not bound to its stage |
| 2026-11-30 08:48 | REVIEW_PASSED_AWAITING_CI |
permission rerun after a quota handoff is checked against the stale quota checkpoint (medium) |
| 2026-11-30 15:07 | REVIEW_PASSED_AWAITING_CI |
adoption is not bound to the stage |
| 2026-11-30 15:30 | REVIEW_PASSED_AWAITING_CI |
stale-lock reclaim can evict a live writer's lock |
The next --from resolve stopped at once: resume no clean review reused: REV-001 identifies incompatible findings across comment history, and the resolve stage reported BLOCKED without changing anything. The runtime's ambiguity guard is right to refuse; the defect is upstream. Four findings of earlier runs, including the medium one, are absent from the latest comment, so the history was also the only place they were recorded. Recovering required deleting the cycle's own superseded comments by hand after archiving them.
Scope
- A review stage that stops before completion (permission stop, quota, interruption) does not publish its findings as a completed review; any partial output is marked incomplete and is never consumed by resolve.
- A finding has a stable, unique internal identity, separate from its visible
REV-xxxnumber. A later review of the same change request reuses the visible ID of a finding it matches and continues the sequence for new findings; it never renumbers fromREV-001. - A new completed review explicitly supersedes earlier ones in its contract metadata. Findings of a superseded review that the new one does not repeat are carried forward as open, or closed with a stated reason; they are never silently dropped.
- Resolve and rereview consume only the active completed review bound to its reviewed HEAD and run; superseded comments remain readable history without causing ambiguity.
- Publication is idempotent across retries, relaunches and executor handoffs.
- Update the page in
docs/that owns the review contract and finding IDs.
Acceptance criteria
- A review interrupted by a permission stop and relaunched with
--from reviewyields one active review whose finding IDs do not collide with the interrupted run's. - Two completed reviews of the same head that report an overlapping finding give it the same visible ID; a new finding gets the next unused ID.
- A finding reported by an earlier review and absent from a later one stays visible to resolve as open or carries an explicit closure reason.
--from resolveafter the four-comment history above proceeds without theincompatible findingsstop, and the guard still refuses a real ambiguity, with regression tests.- No change weakens the runtime's ambiguity guard.
Activity
docs: track #565 in the M1 roadmap row
docs: track #563 and #565 in the M1 roadmap row (#564)