Merge remote-tracking branch 'gitea/main' into codex/security-supply-chain-contracts-20260512

This commit is contained in:
Your Name
2026-05-13 15:59:19 +08:00
6 changed files with 388 additions and 4 deletions

View File

@@ -7742,3 +7742,70 @@ OK
```
**目前整體進度**:約 71%。
**production deploy / smoke 追加(完成)**
```text
Gitea:
2037 ai-code-review 0f080240 -> success
2036 CD Pipeline 0f080240 -> success
tests -> success
build-and-deploy -> success
post-deploy-checks -> success
K8s image:
awoooi-api 192.168.0.110:5000/awoooi/api:0f080240c658c9f7deb57ab0e7623342b946246a
awoooi-worker 192.168.0.110:5000/awoooi/api:0f080240c658c9f7deb57ab0e7623342b946246a
awoooi-web 192.168.0.110:5000/awoooi/web:0f080240c658c9f7deb57ab0e7623342b946246a
health:
https://awoooi.wooo.work/api/v1/health -> 200
truth-chain smoke:
INC-20260513-3A81EC -> verdict=received_only score=20 blockers=outbound/evidence/mcp/execution/auto_repair/timeline
INC-20260513-96B91A -> verdict=execution_unverified score=65 automation_operation_records=1 auto_repair_execution_records=0 verification_result=null
INC-20260513-42FCEC -> verdict=execution_unverified score=80 automation_operation_records=1 auto_repair_execution_records=0 verification_result=null
INC-20260513-9B082D -> verdict=execution_unverified score=65 automation_operation_records=1 auto_repair_execution_records=0 verification_result=null
telegram detail formatter smoke:
_format_automation_quality_lines(...) returned 6 lines with verdict + score + execution/evidence facts.
```
判讀:
- T12b 已部署Telegram 詳情與 truth-chain 現在能分辨:尚未處理、已執行但未驗證、真正 auto_repair+verification 成功。
- 目前實況仍顯示多筆 incident 是 `execution_unverified`,不能宣稱完整 AI 自動修復已完成。
- 下一步應把 `execution_unverified` 的 verification gap 收斂到 post-execution verifier / learning writeback而不是只在 Telegram 補文案。
- 目前整體進度更新:約 72%。
### 2026-05-13 — AwoooP truth-chain T12c全體告警自動化品質總覽local green
**目的**
- Operator 不應逐張 Telegram 卡片猜「是否重複發生」、「是否已進 AI 自動修復」、「卡在哪個流程」。
- T12c 先提供 read-only 聚合 API把最近 incident 全部套用 T12b automation quality gate回傳 verdict 分布、分數區間、缺失 gate、代表案例與 production claim。
**變更**
- 新增 `GET /api/v1/platform/truth-chain/quality/summary`
- query: `project_id` / `hours` / `limit`
- 回傳 `automation_quality_summary_v1`
- 顯示 `by_verdict``score_buckets``gate_failures``examples`
- `production_claim.can_claim_full_auto_repair` 嚴格要求所有評估 incident 都是 `auto_repaired_verified`
- 新增純函式 `summarize_automation_quality_records(...)`,讓品質總覽可單元測試。
- 新增 route-order 測試,確保 `/truth-chain/quality/summary` 不會被 `/truth-chain/{source_id}` 誤吃。
**local verification**
```text
DATABASE_URL=postgresql+asyncpg://u:p@localhost:5432/db pytest tests/test_awooop_truth_chain_service.py tests/test_platform_router_order.py -q
19 passed
ruff check --select F821 src/services/awooop_truth_chain_service.py src/api/v1/platform/truth_chain.py tests/test_awooop_truth_chain_service.py tests/test_platform_router_order.py
All checks passed
python3 -m py_compile src/services/awooop_truth_chain_service.py src/api/v1/platform/truth_chain.py tests/test_awooop_truth_chain_service.py tests/test_platform_router_order.py
OK
```
**目前整體進度**:約 73%。