From badff58cc3befa0f6a1b057faa1ac72553e3f629 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 May 2026 11:13:50 +0800 Subject: [PATCH] feat(web): add iwooos stage completion report --- apps/web/messages/en.json | 23 +++++++ apps/web/messages/zh-TW.json | 23 +++++++ apps/web/src/app/[locale]/iwooos/page.tsx | 69 +++++++++++++++++++ docs/LOGBOOK.md | 24 +++++++ .../IWOOOS-PRODUCTION-LANDING-EVIDENCE.md | 20 ++++++ .../security-mirror-progress-guard.py | 15 ++++ 6 files changed, 174 insertions(+) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index e9cd10dd3..3a870a52b 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -4889,6 +4889,29 @@ "detail": "kept at 0 before approval" } }, + "stageCompletionReport": { + "title": "階段完成回報", + "subtitle": "每一輪完成後都把正式證據、進度邊界與下一步固定在首頁,讓使用者不用翻對話也能理解目前資安工作推到哪裡。", + "boundary": "本階段只更新可見回報與證據索引:headline_percent=61;framework=86-88%;runtime_landing=40-45%;active_runtime_gate_count=0;runtime_execution_authorized=false;repo_creation_authorized=false。", + "items": { + "stageClosed": { + "title": "本階段已收斂", + "body": "IwoooS 已完成摘要收斂與下一步任務板,使用者可在預設展開區直接看到目前資安工作狀態。" + }, + "productionEvidence": { + "title": "正式部署證據", + "body": "最新主線包含 IwoooS 任務板 commit;Gitea CD run 3261 的 tests、build-and-deploy、post-deploy-checks 皆完成。" + }, + "progressBoundary": { + "title": "整體進度邊界", + "body": "目前整體 61%,框架 86-88%,落地 40-45%。下一次進度要靠 owner response、脫敏證據或批准 gate。" + }, + "runtimeBoundary": { + "title": "執行期仍關閉", + "body": "Kali、主機、repo、workflow 與 GitHub primary 仍停在 observe / readiness;不因前端顯示而取得執行權。" + } + } + }, "operatorNextTasks": { "title": "下一步任務板", "subtitle": "把 61% 往下一階段推進需要的工作拆成四件事;這裡只顯示任務與完成條件,不送出請求、不啟動掃描、不建立執行。", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 2878cbb4a..5dffc180b 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -4890,6 +4890,29 @@ "detail": "人工批准前維持 0" } }, + "stageCompletionReport": { + "title": "階段完成回報", + "subtitle": "每一輪完成後都把正式證據、進度邊界與下一步固定在首頁,讓使用者不用翻對話也能理解目前資安工作推到哪裡。", + "boundary": "本階段只更新可見回報與證據索引:headline_percent=61;framework=86-88%;runtime_landing=40-45%;active_runtime_gate_count=0;runtime_execution_authorized=false;repo_creation_authorized=false。", + "items": { + "stageClosed": { + "title": "本階段已收斂", + "body": "IwoooS 已完成摘要收斂與下一步任務板,使用者可在預設展開區直接看到目前資安工作狀態。" + }, + "productionEvidence": { + "title": "正式部署證據", + "body": "最新主線包含 IwoooS 任務板 commit;Gitea CD run 3261 的 tests、build-and-deploy、post-deploy-checks 皆完成。" + }, + "progressBoundary": { + "title": "整體進度邊界", + "body": "目前整體 61%,框架 86-88%,落地 40-45%。下一次進度要靠 owner response、脫敏證據或批准 gate。" + }, + "runtimeBoundary": { + "title": "執行期仍關閉", + "body": "Kali、主機、repo、workflow 與 GitHub primary 仍停在 observe / readiness;不因前端顯示而取得執行權。" + } + } + }, "operatorNextTasks": { "title": "下一步任務板", "subtitle": "把 61% 往下一階段推進需要的工作拆成四件事;這裡只顯示任務與完成條件,不送出請求、不啟動掃描、不建立執行。", diff --git a/apps/web/src/app/[locale]/iwooos/page.tsx b/apps/web/src/app/[locale]/iwooos/page.tsx index c71fc1259..d62ff0880 100644 --- a/apps/web/src/app/[locale]/iwooos/page.tsx +++ b/apps/web/src/app/[locale]/iwooos/page.tsx @@ -61,6 +61,13 @@ type IwoooSOperatorNextTask = { tone: 'steady' | 'warn' | 'locked' } +type IwoooSStageCompletionReportItem = { + key: string + value: string + icon: typeof ShieldCheck + tone: 'steady' | 'warn' | 'locked' +} + type AwoooPReadOnlyLandingReadinessItem = { key: string item: string @@ -619,6 +626,13 @@ const operatorNextTasks: IwoooSOperatorNextTask[] = [ { key: 'githubPrimaryReadiness', step: 'N4', icon: GitBranch, tone: 'warn' }, ] +const stageCompletionReportItems: IwoooSStageCompletionReportItem[] = [ + { key: 'stageClosed', value: '完成', icon: CheckCircle2, tone: 'steady' }, + { key: 'productionEvidence', value: 'CD 3261', icon: Radar, tone: 'steady' }, + { key: 'progressBoundary', value: '61%', icon: Activity, tone: 'warn' }, + { key: 'runtimeBoundary', value: 'Gate 0', icon: Lock, tone: 'locked' }, +] + const progressAccelerationLanes: ProgressAccelerationLane[] = [ { key: 'ownerResponses', lane: 'PAL1', icon: ClipboardCheck, tone: 'warn' }, { key: 'redactedIngestion', lane: 'PAL2', icon: FileText, tone: 'warn' }, @@ -3445,6 +3459,59 @@ function IwoooSOperatorNextTasksBoard() { ) } +function IwoooSStageCompletionReportBoard() { + const t = useTranslations('iwooos.stageCompletionReport') + return ( +
+
+

{t('title')}

+

+ {t('subtitle')} +

+
+
+ {stageCompletionReportItems.map(item => { + const Icon = item.icon + return ( +
+
+ + {item.value} +
+

+ {t(`items.${item.key}.title` as never)} +

+

+ {t(`items.${item.key}.body` as never)} +

+
+ ) + })} +
+
+ {t('boundary')} +
+
+ ) +} + function ProgressAccelerationLaneCard({ item }: { item: ProgressAccelerationLane }) { const t = useTranslations('iwooos.progressAcceleration') const Icon = item.icon @@ -11846,6 +11913,8 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) { {postureMetrics.map(item => )} + +
diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index cd5e21edd..c09d82c69 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -18,6 +18,30 @@ - active / canonical SHA256 相同。 - `ALERTS{alertname="NoAlertsReceived2Hours",alertstate="firing"}` 為空。 +## 2026-05-29|IwoooS 階段完成回報板 + +**背景**: + +- 統帥要求每個階段完成後提供整體進度;只在對話回報仍不夠,使用者進正式頁也要看得懂目前資安工作推進到哪。 +- 本段維持 scaffold-first / read-only;不啟用 Kali、SSH、runtime gate、repo / refs / workflow / GitHub primary 或 Gitea 停用。 + +**本次調整**: + +- 在 `/zh-TW/iwooos` 預設展開的「一眼看懂」區塊新增「階段完成回報」。 +- 回報板固定顯示本階段已完成、正式部署證據、整體進度邊界與 runtime 仍關閉。 +- 新增 `data-testid="iwooos-stage-completion-report-board"`,並由 `security-mirror-progress-guard.py` 鎖住,避免後續 UI 改版把階段回報拿掉。 + +**目前邊界**: + +```text +headline_percent=61 +framework=86-88% +runtime_landing=40-45% +active_runtime_gate_count=0 +runtime_execution_authorized=false +repo_creation_authorized=false +``` + ## 2026-05-29|IwoooS 下一步任務板補強 **背景**: diff --git a/docs/security/IWOOOS-PRODUCTION-LANDING-EVIDENCE.md b/docs/security/IWOOOS-PRODUCTION-LANDING-EVIDENCE.md index 67206b30f..290b2dfe9 100644 --- a/docs/security/IWOOOS-PRODUCTION-LANDING-EVIDENCE.md +++ b/docs/security/IWOOOS-PRODUCTION-LANDING-EVIDENCE.md @@ -86,3 +86,23 @@ gitea_disablement_authorized=false | 脫敏證據包 | 補齊來源、範圍、負責人判定、脫敏聲明與 evidence refs | 不收機密明文、raw log、host dump 或完整掃描輸出 | | 執行期 gate 前置 | 整理 scope、rollback、維護窗口、post-check metrics 與人工決策格式 | active runtime gate 維持 `0` | | GitHub primary readiness | 整理目標、分支 / 標籤真相、workflow / secret 名稱與 rollback 依據 | 不建立 repo、不同步 refs、不改 workflow、不切 primary、不停用 Gitea | + +## 8. 階段完成回報板 + +2026-05-29 追加「階段完成回報」到 IwoooS 預設展開的「一眼看懂」區塊,把每一輪完成後的正式證據、進度邊界與下一階段固定在前端,而不是只留在對話紀錄。 + +| 回報項目 | 目前值 | 說明 | +|----------|--------|------| +| 本階段已收斂 | `完成` | IwoooS 已完成摘要收斂與下一步任務板,使用者可在預設展開區直接看到目前資安工作狀態。 | +| 正式部署證據 | `CD 3261` | 最新主線包含 IwoooS 任務板 commit;Gitea CD run `3261` 的 tests、build-and-deploy、post-deploy-checks 皆完成。 | +| 整體進度邊界 | `61%` | 目前整體 `61%`、框架 `86-88%`、落地 `40-45%`。 | +| 執行期仍關閉 | `Gate 0` | Kali、主機、repo、workflow 與 GitHub primary 仍停在 observe / readiness。 | + +```text +headline_percent=61 +framework=86-88% +runtime_landing=40-45% +active_runtime_gate_count=0 +runtime_execution_authorized=false +repo_creation_authorized=false +``` diff --git a/scripts/security/security-mirror-progress-guard.py b/scripts/security/security-mirror-progress-guard.py index e9e34245f..d3d63c48d 100755 --- a/scripts/security/security-mirror-progress-guard.py +++ b/scripts/security/security-mirror-progress-guard.py @@ -7665,6 +7665,21 @@ def validate(root: Path) -> None: iwooos_projection_page, 'data-testid="iwooos-operator-next-tasks-board"', ) + assert_text_contains( + "iwooos_page.stage_completion_report_items", + iwooos_projection_page, + "stageCompletionReportItems", + ) + assert_text_contains( + "iwooos_page.stage_completion_report_board", + iwooos_projection_page, + "IwoooSStageCompletionReportBoard", + ) + assert_text_contains( + "iwooos_page.stage_completion_report_testid", + iwooos_projection_page, + 'data-testid="iwooos-stage-completion-report-board"', + ) for text in [ "headline_percent_after_this_stage=61", "headline_movement_signal_count=1",