fix: align release benchmark with abuse limits
Build and Test Quality Gate / Contract Web typecheck and build (pull_request) Successful in 2m58s
Build and Test Quality Gate / Python tests and Contract API migration (pull_request) Failing after 15m25s
Security Quality Gate / npm audit, Bandit, pip-audit, detect-secrets (pull_request) Successful in 5m14s

This commit is contained in:
2026-08-11 17:36:33 +08:00
parent effbefc83d
commit c24f7a4f1e
4 changed files with 50 additions and 7 deletions
@@ -16,7 +16,8 @@
4. Nginx 为同步 `/contract/api/v1/legal/qa` 设置独立 660 秒上限,覆盖 Contract 允许的 600 秒最大值;其他 Contract 路由仍保持 120 秒。
5. Compose 的 migrate、Contract API 和 review worker 三个服务均映射 timeout;共享预发布部署脚本显式写入 Contract 240 秒和 Provider 180 秒,避免重部署恢复默认 30 秒。
6. 生产 Web 使用 `/contract`、`/ai` 边缘前缀时,Contract 与 AI 请求均保留 base path。统一出口还会规范化 33 个旧 AI 代理路由生成的无前缀 URL;角色判断和 Contract 公共健康检查使用移除边缘前缀后的逻辑 API 路径,避免修复路由时引入权限回归。
7. 身份执行器、support access API 和破坏性身份写接口继续关闭。共享预发布 OpenAPI 中包含 `execute`、`support-access` 或 `support_access` 的路由数为 0。
7. release gate 的实时 benchmark 默认调整为每场景 15 次、并发 3、预热 2;包含探测请求后仍低于 enforce 模式最严格的每用户 20 次/分钟读取门槛,不关闭或绕过反滥用。独立性能压测仍保留显式大负载能力。
8. 身份执行器、support access API 和破坏性身份写接口继续关闭。共享预发布 OpenAPI 中包含 `execute`、`support-access` 或 `support_access` 的路由数为 0。
## 自动化验证
@@ -24,7 +25,7 @@
| --- | --- |
| Contract API 全量 | `286 passed, 3 skipped`;跳过项仅为需显式 PostgreSQL URL 的并发专项 |
| AI Platform API、AI worker、Python SDK | `162 passed` |
| Infra production release tools | `62 passed` |
| Infra production release tools | `63 passed` |
| 本轮 timeout 定向回归 | `28 passed` |
| Contract Web 单元测试 | `17 passed`,其中既有入口/会话/工作空间 12 项,生产 API base path、幂等规范化和逻辑权限路径 5 项 |
| Contract Web typecheck | 通过 |
@@ -47,12 +48,13 @@
- Contract timeout:240 秒;API 与 review worker 容器均实际读取为 `240.0`
- Contract API 镜像:`sha256:5072971b7bdda62036791cc5836faece78b5a8615a98fd98ad5e9b4999e3f51a`
- Contract review worker 镜像:`sha256:35a76a9f6dd5dd44f6545d029cd0e621ea909251c7aabccd6e4cd860a37f11be`
- Contract Web 镜像:`sha256:ed6b931d7a104e042da21c5516728cd193190b3cee11e74e41d98a9f517fba4f`;已定向部署生产 base-path 修复,容器 healthy,`/health` 与 `/login` 均为 HTTP 200,容器内回归 `5/5`
- 真实审查:合同 `contract-096914efc203`、任务 `review-e8100aa210d4`,约 93 秒后状态为 `succeeded`,并持久化 AI audit run id
- post-deploy release gate:`pass`;Contract 与 AI schema-check 均为 `ok`
- post-deploy release gate:`pass`;Contract 与 AI schema-check 均为 `ok`,实时 benchmark 以 15 次/场景、并发 3、预热 2 完成 7/7,错误率均为 0,p95 均低于门槛
- 8 个共享预发布服务全部 healthy
- 根盘:92% 使用,约 17 GiB 可用;未自动清理镜像、卷或业务数据
远端变更前备份位于 `/opt/apps/ai-contract-platform-v2-smoke/.runtime/pre-contract-timeout-20260811-1650/`。本地 release gate 证据位于忽略目录 `.runtime/postdeploy-release-gate-timeout-fix-20260811/`,不包含服务密钥。
远端 Contract 变更前备份位于 `/opt/apps/ai-contract-platform-v2-smoke/.runtime/pre-contract-timeout-20260811-1650/`;Web base-path 定向部署前备份位于 `/opt/apps/ai-contract-platform-v2-smoke/backups/pre-web-base-path-effbefc.tgz`。最新 release gate 证据位于 `project-docs/qa-artifacts/v2-release-quality-gate/2026-08-11T17-34-10/`;此前 timeout 专项证据位于忽略目录 `.runtime/postdeploy-release-gate-timeout-fix-20260811/`。证据不包含服务密钥。
## 正式生产阻断项