Files
Jyotisha/docs/tasks/TASK-beta-capacity-fix-20261015.md
T

3.0 KiB
Raw Blame History

TASK · 内测容量修复单(issue #76,第 1 次打回)

  • 日期:2026-10-15
  • 原任务书:docs/tasks/TASK-beta-capacity-20261014.md
  • 被验 SHA:a54f75e5e33775d5dc91f3058f5505a56b498bf2(codex/beta-capacity-20261014)
  • 执行方:Grok,同一分支续做(先 merge 最新 origin/staging,不改写已推历史)

1. 验收结论:逻辑通过,全量多出 2 条失败

检查 结果 证据
按用户限流 通过 问、校正每轮、报告每小时各有分钟 / 小时两档;任一档满就整体拒,拒绝不记账;都在扣点之前
重计算短排队 通过 并发仍是 2(BUG-717);最多 4 个等待、每个最多 8 秒,等不到仍 429(BUG-720 有上限)
前端排队重试 通过 最多 2 次、总等待 ≤ 15 秒;最终失败走原取消路径
tsc / lint 通过 —
前端全量 未通过:新增 1 条 frontend/tests/consultation-voice-contract.test.ts「consult user turn no longer dumps tool JSON that the model would parrot」:/await runConsultationWorkflow\(toolInput/ 不再匹配——route.ts 改成了 await retryOnConsultationRateLimit({ run: () => runConsultationWorkflow(toolInput, …) })
Python 全量 未通过:新增 1 条 tests/test_repo_privacy_markers.py::test_tracked_repository_has_no_privacy_markers:HOME_PREFIX frontend/tests/personal-report-api.test.ts lines=845,873,903

第 2 条不是真的隐私泄漏:这三行是已有的、经审过的虚构路径样本,tests/test_repo_privacy_markers.py 的 SAFE_LINES 按「文件 + 行号 + 整行」锁定它们。本单在它们上面插入了一条 13 行的新测试,行号整体下移,白名单就对不上了。

2. 修法要求

  1. consultation-voice-contract.test.ts:按 §7.3 写三栏改断言,意图不放宽——仍要锁住「工作流调用的入参是 toolInput」与该测试原本关心的那段(用户轮不再塞工具 JSON);新正则匹配 runConsultationWorkflow(toolInput 即可,不得去掉对 toolInput 的锁定。
  2. 隐私白名单二选一(推荐 a): a. 把新加的「hourly rate limit returns 429」测试挪到文件末尾,让那三行回到原行号,SAFE_LINES 不动; b. 更新 SAFE_LINES 里这三行的行号,按三栏写原值 / 新值 / 原因。
  3. 再 grep 一遍 route.ts / rectification/agent/route.ts / reports/route.ts 被改写语句在 frontend/tests、tests 里的源码文本断言(§7.8)。
  4. 交回前本机跑:npx tsx --test tests/consultation-voice-contract.test.ts tests/runtime-sources-no-test-imports.test.ts 与 python -m pytest tests/test_repo_privacy_markers.py -q。
  5. 业务代码不改。

3. 环境缺口(不阻断)

frontend/scripts/research/beta-load-smoke.mts 并发压测未跑(无测试验证码、无预发主机)。合入部署后由 Claude 在验收清单里列给产品负责人,或另开一单在 staging 跑。

4. 让步顺序

无。第 1 次打回。