fix(governance): 清理 Agent redaction 可見文案
This commit is contained in:
@@ -585,7 +585,7 @@ async def get_agent_communication_learning_contract() -> dict[str, Any]:
|
||||
description=(
|
||||
"讀取最新已提交的 OpenClaw / Hermes / NemoTron 互動、接手、學習、成長與 Telegram 收據證據面;"
|
||||
"此端點不啟動 worker、不讀寫 Redis consumer group、不建立 DB migration、不送 Telegram、"
|
||||
"不顯示工作視窗對話、prompt、private reasoning 或 secret。"
|
||||
"不回傳內部協作逐字稿、提示詞、私有推理或機密值。"
|
||||
),
|
||||
)
|
||||
async def get_agent_interaction_learning_proof() -> dict[str, Any]:
|
||||
@@ -612,7 +612,7 @@ async def get_agent_interaction_learning_proof() -> dict[str, Any]:
|
||||
description=(
|
||||
"讀取最新已提交的 AgentSession / Redis Streams live read model gate;"
|
||||
"此端點不連 DB、不讀寫 Redis、不啟動 worker、不建立 DB migration、不送 Telegram、"
|
||||
"不顯示工作視窗內容、Agent 原始輸出、提示詞、私有推理或機密值。"
|
||||
"不回傳內部協作逐字稿、Agent 原始輸出、提示詞、私有推理或機密值。"
|
||||
),
|
||||
)
|
||||
async def get_agent_live_read_model_gate() -> dict[str, Any]:
|
||||
@@ -723,7 +723,7 @@ async def get_agent_tool_adoption_approval_package() -> dict[str, Any]:
|
||||
"此端點只回傳 critical / action-required / failure-only digest 規則與 redaction 邊界,"
|
||||
"不送 Telegram、不寫 Telegram Gateway queue、不改 Alertmanager route / receiver、"
|
||||
"不寫 AwoooP event、不觸發 workflow、不查外部掃描、不執行 runtime、不讀取 secret、"
|
||||
"不回傳工作視窗對話內容。"
|
||||
"不回傳內部協作逐字稿。"
|
||||
),
|
||||
)
|
||||
async def get_agent_telegram_action_required_digest_policy() -> dict[str, Any]:
|
||||
@@ -752,7 +752,7 @@ async def get_agent_telegram_action_required_digest_policy() -> dict[str, Any]:
|
||||
"此端點只回傳 grouping、automerge=false、測試證據、rollback、owner response 與 redaction 邊界,"
|
||||
"不 push branch、不建立或更新 Gitea PR、不留言、不 auto merge、不觸發 workflow、不改 CI、"
|
||||
"不寫 lockfile、不升級套件、不 build/pull image、不改 production route、不發 Telegram、"
|
||||
"不讀取 secret、不回傳工作視窗對話內容。"
|
||||
"不讀取 secret、不回傳內部協作逐字稿。"
|
||||
),
|
||||
)
|
||||
async def get_agent_gitea_pr_draft_lane() -> dict[str, Any]:
|
||||
@@ -781,7 +781,7 @@ async def get_agent_gitea_pr_draft_lane() -> dict[str, Any]:
|
||||
"maintenance window 批准包;此端點不 SSH、不執行 host command、不執行 kubectl、"
|
||||
"不 apt upgrade、不升級 kernel/K3s、不 drain node、不 reboot、不 restart stateful service、"
|
||||
"不做 DB migration、不刪備份、不 restore、不 pull image、不安裝套件、不查外部版本來源、"
|
||||
"不 active scan、不發 Telegram、不讀取 secret、不回傳工作視窗對話內容。"
|
||||
"不 active scan、不發 Telegram、不讀取 secret、不回傳內部協作逐字稿。"
|
||||
),
|
||||
)
|
||||
async def get_agent_host_stateful_version_inventory() -> dict[str, Any]:
|
||||
@@ -1027,7 +1027,7 @@ async def get_backup_notification_policy() -> dict[str, Any]:
|
||||
"讀取最新已提交的 service health failure-only Telegram / AwoooP 通知合約;"
|
||||
"此端點只回傳成功降噪、action-required 與 failure escalation 規則,"
|
||||
"不送通知、不做 live probe、不重啟服務、不改 endpoint、不觸發 workflow / runtime execution、"
|
||||
"不讀取 secret payload、不回傳工作視窗對話內容或 prompt。"
|
||||
"不讀取 secret payload、不回傳內部協作逐字稿或提示詞。"
|
||||
),
|
||||
)
|
||||
async def get_service_health_failure_notification_policy() -> dict[str, Any]:
|
||||
|
||||
@@ -2975,7 +2975,7 @@
|
||||
"telegramDetail": "統一入口 {gateway},通知類別 {classes} 種;Agent 不直接持有 token,也不直接發送。",
|
||||
"learningTitle": "主動學習與協作",
|
||||
"learningDetail": "事件來源 {sources}、回饋迴圈 {loops}、成長指標 {metrics};先落只讀證據,再走批准關卡。",
|
||||
"redactionLocked": "前端不顯示對話內容",
|
||||
"redactionLocked": "前端只顯示狀態與證據",
|
||||
"directSendBlocked": "Telegram 直送禁止",
|
||||
"frontendSafe": "只顯示狀態、證據與邊界",
|
||||
"metrics": {
|
||||
|
||||
@@ -2975,7 +2975,7 @@
|
||||
"telegramDetail": "統一入口 {gateway},通知類別 {classes} 種;Agent 不直接持有 token,也不直接發送。",
|
||||
"learningTitle": "主動學習與協作",
|
||||
"learningDetail": "事件來源 {sources}、回饋迴圈 {loops}、成長指標 {metrics};先落只讀證據,再走批准關卡。",
|
||||
"redactionLocked": "前端不顯示對話內容",
|
||||
"redactionLocked": "前端只顯示狀態與證據",
|
||||
"directSendBlocked": "Telegram 直送禁止",
|
||||
"frontendSafe": "只顯示狀態、證據與邊界",
|
||||
"metrics": {
|
||||
|
||||
@@ -32,6 +32,16 @@
|
||||
|
||||
**完成度與邊界**:D6 source-control 納管範圍同步 `100%`;前端紅線文案修正 `100%`;IwoooS 整體仍維持 `64%`,因 S4.9 / S4.10 owner response、redacted evidence refs、accepted response 與 runtime authorization 全部仍為 `0 / false`。下一步仍是正式擴充 S4.10 owner response packet 到 `9` 個範圍並收齊 owner role / team、decision、decision reason、affected scope、redacted evidence refs、followup owner、rollback owner、maintenance window 與 validation plan;未驗收前不得假性拉高進度。
|
||||
|
||||
## 2026-06-11|Governance / Agent redaction 可見文案補清
|
||||
|
||||
**背景**:`8f3ec9f4` 已移除一批前端 messages 內部工作用語,但 `fd06bedf` 正式站 smoke 後仍在 `/zh-TW/governance?tab=automation-inventory` DOM 看到「不顯示工作視窗對話」。追查確認來源不是 messages,而是 `apps/api/src/api/v1/agents.py` 多個只讀 API description 仍回傳舊 wording,前端將 API description 顯示後造成 production 可見殘留。
|
||||
|
||||
**完成**:將 Agent interaction / live read model / Telegram digest / Gitea PR draft lane / host stateful inventory / service health failure notification policy 等 API description 中的「工作視窗 / 對話內容」產品化為「內部協作逐字稿、提示詞、私有推理、機密值不回傳」;同步把 `deploymentLayout.redactionLocked` 從「前端不顯示對話內容」改為「前端只顯示狀態與證據」。保留 redaction 邊界,不改 runtime gate、不發 Telegram、不啟動 worker。
|
||||
|
||||
**驗證**:`python3 -m json.tool apps/web/messages/zh-TW.json apps/web/messages/en.json` 通過;`python3 -m py_compile apps/api/src/api/v1/agents.py` 通過;`DATABASE_URL=sqlite+aiosqlite:///tmp/awoooi-test.db pytest apps/api/tests/test_ai_agent_interaction_learning_proof_api.py apps/api/tests/test_ai_agent_live_read_model_gate_api.py apps/api/tests/test_ai_agent_telegram_action_required_digest_policy.py apps/api/tests/test_service_health_failure_notification_policy_api.py -q`:`9 passed`;`git diff --check`、owner response guard、security mirror progress guard 通過;目標可見 apps 檔掃描未命中 `工作視窗` / `對話內容`。乾淨 worktree 無 `node_modules`,直接 web typecheck 會因找不到 Next / React / workspace tsconfig 依賴失敗,未作為本段型別結果。
|
||||
|
||||
**邊界**:本段只清 production 可見文案與 API description,不代表 Agent live read model、Telegram 實發、runtime worker、Redis consumer、DB migration、PlayBook acceptance 或 auto repair gate 開啟。active runtime gate 仍 `0`。
|
||||
|
||||
## 2026-06-11|P0 MCP evidence / PlayBook 修復候選 D5
|
||||
|
||||
**背景**:D4 已讓 AwoooP Work Items 能顯示 PlayBook 草案處置板,但後端 blocked result 仍只提供草案欄位與 lane,缺少「是哪個 alert / target 沒有服務專屬 PlayBook coverage、卡在哪一階段、下一步要收哪些 MCP evidence」的結構化契約。這會讓 Telegram 批准後看起來仍像 `REPAIR_CANDIDATE_MISSING` 斷線,而不是可持續推進的 PlayBook 補洞流程。
|
||||
|
||||
Reference in New Issue
Block a user