feat(loop): blocking review gate — adversarial findings gate the merge edge (v0.30.0)#70
Merged
Merged
Conversation
…e edge (v0.30.0)
Turns review from advisory (review_dispatch) into a GATE (plan M5), mirroring
the CI-bounce machinery:
- After open_review, run the host's adversarial code-review workflow
(ADR 0077, via runtime.state.STATE.workflow_run — no plugin import) on the
PR; the configured a2a reviewer is the fallback runner. Parse the findings
convention (graph.review.findings, imported lazily; absent → the gate goes
inert loudly, never guesses at prose).
- Blocking findings (blocker/major, not refuted) → findings stored on the
bead (_comment via set_review_substate), injected into the retry prompt
with the reviewed diff (the same carry-the-lesson levers as the CI bounce),
label changes-requested, requeue — bounded by review_fix_max (mirrors
ci_fix_max, same-tier: findings are fixable, not a capability ceiling).
- Exhaustion → flag_blocked ('needs human review') — never a silent merge.
- Sub-states ride as labels: review-pending / changes-requested. The PR
reconcile finishes an interrupted gate (review-pending on an in_review PR)
and calls out a human-override merge (changes-requested still set).
- Call-site is a single method invocation post-open_review, so attaching it
after ADR 0064's test-passing candidate selection is a one-line move.
Config: review_gate (default false), review_workflow (code-review),
review_fix_max (2). 7 new tests (bounce/budget/exhaustion/unrunnable/config/
url-parse); 289 passed; ruff clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #70 | feat(loop): blocking review gate — adversarial findings gate the merge edge (v0.30.0)
VERDICT: WARN (CI queued — non-terminal; approve-on-green policy promotes to APPROVED once test passes and no blocking threads remain)
CI Status
- test: ⏳ queued
Diff Review
- Adds
_review_gatetoloop.py(~140 lines): runs host's adversarialcode-reviewworkflow post-open_review, parses findings, bounces on blocker/major (bounded byreview_fix_max), exhausts toflag_blocked— mirrors the CI bounce pattern faithfully. _reconcile_prsgains resume logic for interrupted gates (in_review+review-pending) and cleanup/override-logging on MERGED/CLOSED.- New config:
review_gate(defaultfalse— safe opt-in),review_workflow(code-review),review_fix_max(2). _parse_pr_urlregex helper extracts(pr_number, owner/name)from GitHub PR URLs — guarded for non-GitHub inputs.
Observations
- LOW: clawpatch structural review returned zero findings — the gate reuses existing CI-bounce levers (
_ci_feedback,_ci_prior_diff) and the pattern is consistent with the surrounding code. - LOW (Gap): diff truncated at 532 of 532 lines —
store.pychanges (labels,set_review_substate), config parsing, and test files not fully visible. PR description confirms 289 passing and 7 new tests. - INFO: CI
teststill queued — the approve-on-green policy will promote this review to APPROVED automatically once all checks settle terminal-green. No action needed from the author on this pass.
— Quinn, QA Engineer
|
Submitted COMMENT review on |
mabry1985
pushed a commit
that referenced
this pull request
Jul 6, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M5 of the codified-delivery-loop plan (protoAgent
docs/plans/codified-delivery-loop.md). Turns review from advisory (review_dispatch) into a gate, mirroring the CI-bounce machinery it sits next to.The loop
open_review, run the host's adversarialcode-reviewworkflow (protoAgent ADR 0077) on the PR — reached viaruntime.state.STATE.workflow_run(published by the workflows plugin; no plugin import), with the configured a2arevieweras the fallback runner.graph.review.findings, lazy import). Blocking = severity blocker/major, verdict ≠ refuted.changes-requested, requeue. Bounded byreview_fix_max(mirrorsci_fix_max; same-tier — findings are fixable, not a capability ceiling).flag_blocked("needs human review"). Never a silent merge — and never a silent pass: an unrunnable gate leavesreview-pendingset and the PR reconcile retries it next poll; a host without the findings parser sends the gate loudly inert.Sub-states & reconcile
review-pending/changes-requested(managed bystore.set_review_substate, one at a time, findings comment attached)._reconcile_prs: finishes an interrupted gate (pending on an in_review PR), clears the bounce budget on MERGED/CLOSED, and logs a human-override merge (merged withchanges-requestedstill set) instead of pretending it didn't happen.Sequencing (ADR 0064)
The gate is one call post-
open_review— when execution-grounded candidate selection lands on the board face, moving it after test-passing selection is a one-line move.Config
review_gate(default false),review_workflow(code-review),review_fix_max(2).review_dispatchstays as the advisory alternative; the gate takes precedence when both are on.Tests
7 new (
test_loop.py): bounce carries findings into_build_prompt, clean/minor/refuted pass, exhaustion blocks without requeue, unrunnable leaves pending, config parse, PR-url parse. Full suite 289 passed, ruff clean. v0.30.0 lockstep.🤖 Generated with Claude Code