feat(awooop): expose ansible runtime readiness
This commit is contained in:
@@ -9,6 +9,7 @@ from src.services.awooop_ansible_audit_service import (
|
||||
build_ansible_truth,
|
||||
)
|
||||
from src.services.awooop_truth_chain_service import (
|
||||
_ansible_runtime_readiness,
|
||||
_automation_quality_score_bucket,
|
||||
_clean_row,
|
||||
_incident_fingerprints,
|
||||
@@ -687,10 +688,24 @@ def test_automation_quality_summary_denies_full_claim_when_unverified() -> None:
|
||||
"ansible_rollback_total": 0,
|
||||
"ansible_pending_check_mode_total": 1,
|
||||
}
|
||||
assert summary["ansible_runtime"]["playbook_root_present"] is True
|
||||
assert summary["ansible_runtime"]["inventory_present"] is True
|
||||
assert summary["ansible_runtime"]["playbook_count"] >= 1
|
||||
assert "ansible_playbook_binary_present" in summary["ansible_runtime"]
|
||||
assert summary["examples"][1]["incident_id"] == "INC-GAP"
|
||||
assert summary["examples"][1]["score_bucket"] == "yellow"
|
||||
|
||||
|
||||
def test_ansible_runtime_readiness_reports_check_mode_blockers() -> None:
|
||||
readiness = _ansible_runtime_readiness()
|
||||
|
||||
assert readiness["playbook_root_present"] is True
|
||||
assert readiness["inventory_present"] is True
|
||||
assert readiness["playbook_count"] >= 1
|
||||
assert isinstance(readiness["can_run_check_mode"], bool)
|
||||
assert isinstance(readiness["blockers"], list)
|
||||
|
||||
|
||||
def test_reconciliation_marks_consistent_resolved_execution() -> None:
|
||||
reconciliation = build_incident_reconciliation(
|
||||
incident={"incident_id": "INC-2", "status": "RESOLVED"},
|
||||
|
||||
Reference in New Issue
Block a user