fix(awooop): show diagnostic ops as non repair
All checks were successful
CD Pipeline / tests (push) Successful in 1m19s
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / build-and-deploy (push) Successful in 3m38s
CD Pipeline / post-deploy-checks (push) Successful in 2m5s

This commit is contained in:
Your Name
2026-05-31 14:50:01 +08:00
parent 0db345418f
commit 697fff96d8
4 changed files with 58 additions and 3 deletions

View File

@@ -1614,6 +1614,39 @@ def test_awooop_status_chain_marks_read_only_manual_gate() -> None:
assert chain["blockers"] == ["pending_human_approval"]
def test_awooop_status_chain_does_not_treat_audit_ops_as_repair() -> None:
chain = _build_awooop_status_chain(
incident_ids=["INC-20260530-88D960"],
source_id="INC-20260530-88D960",
truth_chain={
"truth_status": {
"current_stage": "execution_succeeded",
"stage_status": "success",
"needs_human": False,
"blockers": [],
},
"automation_quality": {
"verdict": "auto_repaired_verification_degraded",
"facts": {
"auto_repair_execution_records": 0,
"automation_operation_records": 1,
"effective_execution_records": 0,
"verification_result": "degraded",
"mcp_gateway_total": 22,
"knowledge_entries": 4,
},
"blockers": ["verification_recorded"],
},
},
remediation_history={"total": 0},
)
assert chain["repair_state"] == "diagnostic_or_audit_recorded"
assert chain["next_step"] == "manual_review_or_collect_repair_evidence"
assert chain["evidence"]["operation_records"] == 1
assert chain["evidence"]["auto_repair_records"] == 0
def test_legacy_mcp_timeline_summary_surfaces_tool_context() -> None:
record = {
"incident_id": "INC-20260514-F85F21",