feat(awooop): summarize gateway usage in truth chain
This commit is contained in:
@@ -7104,3 +7104,37 @@ provider_error=Host '192.0.2.1' not in SSH_MCP_ALLOWED_HOSTS
|
||||
- T9 已完成:已批准 SSH execution 會進 first-class `McpGateway`,不再是 `legacy_direct_provider`。
|
||||
- smoke 使用 `192.0.2.1` 保留位址,故 provider failure 是預期安全結果;重點是五閘門與 audit 已真實通過到 provider 前一層。
|
||||
- 目前整體進度更新:約 65%。
|
||||
|
||||
### 2026-05-13 — AwoooP truth-chain T10:MCP Gateway 使用狀態摘要(local green)
|
||||
|
||||
**目的**:
|
||||
|
||||
- 讓 Operator 不只看到 Gateway raw records,也能直接判斷「是否真的經過 AwoooP MCP Gateway」、「是不是 legacy bridge」、「哪個 agent/tool/scope」、「卡在 gate 還是 provider」。
|
||||
- 對應 Telegram 告警看不出 AI 自動化流程進度的問題,truth-chain 要提供可查、可聚合的狀態面。
|
||||
|
||||
**變更**:
|
||||
|
||||
- `awooop_truth_chain_service.py` 新增 `_summarize_gateway_mcp()`。
|
||||
- `mcp.awooop_gateway` 現在包含:
|
||||
- `first_class_total`
|
||||
- `legacy_bridge_total`
|
||||
- `policy_enforced_total`
|
||||
- `approval_executor_total`
|
||||
- `stage` / `stage_status` / `needs_human` / `blockers`
|
||||
- `by_agent` / `by_tool` / `by_scope`
|
||||
- 只用 Gateway trace id 查詢時,`found=true`,並以 Gateway summary 推導 truth status。
|
||||
|
||||
**local verification**:
|
||||
|
||||
```text
|
||||
python -m pytest tests/test_awooop_truth_chain_service.py tests/test_platform_router_order.py tests/test_awooop_operator_auth.py -q
|
||||
19 passed
|
||||
|
||||
python -m ruff check --select F821 src/services/awooop_truth_chain_service.py tests/test_awooop_truth_chain_service.py
|
||||
All checks passed
|
||||
|
||||
python -m py_compile src/services/awooop_truth_chain_service.py tests/test_awooop_truth_chain_service.py
|
||||
OK
|
||||
```
|
||||
|
||||
**目前整體進度**:約 66%。
|
||||
|
||||
Reference in New Issue
Block a user