feat(governance): archive duplicate km review drafts
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
Type Sync Check / check-type-sync (push) Successful in 33s
CD Pipeline / tests (push) Successful in 3m31s
CD Pipeline / build-and-deploy (push) Successful in 4m41s
CD Pipeline / post-deploy-checks (push) Successful in 1m53s

This commit is contained in:
Your Name
2026-05-20 00:30:17 +08:00
parent 101cd42974
commit c8a995aff2
9 changed files with 779 additions and 46 deletions

View File

@@ -2313,6 +2313,15 @@ Phase 6 完成後
- 邊界T89 補齊 detail/history read model 的 dispatch id 鏈路,不代表 Hermes KB growth worker 已執行草稿、owner review 或 KM writeback下一段仍需實作 worker 消費 pending dispatch 並推進狀態。
- 目前進度更新:治理告警可讀性 / 可處置性約 96%AI Agent ownership 可追溯性約 94.5%KM healthcheck 派工可追蹤性約 92%;詳情 / 歷史 dispatch read model 約 93%;完整 AI 自動化管理產品化約 92.8%。
**T93 KM duplicate drafts owner archive action2026-05-20 台北)**
- 觸發T90-T92 已讓 `knowledge_degradation` → Hermes KB growth → KM review draft → dedupe plan 在 Work Items 可見,但 Operator 仍只能看到封存候選,不能在 AwoooP 內完成 owner 審核後的可稽核封存。
- 修正:新增 owner-approved write API `POST /api/v1/ai/governance/km-review-drafts/dedupe/{governance_event_id}/archive-duplicates`。寫入前重新查最新 dedupe plancanonical 或 duplicate list 不一致即 `409`;未傳 `owner_approved=true` 即拒絕;實際動作只將 duplicate `KnowledgeEntry.status` 改為 `archived`,不刪除 KM。
- Audit成功封存時會新增 terminal `governance_remediation_dispatch` row`executor_type=hermes_km_review_dedupe_owner_archive``dispatch_status=succeeded``decision_context.workflow.current_stage=km_duplicate_archive_after_owner_approval`,並記錄 canonical / archived ids / owner / next_action=`stale_ratio_recheck`
- UI`/awooop/work-items` 的 KM 草稿去重視圖新增 Lucide `Archive` owner action button按下後送 canonical + duplicates + owner approval成功後重新抓 production telemetry。UI copy 全部走 i18n。
- 邊界T93 打通 owner 審核後的 duplicate soft-archive 操作,不代表 AI 可自動封存高影響 KM高影響知識仍需 owner reviewAI 只能產生草稿、dedupe plan 與可稽核建議。
- Local verification`py_compile` ok治理 endpoint / dispatcher / Hermes worker tests `59 passed`Work Items Next lint ok`tsc --noEmit` okruff okshared-types regenerate 後無 diff`git diff --check` pass。
- 目前進度更新:治理告警可讀性 / 可處置性約 97.8%AI Agent ownership 可追溯性約 96.3%KM healthcheck 派工可追蹤性約 99%Hermes KB growth 草稿 / owner review 閉環約 98.2%;完整 AI 自動化管理產品化約 95.6%。
---
### 2026-04-20 晚 (台北) — C1-C4 全流程串接 — Playbook 鏈路保護commit de2d34d