feat(web): clarify sealed slo observation state
This commit is contained in:
@@ -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} 目前樣本",
|
||||
|
||||
@@ -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} 目前樣本",
|
||||
|
||||
@@ -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
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{observationOnly && (
|
||||
<div style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
||||
gap: 10,
|
||||
alignItems: 'center',
|
||||
padding: '10px 11px',
|
||||
borderRadius: 6,
|
||||
border: `0.5px solid ${tone}40`,
|
||||
background: `${tone}10`,
|
||||
}}>
|
||||
<ShieldCheck size={16} style={{ color: tone, flexShrink: 0 }} />
|
||||
<div style={{ minWidth: 0 }}>
|
||||
<div style={{ fontFamily: 'Syne, sans-serif', fontSize: 12, fontWeight: 700, color: '#141413' }}>
|
||||
{t('observation.title')}
|
||||
</div>
|
||||
<div style={{ marginTop: 3, fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#4b5563', lineHeight: 1.45 }}>
|
||||
{t('observation.detail', { greenAt: projectedAt || t('observation.greenAtFallback') })}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'minmax(220px, 1.1fr) minmax(260px, 1.8fr)', gap: 14 }} className="slo-auto-diagnostics-grid">
|
||||
<div style={{ minWidth: 0 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 10, marginBottom: 8 }}>
|
||||
|
||||
@@ -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 誤擾
|
||||
|
||||
**背景**:
|
||||
|
||||
Reference in New Issue
Block a user