From 35341cdebfb3cd504a82a15110aba3443afae4d2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Jun 2026 19:05:28 +0800 Subject: [PATCH] feat(web): clarify sealed slo observation state --- apps/web/messages/en.json | 7 ++++- apps/web/messages/zh-TW.json | 7 ++++- .../app/[locale]/governance/tabs/slo-tab.tsx | 25 ++++++++++++++++ docs/LOGBOOK.md | 30 +++++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index c423282a..92aac771 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -2200,12 +2200,17 @@ "groupCount": "{count} 次", "status": { "green": "已回綠", - "sealed_waiting_window": "已封口,等待視窗", + "sealed_waiting_window": "已封口,觀察中", "needs_investigation": "仍需調查", "insufficient_diagnostics": "診斷不足", "diagnostics_unavailable": "診斷不可用", "unknown": "狀態待查" }, + "observation": { + "title": "處置結論:觀察中,不需人工介入", + "detail": "已知失敗來源已封口,待查群組為 0;W-1 不再升級 META,預估 {greenAt} 回綠。", + "greenAtFallback": "rolling window" + }, "stat": { "successRate": "成功率", "successRateDetail": "{success}/{total} 目前樣本", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index c423282a..92aac771 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -2200,12 +2200,17 @@ "groupCount": "{count} 次", "status": { "green": "已回綠", - "sealed_waiting_window": "已封口,等待視窗", + "sealed_waiting_window": "已封口,觀察中", "needs_investigation": "仍需調查", "insufficient_diagnostics": "診斷不足", "diagnostics_unavailable": "診斷不可用", "unknown": "狀態待查" }, + "observation": { + "title": "處置結論:觀察中,不需人工介入", + "detail": "已知失敗來源已封口,待查群組為 0;W-1 不再升級 META,預估 {greenAt} 回綠。", + "greenAtFallback": "rolling window" + }, "stat": { "successRate": "成功率", "successRateDetail": "{success}/{total} 目前樣本", diff --git a/apps/web/src/app/[locale]/governance/tabs/slo-tab.tsx b/apps/web/src/app/[locale]/governance/tabs/slo-tab.tsx index e1b9987f..68637325 100644 --- a/apps/web/src/app/[locale]/governance/tabs/slo-tab.tsx +++ b/apps/web/src/app/[locale]/governance/tabs/slo-tab.tsx @@ -281,6 +281,7 @@ function closureStatusKey(value?: string | null): string { function diagnosticTone(status?: string | null, openGroups = 0): string { if (openGroups > 0 || status === 'needs_investigation') return '#FF3300' if (status === 'green') return '#22C55E' + if (status === 'sealed_waiting_window' && openGroups === 0) return '#0EA5E9' if (status === 'diagnostics_unavailable') return '#87867f' return '#F59E0B' } @@ -451,6 +452,7 @@ function AutoExecuteDiagnosticsPanel({ diagnostics }: { diagnostics?: AutoExecut const projectedAt = formatShortDate(diagnostics?.projected_green_at) const rateLabel = rate == null ? '--' : `${(rate * 100).toFixed(1)}%` const thresholdLabel = `${(threshold * 100).toFixed(0)}%` + const observationOnly = diagnostics?.status === 'sealed_waiting_window' && openGroups === 0 const statItems = [ { key: 'successRate', icon: CheckCircle2, value: rateLabel, detail: t('stat.successRateDetail', { success, total }) }, @@ -498,6 +500,29 @@ function AutoExecuteDiagnosticsPanel({ diagnostics }: { diagnostics?: AutoExecut + {observationOnly && ( +
+ +
+
+ {t('observation.title')} +
+
+ {t('observation.detail', { greenAt: projectedAt || t('observation.greenAtFallback') })} +
+
+
+ )} +
diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index bdbacaf1..04c9a8d9 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,33 @@ +## 2026-06-01|治理 SLO 前端顯示已封口觀察中 + +**背景**: + +- W-1 後端 watchdog 已把 `sealed_waiting_window + open_failure_group_count=0` 改成 observation-only,不再推 `META SYSTEM | 飛輪核心異常`。 +- 前端治理 SLO 面板原本只顯示「已封口,等待視窗」,operator 還是需要自己推理「是否需要人工介入、是否還會升級 META」。 + +**本次調整**: + +- `apps/web/src/app/[locale]/governance/tabs/slo-tab.tsx`: + - `sealed_waiting_window` 且待查群組為 `0` 時,改用藍色 observation tone。 + - 在自動修復紅燈診斷卡片加入短版處置結論:觀察中、不需人工介入、W-1 不再升級 META、預估回綠時間。 +- `apps/web/messages/zh-TW.json` / `en.json`: + - `sealed_waiting_window` 顯示改成「已封口,觀察中」。 + - 新增 observation conclusion 文案;英文語系仍維持繁中文案鏡像。 + +**驗證**: + +- `node -e "JSON.parse(...zh-TW/en...)"` → `json ok` +- `pnpm --filter @awoooi/web typecheck` +- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work NEXT_PRIVATE_BUILD_WORKER_COUNT=1 pnpm --filter @awoooi/web build` +- `python3 scripts/security/security-mirror-progress-guard.py --root .` → `SECURITY_MIRROR_PROGRESS_GUARD_OK` +- `git diff --check` + +**目前整體進度(本階段完成後)**: + +- W-1 前後端觀察中語義:約 `97%`;後端已降噪,前端也能直接看出不需人工介入,剩餘需部署後 browser readback。 +- W-1 自動修復 SLO 可解釋化:約 `93%`;診斷、Meta 降噪與治理面板已對齊。 +- 完整 AI 自動化飛輪總進度:維持 `61%`;這是操作介面清晰度提升,不新增 verified auto-repair 樣本。 + ## 2026-06-01|W-1 已封口 SLO 改為觀察中,停止 Meta 誤擾 **背景**: