feat(awooop): expose execution evidence on incidents
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user