Files
pikasTech-unidesk/.agents/skills/unidesk-sub2api/references/validation.md
T

15 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 验收口径
部署 closeout 至少包含:
- `sub2api status`Deployment/StatefulSet/Service/Secret/NetworkPolicy 可见,运行镜像与 YAML 一致,`NetworkPolicy/allow-all` 符合 `podSelector: {}`、Ingress/Egress 全放行。
- `sub2api validate`app、PostgreSQL、Redis、service proxy、`NetworkPolicy/allow-all` 和临时跨 Pod PostgreSQL/Redis 连通性检查通过。
- `codex-pool validate`:统一 key 的 `GET /v1/models` 成功,并用 `localCodex.responsesSmokeModel` 跑一次小的 `POST /v1/responses` smokeowner balance / owner concurrency 已满足 YAML 最小值,capacity、WebSocket v2、Sub2API 内置 temporary-unschedulable 开关/规则和 sentinel runtime 状态与 YAML 对齐;`validation.gatewayResponsesRecent` 汇总最近 6 小时普通 `/responses``/v1/responses` 的 failover、forward failure、最终 4xx/5xx、慢 final error 与 `context canceled` 证据,`validation.gatewayCompactRecent` 单独汇总 `/responses/compact` 证据。若当前 Responses smoke `ok=true` 但 recent 字段 `degraded=true`,先区分是历史窗口残留还是新的 request id 正在失败;长期判定见 `docs/reference/platform-infra.md`
-`publicExposure.enabled=true`,确认 YAML 声明的 public path 可用。FRP target 检查 FRP pathPK01 local target 检查 PK01 Caddy managed block 和 loopback upstream。未带 key 的 public `/v1/models` 401 只能证明网关可达,不能证明账号池可调度。
- 多 target 同时启用 public exposure 时,必须分别验证每个 target 的 root、`/health`、未带 key `/v1/models` 401,以及各自 `codex-pool validate --target <id>`;一个域名可用不能替代另一个域名的验收。
- 若目标声明了 `egressProxy.enabled=true`,确认 proxy Deployment/Service readySub2API 和 sentinel env 与 YAML 对齐,并通过 YAML 声明的 health URL 完成代理出站探针。
如果要证明真实模型请求可用,使用最小 `/v1/responses` 或等价 Codex smoke。不要把 group-level `/v1/models` 成功解释成每个上游 account 都健康。
公网 `/v1/responses` smoke 应尽量复用 `codex-pool validate` 的非流式请求形态:带统一 key、`stream:false``store:false`、小 `max_output_tokens`、短输入、`X-Request-ID``OpenAI-Client-Request-ID`,并用同一 request id 跑 `codex-pool trace --target <id> --request-id <id>` 取证。PK01 host-Docker target 当前可能因 trace adapter 依赖 `kubectl` 而无法追踪;这时把 trace 失败记录为工具缺口,验收以 `status --target PK01``validate --target PK01`、public `/health`、public `/v1/models` 200 和 public `/v1/responses` 200 为准。不要用没有超时的临时脚本或省略 request id 的公网 POST 作为最终证据;`/v1/models` 200 只能证明 key 和模型列表入口可用,不能替代 Responses smoke。