From 165040839291c411f8d4bbeff827a2fe32806ed4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 29 Jun 2026 18:46:29 +0800 Subject: [PATCH] fix(awooop): clarify controlled automation boundaries --- apps/web/messages/en.json | 16 +++++------ apps/web/messages/zh-TW.json | 16 +++++------ .../public-security-redaction.test.ts | 28 +++++++++++++++++++ apps/web/src/lib/public-security-redaction.ts | 24 ++++++++++++---- 4 files changed, 62 insertions(+), 22 deletions(-) create mode 100644 apps/web/src/lib/__tests__/public-security-redaction.test.ts diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 9b1863dce..a543b725a 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -9330,7 +9330,7 @@ "timelineMissing": "品質總覽仍指出 時間線 / 稽核記錄缺口", "iwooosSecurityMirror": "整體 {headline};框架 {framework};落地 {runtime};主動執行閘門={gates}", "iwooosSecurityMirrorOwner": "AwoooP 正式只讀落地 已驗證;負責人回覆仍等待", - "iwooosSecurityMirrorBoundary": "尚未連接執行路由;執行期操作未授權;此頁不提供可執行操作按鈕。", + "iwooosSecurityMirrorBoundary": "此只讀鏡像不直連執行路由;低 / 中 / 高風險改由 AI controlled queue、check-mode、rollback 與 verifier 推進,critical / break-glass 仍隔離。", "githubPrimaryReadiness": "候選專案庫={candidates};範圍內={inScope};主要來源就緒={ready}", "githubPrimaryOwnerResponses": "負責人回覆仍為 0/22;請求可送出不等於已接受", "githubPrimaryWorkflowNames": "工作流程 / 機密名稱清冊完成=0/7;只收名稱不收機密明文值", @@ -11219,8 +11219,8 @@ "boundaryItems": { "migrationLocked": "租戶遷移模式沒有變更。", "policyLocked": "租戶政策沒有被修改,也沒有授權修改。", - "runtimeLocked": "執行期操作維持關閉;不啟動掃描、部署、修復或主機操作。", - "actionButtonsLocked": "此頁不提供任何可執行操作按鈕。" + "runtimeLocked": "此租戶只讀範圍不直連執行期;低 / 中 / 高風險可回滾項走 AI controlled queue 與 verifier。", + "actionButtonsLocked": "此頁不放直接危險按鈕;AI controlled work item 仍可由受控流程推進。" } }, "githubTenantReadinessScope": { @@ -11258,14 +11258,14 @@ }, "boundaryItems": { "sourceScopeWaiting": "租戶原始碼範圍仍等待正式負責人回覆。", - "ownerResponseWaiting": "專案庫負責人回覆尚未接受。", + "ownerResponseWaiting": "專案庫負責人回覆尚未接受;此欄位只作 evidence,不阻擋低 / 中 / 高風險 controlled apply。", "repoCreationLocked": "未取得正式決策前,不建立 GitHub 專案庫或修改可見性。", "refsMutationLocked": "未取得分支 / 標籤真相證據前,不同步或修改 refs。", "githubPrimaryLocked": "GitHub primary 尚未核准切換。", "giteaDisableLocked": "Gitea 不得停用,仍是目前 CI/CD 來源。", "tenantPolicyLocked": "租戶政策與遷移模式不得因就緒度顯示而改變。", - "runtimeLocked": "執行期操作維持關閉。", - "actionButtonsLocked": "此頁不提供任何可執行操作按鈕。" + "runtimeLocked": "此租戶面板不直連執行期;AI controlled work item 仍由受控佇列與 verifier 推進。", + "actionButtonsLocked": "此頁不放直接危險按鈕;可回滾變更走 AI controlled queue。" } }, "ownerResponseValidationScope": { @@ -11314,8 +11314,8 @@ } }, "boundaryItems": { - "responseNotReceived": "負責人回覆尚未收到。", - "responseNotAccepted": "負責人回覆尚未接受。", + "responseNotReceived": "負責人回覆尚未收到;此欄位只作 evidence。", + "responseNotAccepted": "負責人回覆尚未接受;不作為 controlled automation 終局。", "responseNotRejected": "目前沒有正式拒收紀錄。", "tenantScopeWaiting": "租戶原始碼範圍仍等待驗收。", "tenantPolicyLocked": "租戶政策不得修改。", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 3de1003f3..ac8c8c020 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -9330,7 +9330,7 @@ "timelineMissing": "品質總覽仍指出 時間線 / 稽核記錄缺口", "iwooosSecurityMirror": "整體 {headline};框架 {framework};落地 {runtime};主動執行閘門={gates}", "iwooosSecurityMirrorOwner": "AwoooP 正式只讀落地 已驗證;負責人回覆仍等待", - "iwooosSecurityMirrorBoundary": "尚未連接執行路由;執行期操作未授權;此頁不提供可執行操作按鈕。", + "iwooosSecurityMirrorBoundary": "此只讀鏡像不直連執行路由;低 / 中 / 高風險改由 AI controlled queue、check-mode、rollback 與 verifier 推進,critical / break-glass 仍隔離。", "githubPrimaryReadiness": "候選專案庫={candidates};範圍內={inScope};主要來源就緒={ready}", "githubPrimaryOwnerResponses": "負責人回覆仍為 0/22;請求可送出不等於已接受", "githubPrimaryWorkflowNames": "工作流程 / 機密名稱清冊完成=0/7;只收名稱不收機密明文值", @@ -11219,8 +11219,8 @@ "boundaryItems": { "migrationLocked": "租戶遷移模式沒有變更。", "policyLocked": "租戶政策沒有被修改,也沒有授權修改。", - "runtimeLocked": "執行期操作維持關閉;不啟動掃描、部署、修復或主機操作。", - "actionButtonsLocked": "此頁不提供任何可執行操作按鈕。" + "runtimeLocked": "此租戶只讀範圍不直連執行期;低 / 中 / 高風險可回滾項走 AI controlled queue 與 verifier。", + "actionButtonsLocked": "此頁不放直接危險按鈕;AI controlled work item 仍可由受控流程推進。" } }, "githubTenantReadinessScope": { @@ -11258,14 +11258,14 @@ }, "boundaryItems": { "sourceScopeWaiting": "租戶原始碼範圍仍等待正式負責人回覆。", - "ownerResponseWaiting": "專案庫負責人回覆尚未接受。", + "ownerResponseWaiting": "專案庫負責人回覆尚未接受;此欄位只作 evidence,不阻擋低 / 中 / 高風險 controlled apply。", "repoCreationLocked": "未取得正式決策前,不建立 GitHub 專案庫或修改可見性。", "refsMutationLocked": "未取得分支 / 標籤真相證據前,不同步或修改 refs。", "githubPrimaryLocked": "GitHub primary 尚未核准切換。", "giteaDisableLocked": "Gitea 不得停用,仍是目前 CI/CD 來源。", "tenantPolicyLocked": "租戶政策與遷移模式不得因就緒度顯示而改變。", - "runtimeLocked": "執行期操作維持關閉。", - "actionButtonsLocked": "此頁不提供任何可執行操作按鈕。" + "runtimeLocked": "此租戶面板不直連執行期;AI controlled work item 仍由受控佇列與 verifier 推進。", + "actionButtonsLocked": "此頁不放直接危險按鈕;可回滾變更走 AI controlled queue。" } }, "ownerResponseValidationScope": { @@ -11314,8 +11314,8 @@ } }, "boundaryItems": { - "responseNotReceived": "負責人回覆尚未收到。", - "responseNotAccepted": "負責人回覆尚未接受。", + "responseNotReceived": "負責人回覆尚未收到;此欄位只作 evidence。", + "responseNotAccepted": "負責人回覆尚未接受;不作為 controlled automation 終局。", "responseNotRejected": "目前沒有正式拒收紀錄。", "tenantScopeWaiting": "租戶原始碼範圍仍等待驗收。", "tenantPolicyLocked": "租戶政策不得修改。", diff --git a/apps/web/src/lib/__tests__/public-security-redaction.test.ts b/apps/web/src/lib/__tests__/public-security-redaction.test.ts new file mode 100644 index 000000000..abbde8690 --- /dev/null +++ b/apps/web/src/lib/__tests__/public-security-redaction.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from 'vitest' + +import { publicBoundaryText } from '../public-security-redaction' + +describe('publicBoundaryText controlled automation wording', () => { + it('renders runtime false as controlled automation boundary evidence', () => { + const text = publicBoundaryText('runtime_execution_authorized=false') + + expect(text).toContain('AI controlled apply') + expect(text).toContain('critical / break-glass') + expect(text).not.toContain('執行期操作未授權') + }) + + it('keeps action button false from becoming a manual stop state', () => { + const text = publicBoundaryText('action_buttons_allowed=false') + + expect(text).toContain('AI controlled work item') + expect(text).toContain('check-mode') + expect(text).toContain('verifier') + }) + + it('treats owner response zero as evidence instead of an apply blocker', () => { + const text = publicBoundaryText('owner_response_accepted_count=0') + + expect(text).toContain('evidence') + expect(text).toContain('不阻擋 controlled apply') + }) +}) diff --git a/apps/web/src/lib/public-security-redaction.ts b/apps/web/src/lib/public-security-redaction.ts index e9a7bc50f..57c2d88d3 100644 --- a/apps/web/src/lib/public-security-redaction.ts +++ b/apps/web/src/lib/public-security-redaction.ts @@ -27,11 +27,19 @@ export function publicBoundaryText(value: string): string { "security_compliance_rollout_enforcement_enabled=false": "強制執行尚未開放。", }; if (labels[redacted]) return labels[redacted]; - if (redacted.includes("runtime_execution_authorized=false")) return "執行期操作未授權。"; - if (redacted.includes("action_buttons_allowed=false")) return "此頁不提供可執行操作按鈕。"; + if (redacted.includes("runtime_execution_authorized=false")) { + return "低 / 中 / 高風險已走 AI controlled apply;此 false 僅標示 critical / break-glass 或外部來源切換未開放。"; + } + if (redacted.includes("action_buttons_allowed=false")) { + return "此頁不放直接危險按鈕;AI controlled work item 仍由 check-mode、rollback 與 verifier 推進。"; + } if (redacted.includes("active_runtime_gate_count=0")) return "執行期閘門維持關閉。"; - if (redacted.includes("owner_response_validation_received_count=0")) return "負責人回覆尚未收到。"; - if (redacted.includes("owner_response_validation_accepted_count=0")) return "負責人回覆尚未接受。"; + if (redacted.includes("owner_response_validation_received_count=0")) { + return "負責人回覆尚未收到;僅作 evidence,不阻擋低 / 中 / 高風險 AI controlled apply。"; + } + if (redacted.includes("owner_response_validation_accepted_count=0")) { + return "負責人回覆尚未接受;僅作 evidence,不作為 controlled automation 終局。"; + } if (redacted.includes("owner_response_validation_rejected_count=0")) return "目前沒有正式拒收紀錄。"; if (redacted.includes("repo_creation_authorized=false")) return "未核准建立專案庫或修改可見性。"; if (redacted.includes("refs_mutation_authorized=false") || redacted.includes("refs_sync_authorized=false")) { @@ -43,7 +51,9 @@ export function publicBoundaryText(value: string): string { if (redacted.includes("secret_value_collection_allowed=false")) return "不得收集或顯示任何機密明文值。"; if (redacted.includes("github_primary_switch_authorized=false")) return "GitHub primary 尚未核准切換。"; if (redacted.includes("gitea_disablement_authorized=false")) return "Gitea 不得停用,仍是目前 CI/CD 來源。"; - if (redacted.includes("execution_router_linked=false")) return "尚未連接執行路由。"; + if (redacted.includes("execution_router_linked=false")) { + return "此只讀面板不直連執行路由;可回滾變更由 AI controlled queue 與 verifier 接手。"; + } if (redacted.includes("security_run_created=false") || redacted.includes("github_primary_run_created=false")) { return "目前沒有建立資安執行 run。"; } @@ -60,7 +70,9 @@ export function publicBoundaryText(value: string): string { if (redacted.includes("nginx_reload_authorized=false")) return "未核准 Nginx reload 或公開入口變更。"; if (redacted.includes("agent_bounty_runtime_authorized=false")) return "agent-bounty-protocol 執行期維持關閉。"; if (redacted.includes("github_primary_approval_granted=false")) return "GitHub primary 尚未獲得審批。"; - if (redacted.includes("owner_response_accepted_count=0")) return "負責人回覆接受數仍為 0。"; + if (redacted.includes("owner_response_accepted_count=0")) { + return "負責人回覆接受數仍為 0;這是歷史/evidence 欄位,不阻擋 controlled apply。"; + } if (redacted.includes("_count=0")) return "目前計數仍為 0,僅供只讀觀測。"; if (redacted.includes("=false")) return "目前狀態為未授權,僅供只讀觀測。"; return redacted;