feat(qa): require a per-acceptance-criterion verdict before pass_review

QA may no longer pass a task with a single gestalt approval — pass_review now
takes ac_verdicts (one verification entry per acceptance criterion) and the
gateway rejects a pass that does not cover every criterion. If a criterion does
not hold, QA fails the review instead. The verdicts are folded into the
persisted qa_notes for the audit trail. Threaded through the flow MCP tool,
the HTTP request schema, and the route; QA prompt updated.
This commit is contained in:
Renn F
2026-06-14 04:44:21 +02:00
parent 8affb283f5
commit 2db11c7833
9 changed files with 174 additions and 10 deletions
@@ -494,7 +494,12 @@ async def test_full_chain_through_doc_handoff(
"Reviewed the diff; route returns 200 OK with timestamp. Tests cover "
"both acceptance criteria. Approving."
)
env = await c.pass_review(qa_agent.id, task.id, notes=qa_notes)
env = await c.pass_review(
qa_agent.id,
task.id,
notes=qa_notes,
ac_verdicts=[f"verified: {crit}" for crit in task.acceptance_criteria],
)
assert env.error is None, f"pass_review failed: {env.message}"
assert env.status == "awaiting_documentation"