From 30bf5d979efd7bc1a583f33cc7c651e70e4693b3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jun 2026 16:03:23 +0800 Subject: [PATCH] =?UTF-8?q?docs(governance):=20=E8=A8=98=E9=8C=84=20P1-007?= =?UTF-8?q?=20=E6=AD=A3=E5=BC=8F=E9=A9=97=E8=AD=89=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/messages/en.json | 4 +- apps/web/messages/zh-TW.json | 4 +- .../tabs/automation-inventory-tab.tsx | 6 +- docs/LOGBOOK.md | 79 +++++++++++++++++++ ...-04-15-MASTER-ai-autonomous-flywheel-v2.md | 6 ++ 5 files changed, 94 insertions(+), 5 deletions(-) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index f55952ac0..787f630c8 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -3456,7 +3456,9 @@ }, "labels": { "transcriptAllowed": "conversation_display={value}", - "redactionRequired": "redaction_required={value}" + "redactionRequired": "redaction_required={value}", + "forbiddenFieldCount": "已隔離欄位 {count} 個", + "noRawInternalFields": "不顯示內部欄位名" }, "decisions": { "suppress_immediate_success": "成功抑制", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index f55952ac0..787f630c8 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -3456,7 +3456,9 @@ }, "labels": { "transcriptAllowed": "conversation_display={value}", - "redactionRequired": "redaction_required={value}" + "redactionRequired": "redaction_required={value}", + "forbiddenFieldCount": "已隔離欄位 {count} 個", + "noRawInternalFields": "不顯示內部欄位名" }, "decisions": { "suppress_immediate_success": "成功抑制", diff --git a/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx b/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx index 2bdb3de0a..e6996857a 100644 --- a/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx +++ b/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx @@ -634,6 +634,7 @@ export function AutomationInventoryTab() { const serviceHealthActionRequiredRules = serviceHealthNotificationPolicy.rollups.action_required_rule_ids.length const serviceHealthNotificationAllowedCount = serviceHealthNotificationPolicy.rollups.notification_send_allowed_count const serviceHealthRedactionCategoryCount = serviceHealthNotificationPolicy.display_redaction_contract.forbidden_frontend_content.length + const serviceHealthForbiddenFieldCount = serviceHealthNotificationPolicy.message_template_contract.forbidden_fields.length const serviceHealthRedactionLocked = ( serviceHealthNotificationPolicy.display_redaction_contract.conversation_transcript_display_allowed === false && serviceHealthNotificationPolicy.display_redaction_contract.redaction_required === true @@ -2257,9 +2258,8 @@ export function AutomationInventoryTab() { })}
- {serviceHealthNotificationPolicy.message_template_contract.forbidden_fields.map(field => ( - - ))} + +
diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 762203eba..2b11dc2d5 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,82 @@ +## 2026-06-05|P1-007 服務健康失敗限定通知合約正式上線 + +**背景**:接續 P1-006 服務健康證據卡正式驗證後,P1-007 已建立 failure-only Telegram / AwoooP 通知合約。本段只做 committed policy / API / UI 顯示與正式驗證;不發送 Telegram / AwoooP、不做 live probe、不重啟服務、不改 endpoint、不讀 secret、不開 runtime gate。 + +**正式鏈路**: +- Code commit:`5c2ac4d5 feat(governance): 新增服務健康失敗限定通知合約`。 +- 文案 / redaction 修正:`d2963c16 fix(governance): 清理服務健康通知合約可見文案`、`d66effe6 fix(governance): 同步服務健康通知紅線契約`。 +- Deploy marker:`5eafe0d0 chore(cd): deploy d66effe [skip ci]`。 +- Gitea code-review / CD:P1-007 code-review / CD 成功;redaction 修正 code-review / CD 成功。 + +**Production API readback**: +- `/api/v1/health`:`200 healthy`、environment `prod`、mock_mode `false`。 +- `/api/v1/agents/automation-backlog-snapshot`:current `P1-007`、next `P2-004`、overall `92%`、done `23/25`。 +- `/api/v1/agents/automation-inventory-snapshot`:current `P1-007`、next `P2-004`、tasks `33`、read-only allowed `30`。 +- `/api/v1/agents/service-health-failure-notification-policy`:`service_health_failure_notification_policy_v1`、current `P1-007`、next `P2-004`、rules `7`、成功降噪 `2`、action-required `2`、failure escalation `3`、notification_send / live_probe / runtime_execution 全為 `false`、conversation transcript display `false`、redaction required `true`。 + +**Production browser smoke**: +- Governance desktop `1440x1000`:`https://awoooi.wooo.work/zh-TW/governance?tab=automation-inventory&_v=5eafe0d0-p1-007-prod-desktop` 通過;`服務健康失敗限定通知合約`、`成功降噪`、`失敗升級`、`訊息欄位合約`、`不可誤讀合約`、`P1-007`、`P2-004`、`92%`、`成功不洗版`、`建立處置` 可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`、內容危險操作入口 `0`、錯誤文字 `0`。 +- Governance mobile `390x844`:同上必要文案可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`、內容危險操作入口 `0`、錯誤文字 `0`。 +- IwoooS desktop / mobile:`IwoooS`、`只讀`、`版本證據` 可見;`工作視窗`、`對話內容`、`批准!繼續`、`AwoooP Session`、`PR #117`、`codex/security`、`LOGBO同意`、`跨工作階段`、`資安工作階段` 全未命中;`horizontalOverflow=0`、overflowing elements `0`。 +- 截圖:`/tmp/awoooi-p1-007-notification-policy-prod-desktop-5eafe0d0.png`、`/tmp/awoooi-p1-007-notification-policy-prod-mobile-5eafe0d0.png`、`/tmp/awoooi-iwooos-copy-prod-desktop-5eafe0d0.png`、`/tmp/awoooi-iwooos-copy-prod-mobile-5eafe0d0.png`。 + +**完成度**: +- P1-007 正式站:`100%`。 +- AI Agent 自動化工作包:`92%`。 +- P1:`100%`。 +- IwoooS 整體仍維持 `64%`;active runtime gate 仍 `0`;S4.9 owner response gate 仍 `0%`。 + +**邊界**: +- 這不是通知發送批准;成功 smoke / verified 狀態仍不即時通知。 +- Telegram / AwoooP 發送、live probe、service restart、endpoint / ConfigMap 修改、workflow / deploy / reload、runtime execution、secret payload read 全部仍未批准。 + +**下一步**: +1. P2-004:配置優化主線,保持 read-only / approval gate。 + +## 2026-06-05|P1-007 正式驗證與 IwoooS 工作視窗文案紅線 + +**背景**:接續 P1-007 服務健康失敗限定通知合約本地完成後,補正式部署、API / UI readback,並處理 IwoooS / Governance 前端不得顯示工作視窗對話內容的紅線。本段仍只處理 committed policy、只讀 API、可見文案與 redaction contract;不發 Telegram / AwoooP、不做 live probe / active scan、不重啟服務、不改 endpoint、不讀 Secret、不開 runtime gate。 + +**本輪完成**: +- IwoooS `/zh-TW/iwooos` 將「AwoooP Session / PR / 分支交接 / 工作階段」語氣改成「平行工作同步 / 工作線 / 版本證據錨點」。 +- Governance `/zh-TW/governance?tab=automation-inventory` 將 `Service health 失敗限定通知合約` 改為 `服務健康失敗限定通知合約`,並補齊 severity label。 +- `service_health_failure_notification_policy_v1` 的前端 redaction contract 改為繁中:允許欄位為已提交證據參照、政策規則摘要、決策彙總、通道邊界、下一步與阻擋操作摘要;禁止內容為內部對話內容、Codex / 使用者訊息逐字稿、提示詞 / 思考鏈、工作階段識別碼 / 瀏覽器脈絡、機密 / 權杖 / 授權標頭。 +- Governance UI 不再逐項顯示 message template 的 raw forbidden field 名稱,只顯示隔離欄位總數與「不顯示內部欄位名」狀態,避免前端露出 `session_id`、`browser_context` 或工作視窗相關欄位名。 + +**提交與 Gitea runs**: +- `5c2ac4d5 feat(governance): 新增服務健康失敗限定通知合約`:code-review `#2615` 成功;CD `#2614` 取消,後續由較新修正部署覆蓋。 +- `b7657379 fix(web): 清理 IwoooS 工作線文案`:CD `#2616` 成功;code-review `#2617` 成功;deploy marker `f1e02107`。 +- `d2963c16 fix(governance): 清理服務健康通知合約可見文案`:code-review `#2619` 成功;CD `#2618` 取消,後續由 `d66effe6` 部署覆蓋。 +- `d66effe6 fix(governance): 同步服務健康通知紅線契約`:CD `#2620` 成功;code-review `#2621` 成功;deploy marker `5eafe0d0`。 + +**本地驗證**: +- JSON parse 通過:`docs/evaluations/service_health_failure_notification_policy_2026-06-05.json`、`apps/web/messages/zh-TW.json`、`apps/web/messages/en.json`。 +- P1-007 目標測試通過:`python3 -m pytest apps/api/tests/test_service_health_failure_notification_policy.py apps/api/tests/test_service_health_failure_notification_policy_api.py` → `10 passed`。 +- py_compile 通過:`apps/api/src/services/service_health_failure_notification_policy.py`、`apps/api/src/api/v1/agents.py`。 +- web typecheck 通過:`pnpm --filter @awoooi/web typecheck`。 +- 禁用字串掃描通過:未命中 `工作視窗`、`工作視窗對話`、`批准!繼續`、`AwoooP Session`、`PR #117`、`codex/security`、`LOGBO同意`、`跨工作階段`、`資安工作階段`、`Service health 失敗限定通知合約`。 + +**正式 API readback**: +- Production health:`healthy`、environment `prod`、mock_mode `false`。 +- `GET /api/v1/agents/service-health-failure-notification-policy` 回 `service_health_failure_notification_policy_v1`、current `P1-007`、next `P2-004`、rules `7`、`notification_send_allowed=false`、`conversation_transcript_display_allowed=false`、`redaction_required=true`。 +- Production API forbidden hits:`工作視窗`、`工作視窗對話`、`prompt / chain-of-thought`、`session id / browser context`、`Service health 失敗限定通知合約` 全部 `0`。 + +**正式 browser smoke**: +- IwoooS desktop `1440x1000`:`https://awoooi.wooo.work/zh-TW/iwooos?_v=b7657379-desktop` 通過;`IwoooS`、`安全合規`、`前台入口與既有資安頁`、`平行工作同步`、`工作線`、`主動執行為 0`、`閘門 0` 可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`。 +- IwoooS mobile `390x844`:`https://awoooi.wooo.work/zh-TW/iwooos?_v=b7657379-mobile` 通過;同上必要文案可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`。 +- Governance desktop `1440x1000`:`https://awoooi.wooo.work/zh-TW/governance?tab=automation-inventory&_v=d66effe6-desktop` 通過;`服務健康失敗限定通知合約`、`成功降噪`、`前端隔離`、`訊息欄位合約`、`操作邊界`、`前端顯示紅線`、`允許發送` 可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`。 +- Governance mobile `390x844`:`https://awoooi.wooo.work/zh-TW/governance?tab=automation-inventory&_v=d66effe6-mobile` 通過;同上必要文案可見;禁用字串 `0`、`horizontalOverflow=0`、overflowing elements `0`。 +- Browser console 讀到的 `localhost:3015` SSE error 為舊開發分頁殘留記錄,不屬於本次 production URL;本次判定以正式 URL DOM / API readback / overflow 指標為準。 + +**目前完成度與邊界**: +- IwoooS 整體仍維持 `64%`,未因 UI 可見、通知合約或 redaction contract 提高。 +- P1-007 可視為正式部署完成;P1 進度依 automation backlog 為 `100%`,下一段進入 `P2-004`。 +- active runtime gate 仍為 `0`;Telegram / AwoooP 通知發送、live probe、external probe、service / pod / host restart、endpoint / ConfigMap 修改、Secret payload read、workflow / deploy / reload / runtime execution 仍全部未批准。 + +**下一步**: +1. 進入 `P2-004`:配置優化 / 依賴與供應鏈漂移監控只讀合約,先保留 read-only / approval gate。 +2. 持續要求前端與 docs 不顯示工作視窗對話、prompt、session context 或內部協作逐字稿。 + ## 2026-06-05|P1-007 服務健康失敗限定通知合約本地完成 **背景**:接續 P1-006 服務健康證據卡正式驗證後推進 P1-007。本段只建立 service health failure-only Telegram / AwoooP 通知合約、只讀 API 與治理頁顯示;不發送 Telegram / AwoooP、不做 live probe / external probe、不重啟 service / pod / host、不修改 endpoint / ConfigMap、不讀 Secret / Redis / DB payload、不觸發 workflow / deploy / reload / runtime execution。 diff --git a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md index 32161a280..21907473f 100644 --- a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md +++ b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md @@ -3606,3 +3606,9 @@ Phase 6 完成後 3. P2-004:配置優化主線需保持 read-only / approval gate。 **裁決:** P1-007 只完成 service health failure-only notification policy、API 與 UI 可讀性;不得把通知合約、Telegram / AwoooP channel、failure escalation rule、message template 或治理頁顯示解讀成實際通知已發送、live probe、服務重啟、endpoint / ConfigMap 修改、runtime gate 提高、S4.9 owner response gate 提高或 security acceptance 已成立。 + +### 2026-06-05 下午 (台北) — P1-007 服務健康失敗限定通知合約正式上線 + +**正式環境**:code commit `5c2ac4d5`,redaction 修正 `d2963c16` / `d66effe6`,deploy marker `5eafe0d0 chore(cd): deploy d66effe [skip ci]`。Production API readback 通過:backlog current `P1-007`、next `P2-004`、overall `92%`、done `23/25`;inventory tasks `33`、read-only allowed `30`;failure notification policy rules `7`、成功降噪 `2`、action-required `2`、failure escalation `3`,notification_send / live_probe / runtime_execution 全為 `false`。Governance desktop/mobile smoke 通過,P1-007 區塊可見、禁用字串 `0`、水平溢出 `0`、危險操作入口 `0`。IwoooS desktop/mobile 文案邊界通過,內部工作線禁用字串 `0`、水平溢出 `0`。 + +**裁決:** P1-007 只完成 failure-only notification policy、API 與 UI 可讀性;不得把 Telegram / AwoooP channel、failure escalation rule、message template、redaction contract 或治理頁顯示解讀成通知已發送、live probe、服務重啟、endpoint / ConfigMap 修改、runtime gate 提高、S4.9 owner response gate 提高或 security acceptance 已成立。