fix: wave 5b review blockers - suppressed memory key, finalizer merge, zero-image guard
This commit is contained in:
@@ -85,6 +85,29 @@ def test_finalize_confirm_keeps_confirmed(monkeypatch, tmp_path):
|
||||
assert report["summary"]["agent_status"] == "complete"
|
||||
|
||||
|
||||
def test_finalize_preserves_verifier_suppressed(monkeypatch, tmp_path):
|
||||
"""Wave-5b (verifier) suppressions must survive review finalization and
|
||||
merge with review-rejected suppressions."""
|
||||
monkeypatch.setattr("backend.review.finalizer._draft_rfis", lambda kept: [])
|
||||
_write_job(
|
||||
str(tmp_path),
|
||||
prioritized=[{"issue_id": "AGENT-0001", "severity": "high"}],
|
||||
queue=[_blocking_item("AGENT-0001")],
|
||||
decisions=[{"review_item_id": "finding:AGENT-0001",
|
||||
"decision": "reject", "reason_code": "not_a_contradiction"}],
|
||||
)
|
||||
path = os.path.join(str(tmp_path), "conflicts.json")
|
||||
with open(path, encoding="utf-8") as f:
|
||||
report = json.load(f)
|
||||
report["suppressed_issues"] = [
|
||||
{"issue_id": "C1", "verification": {"status": "refuted"}}]
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
json.dump(report, f)
|
||||
final = finalize_review("job1", str(tmp_path))
|
||||
ids = [f["issue_id"] for f in final["suppressed_issues"]]
|
||||
assert ids == ["C1", "AGENT-0001"]
|
||||
|
||||
|
||||
def test_finalize_no_decision_keeps_unreviewed(monkeypatch, tmp_path):
|
||||
"""Non-blocking (audit) items don't need a decision; issue stays unreviewed."""
|
||||
monkeypatch.setattr("backend.review.finalizer._draft_rfis", lambda kept: [])
|
||||
|
||||
Reference in New Issue
Block a user