Enforce hard-stop after terminal review mutation #332

Closed
opened 2026-07-07 02:16:34 -05:00 by jcwalker3 · 1 comment
Owner

Problem

Reviewer LLMs can consume a live review mutation on one PR, then continue reviewing another PR in the same session. This caused a run to submit REQUEST_CHANGES on PR #286, then continue validating PR #287, only to be blocked because the session review-mutation budget had already been consumed.

Required behavior

After any live terminal review mutation, the reviewer session must stop unless the next operation is the authorized merge sequence for the same selected PR after an approval.

Acceptance criteria

  • If a reviewer submits REQUEST_CHANGES, the run stops immediately and produces a final report.
  • If a reviewer submits COMMENT-only feedback that is considered a live review mutation, the run stops unless project policy explicitly allows continuation.
  • If a reviewer approves the selected PR, the run may continue only to merge-preflight and merge for that same PR.
  • The run may never mutate one PR and then continue reviewing, approving, or merging another PR.
  • Skipped PRs must not receive live review mutations.
  • If an earlier PR already has unresolved REQUEST_CHANGES at the same head SHA, the reviewer must not duplicate the request-changes review.
  • Final report must identify the terminal mutation and state why the run stopped or why same-PR merge continuation was allowed.
## Problem Reviewer LLMs can consume a live review mutation on one PR, then continue reviewing another PR in the same session. This caused a run to submit REQUEST_CHANGES on PR #286, then continue validating PR #287, only to be blocked because the session review-mutation budget had already been consumed. ## Required behavior After any live terminal review mutation, the reviewer session must stop unless the next operation is the authorized merge sequence for the same selected PR after an approval. ## Acceptance criteria * If a reviewer submits REQUEST_CHANGES, the run stops immediately and produces a final report. * If a reviewer submits COMMENT-only feedback that is considered a live review mutation, the run stops unless project policy explicitly allows continuation. * If a reviewer approves the selected PR, the run may continue only to merge-preflight and merge for that same PR. * The run may never mutate one PR and then continue reviewing, approving, or merging another PR. * Skipped PRs must not receive live review mutations. * If an earlier PR already has unresolved REQUEST_CHANGES at the same head SHA, the reviewer must not duplicate the request-changes review. * Final report must identify the terminal mutation and state why the run stopped or why same-PR merge continuation was allowed.
jcwalker3 added the status:in-progress label 2026-07-07 03:22:31 -05:00
Author
Owner

Claimed. Branch: feat/issue-332-terminal-review-hard-stop. Worktree: branches/feat-issue-332-terminal-review-hard-stop. Lock taken via gitea_lock_issue (fail-closed check passed).

Planned slice: extend the existing single-terminal-decision machinery (#211/PR #214) to session-level hard-stop semantics —

  • after a live REQUEST_CHANGES/COMMENT terminal mutation, all further review/merge/final-decision mutations fail closed with stop guidance
  • after APPROVE, only merge-preflight/merge for the SAME PR is permitted; any other PR's review/merge mutations fail closed
  • duplicate REQUEST_CHANGES suppression when an unresolved request-changes exists at the same head SHA
  • tests per acceptance criteria; final-report guidance naming the terminal mutation and the continuation rule applied
Claimed. Branch: `feat/issue-332-terminal-review-hard-stop`. Worktree: `branches/feat-issue-332-terminal-review-hard-stop`. Lock taken via `gitea_lock_issue` (fail-closed check passed). Planned slice: extend the existing single-terminal-decision machinery (#211/PR #214) to session-level hard-stop semantics — - after a live REQUEST_CHANGES/COMMENT terminal mutation, all further review/merge/final-decision mutations fail closed with stop guidance - after APPROVE, only merge-preflight/merge for the SAME PR is permitted; any other PR's review/merge mutations fail closed - duplicate REQUEST_CHANGES suppression when an unresolved request-changes exists at the same head SHA - tests per acceptance criteria; final-report guidance naming the terminal mutation and the continuation rule applied
sysadmin removed the status:in-progress label 2026-07-07 04:09:21 -05:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#332