feat(awooop): expose execution evidence on incidents
All checks were successful
Code Review / ai-code-review (push) Successful in 17s
CD Pipeline / tests (push) Successful in 3m27s
CD Pipeline / build-and-deploy (push) Successful in 4m6s
CD Pipeline / post-deploy-checks (push) Successful in 1m33s

This commit is contained in:
Your Name
2026-05-20 15:19:48 +08:00
parent 312042ae6d
commit d4573cd00a
6 changed files with 197 additions and 0 deletions

View File

@@ -504,6 +504,41 @@ def test_awooop_status_chain_marks_verified_repair() -> None:
],
},
},
"execution": {
"automation_operation_log": [
{
"operation_type": "playbook_executed",
"status": "success",
"actor": "auto_repair_executor",
"input_action": "restart_service",
"input_executor": "ansible",
"input_playbook_id": "pb-host-restart",
"input_playbook_path": "infra/ansible/playbooks/188-ai-web.yml",
}
],
"ansible": {
"considered": True,
"records": [
{
"operation_type": "ansible_check_mode_executed",
"status": "success",
"playbook_path": "infra/ansible/playbooks/188-ai-web.yml",
"check_mode": "true",
}
],
"candidate_catalog": {
"candidates": [
{
"catalog_id": "ansible:188-ai-web",
"playbook_path": "infra/ansible/playbooks/188-ai-web.yml",
"risk_level": "medium",
"match_score": 3,
}
]
},
"not_used_reason": None,
},
},
},
remediation_history={
"total": 1,
@@ -531,6 +566,11 @@ def test_awooop_status_chain_marks_verified_repair() -> None:
assert chain["mcp"]["gateway"]["policy_enforced_total"] == 2
assert chain["mcp"]["legacy"]["total"] == 1
assert chain["mcp"]["top_tools"][0]["tool_name"] == "prometheus.query"
assert chain["execution"]["operation_total"] == 1
assert chain["execution"]["latest_executor"] == "ansible"
assert chain["execution"]["playbook_ids"] == ["pb-host-restart"]
assert chain["execution"]["ansible"]["considered"] is True
assert chain["execution"]["ansible"]["candidate_count"] == 1
def test_awooop_status_chain_marks_read_only_manual_gate() -> None: