fix(verifier): recognize rollout success evidence
All checks were successful
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / tests (push) Successful in 1m3s
CD Pipeline / build-and-deploy (push) Successful in 3m38s
CD Pipeline / post-deploy-checks (push) Successful in 1m30s

This commit is contained in:
Your Name
2026-05-14 00:37:31 +08:00
parent c42b2dfe06
commit 5fb73a5612
4 changed files with 29 additions and 3 deletions

View File

@@ -142,6 +142,12 @@ class TestClassifyTool:
h in reg.incident_type_hints for h in ["Pod", "Deploy", "Node"]
)
def test_rollout_tool_is_high_priority_d1(self):
reg = _classify_tool(_make_tool("k8s_watch_rollout"), self._provider())
assert SensorDimension.D1_K8S_STATE in reg.dimensions
assert reg.priority == 1
assert "Deploy" in reg.incident_type_hints
def test_ssh_type_hints(self):
reg = _classify_tool(_make_tool("ssh_run"), self._provider())
assert any(h in reg.incident_type_hints for h in ["Host", "Docker"])

View File

@@ -76,6 +76,16 @@ class TestAssessRecovery:
post = {"pod": {"containers": "1/1"}}
assert _assess_recovery(None, post, "scale_up") == "success"
def test_rollout_success_is_success(self):
post = {
"k8s_watch_rollout": {
"deployment": "awoooi-auto-repair-canary",
"success": True,
"status": 'deployment "awoooi-auto-repair-canary" successfully rolled out',
}
}
assert _assess_recovery(None, post, "auto_repair_playbook:PB-CANARY") == "success"
def test_crashloopbackoff_is_failed(self):
post = {"pod": {"status": "CrashLoopBackOff"}}
assert _assess_recovery(None, post, "restart_service") == "failed"