fix(alerts): clarify execution result verdict
This commit is contained in:
@@ -1204,6 +1204,11 @@ class ApprovalExecutionService:
|
||||
if isinstance(outcome.get("notification"), dict)
|
||||
else {}
|
||||
)
|
||||
execution_result = (
|
||||
outcome.get("execution_result")
|
||||
if isinstance(outcome.get("execution_result"), dict)
|
||||
else {}
|
||||
)
|
||||
channels = notification.get("channels") if isinstance(notification.get("channels"), list) else []
|
||||
lines = [
|
||||
f"{icon} <b>處置結果</b> | <b>{html.escape(title)}</b>",
|
||||
@@ -1214,6 +1219,12 @@ class ApprovalExecutionService:
|
||||
f"├ 人工: <code>{'yes' if outcome.get('needs_human') else 'no'}</code>",
|
||||
f"├ 通知: <code>{html.escape(','.join(str(item) for item in channels) or 'none')}</code>",
|
||||
f"└ 下一步: <code>{html.escape(str(outcome.get('next_action') or '--'))}</code>",
|
||||
"🧪 <b>執行判定</b>",
|
||||
f"├ 完成狀態: <code>{html.escape(str(execution_result.get('completion_status') or 'unknown'))}</code>",
|
||||
f"├ 指令狀態: <code>{html.escape(str(execution_result.get('command_status') or 'unknown'))}</code>",
|
||||
f"├ 修復結果: <code>{html.escape(str(execution_result.get('repair_status') or 'unknown'))}</code>",
|
||||
f"└ 失敗判定: <code>{html.escape(str(execution_result.get('failure_status') or 'unknown'))}</code>",
|
||||
f"判讀: {html.escape(str(execution_result.get('summary_zh') or '尚未能判定執行是否完成或失敗'))}",
|
||||
f"⚙️ Action: <code>{html.escape((approval.action or '')[:220])}</code>",
|
||||
]
|
||||
if error:
|
||||
|
||||
Reference in New Issue
Block a user