Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LutgzyJqNhPpZy1nFsJtN3
2.5 KiB
2.5 KiB
TASK · 答题推理强度开关修复单(issue #65,第 1 次打回)
- 日期:2026-10-15
- 原任务书:
docs/tasks/TASK-answer-effort-ab-20261013.md - 被验 SHA:
ab7f66be14d93a5ccbc3433f3c44e134a65b1e21(codex/answer-effort-ab-20261013) - 执行方:Grok,同一分支续做(先 merge 最新
origin/staging,不改写已推历史)
1. 验收结论:开关逻辑通过,前端全量多出 1 条失败
| 检查 | 结果 | 证据 |
|---|---|---|
| 开关默认关时请求体不变 | 通过 | CONSULT_ANSWER_REASONING_EFFORT 未设或为空时 answerEffortOptions 返回 {};非法值只警告一次按未设处理 |
| 只在答题步加强度 | 通过 | 主循环第 0 步 answerReady=false;公开日历从第一步即答题 |
| 改既有断言 | 通过 | consult-answer-clock-20261001.test.ts 三栏齐全 |
| tsc / lint / Python 全量 | 通过 | Python 与 staging 逐条一致(一条 prashna 族测试并发下抖动,单跑通过) |
前端全量 npm test |
未通过:新增 1 条 | frontend/tests/runtime-sources-no-test-imports.test.ts「files copied into the web image never import from frontend/tests」 |
根因:frontend/scripts/research/answer-effort-probe.mts 约 186 行 new URL("../../tests/fixtures/answer-effort-switch-20261013.json", import.meta.url)。web 镜像只复制 frontend/src 与 frontend/scripts,next build 会类型检查它们——推上 staging 后镜像构建会失败(BUG-1140;#58、#62 已因同一形状各打回一次)。
2. 修法要求
- 把
answer-effort-probe.mts挪到frontend/tests/answer-effort-probe.mts(文件名不得以.test.ts/.test.tsx结尾),路径改相对;同步改 PROGRESS 与docs/testing/answer-effort-ab-20261013.md里的命令。 - 交回前必须本机跑一次
npx tsx --test tests/runtime-sources-no-test-imports.test.ts,fail 与 cancelled 为 0,贴进回报。 - 业务代码不改;开关默认值不改。
3. 非阻断提醒(不要求本轮改,写进 PROGRESS 即可)
开关打开时,prepareStep 返回的 providerOptions 来自 agentGenerationSettings(model, { thinking: "enabled", ... })。确认它不会把基础流选项里原有的 providerOptions(思考预算、缓存等)整体覆盖掉;若会覆盖,在 BLOCKED.md 记下,等有模型 key 的 A/B 一并核对。
4. 验收标准
前端全量 npm test 失败清单与 staging 基线逐名相同;git diff ab7f66be..<新 SHA> -- frontend/src 为空。
5. 让步顺序
无。第 1 次打回。