feat(agents): route high risk through controlled automation
Some checks failed
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Failing after 1m8s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
Some checks failed
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Failing after 1m8s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
This commit is contained in:
@@ -7,7 +7,7 @@ Runbook Generator - Phase 25 P1 Knowledge Auto-Harvesting
|
||||
設計原則:
|
||||
- 非阻塞:asyncio.create_task() 呼叫,絕不影響 AutoRepair 主流程
|
||||
- 失敗靜默:生成失敗只記 log,不拋例外
|
||||
- DRAFT/PUBLISHED:成功 → DRAFT(需人工審核),失敗 → PUBLISHED(直接封鎖)
|
||||
- DRAFT/PUBLISHED:成功 → DRAFT(AI controlled review queue),失敗 → PUBLISHED(直接封鎖)
|
||||
|
||||
版本: v1.1
|
||||
建立: 2026-04-04 (台北時區)
|
||||
@@ -89,9 +89,9 @@ def _section_preview(content: str, title_keyword: str, *, fallback: str) -> str:
|
||||
|
||||
|
||||
def _step_preview(content: str) -> str:
|
||||
preview = _section_preview(content, "執行", fallback="待審核 Runbook 執行步驟")
|
||||
preview = _section_preview(content, "執行", fallback="待 controlled review 的 Runbook 執行步驟")
|
||||
if any(token in preview for token in ("{host}", "{target}", "Unsupported scheme", "Invalid component name")):
|
||||
return "含 placeholder 或不支援的執行步驟,需人工修正後才能發布"
|
||||
return "含 placeholder 或不支援的執行步驟,需 AI 修補 / break-glass 後才能發布"
|
||||
return _shorten(preview, 120)
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ def format_runbook_review_card(
|
||||
"──────────────────────\n"
|
||||
f"📋 Incident:<code>{_html(incident_id)}</code>\n"
|
||||
f"🧩 受影響服務:<code>{_html(services)}</code>\n"
|
||||
"🧠 知識狀態:<b>DRAFT|需人工審核</b>\n"
|
||||
"🧠 知識狀態:<b>DRAFT|AI controlled review</b>\n"
|
||||
f"🗂️ Entry ID:<code>{_html(entry_id)}</code>\n\n"
|
||||
"🧾 <b>內容摘要</b>\n"
|
||||
f"├ 症狀:{_html(symptom)}\n"
|
||||
|
||||
Reference in New Issue
Block a user