fix(sre): finalize local automation release candidate
Some checks failed
CD Pipeline / select-latest-carrier (push) Successful in 1m33s
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 3m28s
CD Pipeline / revalidate-deploy-carrier (push) Successful in 35s
CD Pipeline / build-and-deploy (push) Failing after 39m13s
CD Pipeline / revalidate-post-deploy-carrier (push) Failing after 10m44s
AI 技術雷達監控 / ai-technology-watch (push) Failing after 11m56s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Failing after 48s
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-19 03:57:32 +08:00
parent 9d87173d03
commit c0afb10861
7 changed files with 57 additions and 13 deletions

View File

@@ -133,7 +133,8 @@ class RecommendedAction:
label: str # UI 顯示文字(如「查 Pod 日誌」)
emoji: str # UI 圖示(如「📋」)
mcp_provider: Literal[ # MCP provider 限制在已知清單
"k8s", "ssh", "prometheus", "signoz", "database", "internal"
"k8s", "ssh", "prometheus", "signoz", "database", "internal",
"controlled",
]
mcp_tool: str # MCP tool 名(必須在 B2 allowlist
params: dict[str, str] # 參數模板(支援 {labels.xxx} / {incident_id}

View File

@@ -92,7 +92,7 @@ _CALLBACK_SPEC_PATH = Path(__file__).parent.parent / "services" / "callback_acti
# 有效的 mcp_provider 清單(與 RecommendedAction schema 對應)
_VALID_MCP_PROVIDERS = frozenset(
{"k8s", "ssh", "prometheus", "signoz", "database", "internal"}
{"k8s", "ssh", "prometheus", "signoz", "database", "internal", "controlled"}
)
# 有效的 risk 等級(與 RecommendedAction schema 對應)
@@ -710,7 +710,7 @@ blast_radius 參考:
recommended_actions 規則(北極星 §1.1 修復多樣性):
- 第一個動作必須是診斷/查看類(低風險),讓 SRE 先確認情況
- 不要全部是 restart 類動作
- mcp_provider 必須是以下之一k8s | ssh | prometheus | signoz | database | internal
- mcp_provider 必須是以下之一k8s | ssh | prometheus | signoz | database | internal | controlled
- risk 必須是以下之一low | medium | high | critical
- params 中可使用模板:{{labels.namespace}} / {{labels.pod}} / {{incident_id}}