docs(routing): record p2-t3 remote verification

This commit is contained in:
phamnazage-jpg
2026-05-29 13:43:23 +08:00
parent 2896e62071
commit 112ed67f6b

View File

@@ -253,6 +253,72 @@
- 正式入口 `POST /api/routing/chat/completions` 已经可用
- canonical shadow route + managed subscription key + real host `/v1/chat/completions` 已在正式入口下再次验证为 `200`
- `P2-T3` 可以直接在这一入口之上补 route 健康视图与聚合状态
- 2026-05-29 已完成 Phase 2 / `P2-T3 route 健康视图`
- 提交:`2896e620 feat(routing): add route health admin view`
- 新增聚合状态 API
- `GET /api/routing/routes/health`
- 可选过滤:
- `logical_group_id`
- `route_id`
- `status=healthy|cooldown|failing|disabled`
- 聚合字段首版已收口:
- `route_id`
- `route_name`
- `logical_group_id`
- `shadow_host_id`
- `shadow_group_id`
- `priority`
- `runtime_status`
- `failure_count`
- `cooldown_until`
- `cooldown_reason`
- `last_error_class`
- `last_selected_at`
- `last_upstream_status`
- `recent_failover_count`
- 新增管理页:
- `https://sub.tksea.top/portal/admin/route-health.html`
- 现有管理导航已接线:
- `admin/index.html`
- `admin/logical-groups.html`
- `admin/providers.html`
- `admin-batch-import.html`
- 本地门禁已通过:
- `gofmt -l .`
- `go vet ./...`
- `go test -cover ./internal/...`
- `go test ./tests/integration/... -count=1`
- `bash ./scripts/test/test_tksea_portal_assets.sh`
- `bash ./scripts/test/test_real_host_scripts.sh`
- remote43 已原位升级到 `repo HEAD = 2896e620`
- `http://127.0.0.1:18173/healthz` 返回 `ok`
- portal 已重新发布,公网健康页在线:
- `GET https://sub.tksea.top/portal/admin/route-health.html -> HTTP 200`
- 页面标题包含 `Route Health Admin`
- remote43 真实矩阵已通过:
- 临时 `logical_group_id = p2t3-health-1780033345`
- `primary-1780033345` 写入 cooldown`runtime_status=cooldown`
- `failing-1780033345` 写入 route failure`runtime_status=failing`
- `POST /api/routing/resolve`
- `request_id=req-p2t3-health-1780033345`
-`primary-1780033345` 处于 `active_cooldown:degraded`
- 自动切到 `fallback-1780033345`
- `resolve.route_id=fallback-1780033345`
- `fallback_used=true`
- 再次回读 `GET /api/routing/routes/health?logical_group_id=p2t3-health-1780033345`
- `primary-1780033345=cooldown`
- `fallback-1780033345=healthy`
- `failing-1780033345=failing`
- `fallback-1780033345.last_selected_at` 已写入
- `fallback-1780033345.recent_failover_count=1`
- `GET /api/routing/logs/failovers?request_id=req-p2t3-health-1780033345&limit=5`
- `from_route_id=primary-1780033345`
- `to_route_id=fallback-1780033345`
- `reason=active_cooldown:degraded`
- 当前结论:
- route 健康页已经能把 `cooldown / failing / healthy / disabled` 四态聚合出来
- 健康页与真实 `resolve` / `failover` 日志已经对齐
- `P2-T4` 可以开始把这些验证步骤收敛成标准化验收矩阵与脚本
- 2026-05-28 已完成 Phase 1 / `P1-T1 SQLite schema foundation`
- 提交:`7f75d8a6 feat(routing): add logical group schema foundation`
- 新 migration`internal/store/migrations/0010_logical_groups_and_routes.sql`