Skip to content

Interrupted reviews publish complete review comments and restart finding IDs at REV-001, so resolve stops on an ID clash #565

Backlog

Description

@datacas

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

  1. 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.
  2. A finding has a stable, unique internal identity, separate from its visible REV-xxx number. 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 from REV-001.
  3. 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.
  4. Resolve and rereview consume only the active completed review bound to its reviewed HEAD and run; superseded comments remain readable history without causing ambiguity.
  5. Publication is idempotent across retries, relaunches and executor handoffs.
  6. 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 review yields 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 resolve after the four-comment history above proceeds without the incompatible findings stop, and the guard still refuses a real ambiguity, with regression tests.
  • No change weakens the runtime's ambiguity guard.

Activity

  1. added
    bug
    priority: urgent
    P0
    on Nov 30, 2026
  2. added 2 commits that reference this issue on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0bugpriority: urgent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions