mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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:
@@ -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"
|
||||
|
||||
|
||||
@@ -495,7 +495,12 @@ async def test_qa_pass_path(
|
||||
assert str(after_claim.status) == Status.AWAITING_QA.value
|
||||
assert after_claim.assigned_to == qa_agent.id
|
||||
|
||||
env = await c.pass_review(qa_agent.id, task.id, notes=_QA_PASS_NOTES)
|
||||
env = await c.pass_review(
|
||||
qa_agent.id,
|
||||
task.id,
|
||||
notes=_QA_PASS_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 == Status.AWAITING_DOCUMENTATION.value
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ class _MockChoreographer:
|
||||
_agent_id: object,
|
||||
_task_id: object,
|
||||
_notes: object,
|
||||
_ac_verdicts: object = None,
|
||||
) -> Envelope:
|
||||
self._state["task_status"] = "awaiting_documentation"
|
||||
return Envelope.ok(
|
||||
|
||||
Reference in New Issue
Block a user