Enforce single terminal review decision per PR review run #211

Closed
opened 2026-07-05 15:31:48 -05:00 by jcwalker3 · 0 comments
Owner

Problem

Reviewer agents can submit conflicting review states on the same PR in a single review run, such as APPROVE followed by REQUEST_CHANGES. This creates confusing audit history and may trigger automation based on the earlier state.

Observed failure

The reviewer of PR #203 posted an APPROVE, then later posted REQUEST_CHANGES in the same run.

Required wall

A reviewer run may submit only one terminal review decision for a selected PR: APPROVE, REQUEST_CHANGES, or COMMENT. Once submitted, no second terminal review state may be posted in the same run unless the operator explicitly authorizes a correction.

Acceptance criteria

  • Add per-run review mutation state tracking.
  • Block second terminal review submissions in the same run by default.
  • Add a correction mode requiring explicit reason, prior review ID/state, and operator authorization.
  • Final handoff must include terminal review count and selected final state.

Related

  • Origin incident: PR #203 review run (APPROVE followed by REQUEST_CHANGES in one run).
  • #179 — reviewer A-bar proofs in review_proofs.py; per-run terminal-decision tracking belongs in the same proof family (gitea_review_pr / gitea_submit_pr_review path and CLI review_pr.py).
  • #197 — hard-stop purity after capability denial (same one-run-one-outcome discipline, capability side).
### Problem Reviewer agents can submit conflicting review states on the same PR in a single review run, such as APPROVE followed by REQUEST_CHANGES. This creates confusing audit history and may trigger automation based on the earlier state. ### Observed failure The reviewer of PR #203 posted an APPROVE, then later posted REQUEST_CHANGES in the same run. ### Required wall A reviewer run may submit only one terminal review decision for a selected PR: APPROVE, REQUEST_CHANGES, or COMMENT. Once submitted, no second terminal review state may be posted in the same run unless the operator explicitly authorizes a correction. ### Acceptance criteria * Add per-run review mutation state tracking. * Block second terminal review submissions in the same run by default. * Add a correction mode requiring explicit reason, prior review ID/state, and operator authorization. * Final handoff must include terminal review count and selected final state. ### Related * Origin incident: PR #203 review run (APPROVE followed by REQUEST_CHANGES in one run). * #179 — reviewer A-bar proofs in `review_proofs.py`; per-run terminal-decision tracking belongs in the same proof family (`gitea_review_pr` / `gitea_submit_pr_review` path and CLI `review_pr.py`). * #197 — hard-stop purity after capability denial (same one-run-one-outcome discipline, capability side).
jcwalker3 added the status:in-progress label 2026-07-05 15:48:41 -05:00
sysadmin removed the status:in-progress label 2026-07-05 19:19:36 -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#211