fix(web): 修正 P2-403G 治理頁欄位對齊
Some checks failed
CD Pipeline / tests (push) Successful in 1m27s
Code Review / ai-code-review (push) Successful in 15s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-12 01:09:47 +08:00
parent 6ff0c2e526
commit 32fdce4cd9
5 changed files with 63 additions and 16 deletions

View File

@@ -1,3 +1,28 @@
## 2026-06-12P2-403G Governance UI 欄位對齊與紅線顯示修補
**背景**P2-403G Runtime Write Gate Review 已正式部署後,正式治理頁 live DOM 檢查發現 `write_gate_review.owner_agent` 與 snapshot 實際 schema 不一致,導致前端 i18n 產生 `agents.undefined` console error同時 P2-402 主動營運能力卡仍直接顯示 `secret_value_handling_forbidden` 原始 gate id。這兩者都不影響 runtime gate 真相,但治理頁應顯示可讀狀態與安全標籤,不應讓 operator 看到 undefined 或看似內部欄位名的 raw id。
**完成**
- `AiAgentRuntimeWriteGateReviewSnapshot` 前端型別已對齊 committed snapshot`write_gate_review` 不再宣告不存在的 `owner_agent` / `review_id` / `display_name` / `status``write_targets` 改用實際欄位 `required_before_write``blocked_write_action`
- Governance automation inventory 的 P2-403G review chip 改為 `只讀審查`,不再讀不存在的 agent 欄位。
- P2-403G write target 內容改顯示 `required_before_write``blocked_write_action`,避免空白 / undefined。
- P2-402 proactive approval gate 顯示改走 i18n label`secret_value_handling_forbidden` 顯示為 `機密值處理禁止`
- `zh-TW.json` / `en.json` 維持繁中鏡像,同步新增 proactive approval gate 與 runtime write gate review label。
**本地驗證**
- `python3 -m json.tool apps/web/messages/zh-TW.json` / `apps/web/messages/en.json`:通過。
- zh-TW / en message mirror`True`
- 靜態 grep`write_gate_review.owner_agent``target.operator_instruction``target.blocked_runtime_action``agents.undefined` 命中 `0`
- `pnpm --filter @awoooi/web typecheck`:通過。
- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work NEXT_PRIVATE_BUILD_WORKER_COUNT=1 SENTRY_SUPPRESS_GLOBAL_ERROR_HANDLER_FILE_WARNING=1 pnpm --filter @awoooi/web build`:通過;`92/92` static pages`/zh-TW/governance` First Load JS `397 kB`
- 本機 `next start` 可載入治理 route但 local origin 對正式 API / SSE 仍停在 `無法載入自動化盤點快照`;正式 DOM 驗證需 deploy 後以 `https://awoooi.wooo.work` 重跑。
**正式站驗證**:待 code commit 觸發 Gitea CD 後補。
**邊界**:本段未寫 KM、未更新 PlayBook trust、未寫 timeline learning、未寫 replay score、未發 Telegram、未寫 Gateway queue、未啟動 runtime worker、未讀 secret value、未 SSH、未 kubectl、未 active scan、未新增任何前端執行按鈕。
## 2026-06-12IwoooS P1-4 Monitoring / alerting / observability repo-only 清冊
**背景**統帥要求所有重要配置都要被資安控管Prometheus / Alertmanager / Grafana / SigNoz / Sentry / Langfuse / OTEL / Telegram notification route 會直接影響即時資安事件是否能被發現、路由、降噪與送達。本段延續「先建立框架、只讀證據、低摩擦流程,再階段性收攏」原則,只做 repo-only 清冊,不碰 live monitoring stack、不 reload、不發 Telegram、不建立 silence。