fix(recovery): reopen controlled automation after failclosed regression
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
Code Review / ai-code-review (push) Has been cancelled
CD Pipeline / tests (push) Failing after 14m8s
Type Sync Check / check-type-sync (push) Successful in 42s
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-28 16:01:40 +08:00
parent ba054e698d
commit d7f56351f2
28 changed files with 731 additions and 1020 deletions

View File

@@ -22,7 +22,7 @@ def test_approval_response_exposes_incident_delivery_and_playbook_fields():
approval = ApprovalRequest(
id=UUID("11111111-1111-1111-1111-111111111111"),
action="kubectl rollout restart deployment/awoooi-api",
description="manual gate",
description="AI controlled gate",
risk_level=RiskLevel.MEDIUM,
requested_by="OpenClaw",
required_signatures=1,

View File

@@ -85,7 +85,7 @@ def test_outbound_timeline_title_labels_runbook_review() -> None:
"📄 <b>RUNBOOK REVIEW待審核</b>\nIncidentINC-1",
)
assert title == "TELEGRAMRunbook 待人工審"
assert title == "TELEGRAMRunbook 待 AI 受控複"
def test_outbound_timeline_title_labels_governance_alert() -> None:

View File

@@ -102,7 +102,7 @@ class TestWatchdogW6TrustDrift:
kept = trust_result.get("kept", 0)
violations.append(
f"Trust Drift 偵測到 {drifted} 個 Playbook 信任度低落"
f"auto-deprecated: {auto_deprecated},待人工審核: {kept}"
f"auto-deprecated: {auto_deprecated},待 AI 受控複核: {kept}"
)
assert len(violations) == 1
@@ -179,11 +179,11 @@ class TestWatchdogW6TrustDrift:
kept = trust_result.get("kept", 0)
violations.append(
f"Trust Drift 偵測到 {drifted} 個 Playbook 信任度低落"
f"auto-deprecated: {auto_deprecated},待人工審核: {kept}"
f"auto-deprecated: {auto_deprecated},待 AI 受控複核: {kept}"
)
assert "auto-deprecated: 4" in violations[0]
assert "人工審核: 1" in violations[0]
assert " AI 受控複核: 1" in violations[0]
# ─────────────────────────────────────────────────────────────────────────────
@@ -298,7 +298,7 @@ class TestSinglePgWritePerDriftScenario:
kept = result.get("kept", 0)
violations.append(
f"Trust Drift 偵測到 {drifted} 個 Playbook 信任度低落"
f"auto-deprecated: {auto_deprecated},待人工審核: {kept}"
f"auto-deprecated: {auto_deprecated},待 AI 受控複核: {kept}"
)
# W-6 透過 governance_agent — violations 有 1 筆