fix(api): normalize missing automation blockers
All checks were successful
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m35s
E2E Health Check / e2e-health (push) Successful in 30s
CD Pipeline / build-and-deploy (push) Successful in 4m32s
CD Pipeline / post-deploy-checks (push) Successful in 1m36s
All checks were successful
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m35s
E2E Health Check / e2e-health (push) Successful in 30s
CD Pipeline / build-and-deploy (push) Successful in 4m32s
CD Pipeline / post-deploy-checks (push) Successful in 1m36s
This commit is contained in:
@@ -1803,6 +1803,8 @@ def test_awooop_status_chain_does_not_treat_ansible_check_mode_as_repair() -> No
|
||||
chain["operator_outcome"]["execution_result"]["completion_status"]
|
||||
== "dry_run_completed_no_apply"
|
||||
)
|
||||
assert "verification_missing" in chain["blockers"]
|
||||
assert "verification_recorded" not in chain["blockers"]
|
||||
assert chain["automation_handoff"]["kind"] == "ansible_check_mode_apply_gate"
|
||||
assert chain["automation_handoff"]["status"] == "owner_review_required"
|
||||
assert chain["automation_handoff"]["runtime_execution_authorized"] is False
|
||||
|
||||
@@ -8,6 +8,38 @@ from src.services.approval_execution import ApprovalExecutionService
|
||||
from src.services.operator_outcome import build_operator_outcome
|
||||
|
||||
|
||||
def test_operator_outcome_normalizes_missing_evidence_blockers() -> None:
|
||||
outcome = build_operator_outcome(
|
||||
truth_status={
|
||||
"current_stage": "execution_succeeded",
|
||||
"stage_status": "success",
|
||||
"needs_human": True,
|
||||
"blockers": [],
|
||||
},
|
||||
automation_quality={
|
||||
"verdict": "execution_unverified",
|
||||
"facts": {
|
||||
"effective_execution_records": 1,
|
||||
"auto_repair_execution_records": 0,
|
||||
"verification_result": None,
|
||||
"knowledge_entries": 0,
|
||||
},
|
||||
"blockers": [
|
||||
"auto_repair_recorded",
|
||||
"verification_recorded",
|
||||
"learning_recorded",
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
assert "auto_repair_missing" in outcome["blockers"]
|
||||
assert "verification_missing" in outcome["blockers"]
|
||||
assert "learning_missing" in outcome["blockers"]
|
||||
assert "auto_repair_recorded" not in outcome["blockers"]
|
||||
assert "verification_recorded" not in outcome["blockers"]
|
||||
assert "learning_recorded" not in outcome["blockers"]
|
||||
|
||||
|
||||
def test_operator_outcome_marks_diagnostic_only_as_manual_action_required() -> None:
|
||||
outcome = build_operator_outcome(
|
||||
truth_status={
|
||||
|
||||
Reference in New Issue
Block a user