feat(governance): bind km archive confirm to dry-run fingerprint
All checks were successful
Code Review / ai-code-review (push) Successful in 14s
Type Sync Check / check-type-sync (push) Successful in 31s
CD Pipeline / tests (push) Successful in 4m8s
CD Pipeline / build-and-deploy (push) Successful in 4m48s
CD Pipeline / post-deploy-checks (push) Successful in 2m13s
All checks were successful
Code Review / ai-code-review (push) Successful in 14s
Type Sync Check / check-type-sync (push) Successful in 31s
CD Pipeline / tests (push) Successful in 4m8s
CD Pipeline / build-and-deploy (push) Successful in 4m48s
CD Pipeline / post-deploy-checks (push) Successful in 2m13s
This commit is contained in:
@@ -2341,6 +2341,14 @@ Phase 6 完成後
|
||||
- Production:`ba904ec4 feat(governance): require dry-run preview before km archive` 已推 Gitea main;deploy marker `42b668bb chore(cd): deploy ba904ec [skip ci]`;Gitea runs `2551` / `2552` completed success。Production health healthy/prod/mock_mode=false。`GET /ai/governance/km-review-drafts/dedupe?limit=100` 回 `total_review_drafts=95`、`event_group_total=28`、`duplicate_draft_total=67`。Work Items production smoke 顯示 nav、KM 草稿去重視圖、乾跑預覽、確認封存;confirm button preview 前 disabled、preview 後 enabled;唯一 POST 為 `dry_run=true` + `owner_approved=false`;`writes_km=false` / `writes_governance_audit=false` 可見;blockedWrites=0;pageErrors=0 / consoleErrors=0;dry-run 前後 duplicate total 仍為 67;截圖 `/tmp/awoooi-t95-km-archive-two-step-production.png`。
|
||||
- 目前進度更新:前端 AI 自動化管理介面同步約 98.3%;治理告警可讀性 / 可處置性約 98.6%;AI Agent ownership 可追溯性約 97.4%;KM healthcheck 派工可追蹤性約 99.5%;Hermes KB growth 草稿 / owner review 閉環約 99.2%;完整 AI 自動化管理產品化約 96.8%。
|
||||
|
||||
**T96 KM archive dry-run fingerprint guard(2026-05-20 台北)**:
|
||||
- 觸發:T95 已把前端做成兩段式,但後端仍只要求 `owner_approved=true`;直接 POST `dry_run=false` 仍可繞過前端 preview,dry-run-first 需要落到 API contract。
|
||||
- 修正:archive request / response 新增 `dry_run_plan_fingerprint`。Dry-run 依最新 dedupe plan 產生 deterministic fingerprint;confirm 必須帶回同一 fingerprint,後端會用最新 dedupe plan 重算。缺 fingerprint 回 `403`,fingerprint 與最新 plan 不一致回 `409`。Archive audit 與 stale ratio recheck context 都記錄 fingerprint,讓 AwoooP 可追溯確認動作基於哪一次 preview plan。
|
||||
- UI:Work Items confirm payload 帶回 preview response 的 fingerprint;若前端狀態缺 fingerprint,UI 直接要求重跑 preview。Preview card 直接顯示 plan fingerprint。
|
||||
- 邊界:T96 local smoke 沒有送任何成功的 `dry_run=false` 到 production;confirm POST 在 Playwright 層攔截,只驗證 payload 帶 fingerprint。
|
||||
- Local verification:`py_compile` ok;ruff ok;治理 endpoint / dispatcher / Hermes worker tests `61 passed`;Work Items Next lint ok;`tsc --noEmit` ok;i18n JSON parse ok;shared-types regenerate 後無 diff;`NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build` 成功產出 90/90 static pages;`git diff --check` pass。Local Playwright smoke 確認 confirm preview 前 disabled、preview 後 enabled、preview 顯示 fingerprint、confirm payload 帶 fingerprint、confirm write 被測試層攔截、pageErrors=0 / consoleErrors=0,截圖 `/tmp/awoooi-t96-km-archive-fingerprint-local.png`。
|
||||
- 目前進度更新:前端 AI 自動化管理介面同步約 98.4%;治理告警可讀性 / 可處置性約 98.7%;AI Agent ownership 可追溯性約 97.6%;KM healthcheck 派工可追蹤性約 99.6%;Hermes KB growth 草稿 / owner review 閉環約 99.3%;完整 AI 自動化管理產品化約 97.0%。
|
||||
|
||||
---
|
||||
|
||||
### 2026-04-20 晚 (台北) — C1-C4 全流程串接 — Playbook 鏈路保護(commit de2d34d)
|
||||
|
||||
Reference in New Issue
Block a user