docs: 申报时段整轮失败定位 BUG-954,出服务端预跑任务书

回执零 tool 步 + 有合同 retry + 公开码 runtime_contract_incomplete,
按 BUG-938 的分流规则排除供应商 error 块,两次 attempt 都是模型没调
工具。根因链 922→923→937:required 被拒后改回 auto,洞回归。窗口工具
入参只有 question,计算不需要模型触发,改服务端预跑。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
Jesse_Chen
2026-09-18 07:18:35 +00:00
co-authored by Claude Opus 5
parent 9cdcf96b18
commit d0317f7f4e
3 changed files with 103 additions and 0 deletions
+20
View File
@@ -12509,3 +12509,23 @@
- 相关记录:BUG-947、BUG-942
- 复发自:BUG-947
- 修复版本:`cd4775ae`
## BUG-954 | 申报时段咨询整轮失败:模型没调计算工具,合同判未完成
- 状态:investigating
- 首次发现:2026-09-18
- 最近更新:2026-09-18
- 影响面:`windowJyotishInstructions`、`consultationWindowPrepareStep`、`consult/route.ts` 申报时段分支、`contractReady()`
- 用户现象:staging(已部署 `9cdcf96b`)申报时段会话问「未来半年我事业如何?」,等待后 `run.failed code=runtime_contract_incomplete`,提示「Agent 未完成必要的方法与计算步骤,本次不会扣点。」公开事件只有 `run.started` → `skill.started/completed` → `activity loading-method` → `run.failed`。
- 触发条件:`consultationMode=declared_birth_window`、`theme=general`、`history=[]` 的首轮提问(问题带应期语义)。
- 已确认事实:
1. 回执 `steps` 只有 `skill` 与 `runtime-contract-retry` 两条,`stepBudget.used=2`,**没有任何 tool 步骤**,`workflow.route=declared-birth-window / status=blocked`,`skill.referenceReads=0`、`methodologySections=0`。
2. 该形状**不是**供应商 error 块那条路:BUG-938 的修复规定 error 块会追加 `validation model-stream-error failed`、不触发合同 retry、公开码为 `calculation_failed`。本次回执无该步、有 retry、公开码是 `runtime_contract_incomplete`,因此两次 attempt 都是「模型没调工具」。
3. `contractReady()`(`stream-agent-response.ts:336-339`)要求 `consultationToolSuccessCount === 1`;未绿时模型正文一律丢弃,所以模型若改成直接写一段文字回答,用户端看到的就是整轮失败而不是那段文字。
4. `run-jyotish-window-consultation` 的 `inputSchema` 只有 `question`(`consultation-tools.ts:765-767`),出生数据全部服务端绑定——由模型决定调不调,对计算结果没有任何信息增益。
- 初判根因(待日志确认):BUG-923 记录过「提示词是软约束,`toolChoice: "auto"` 不能保证第 0 步调用排盘工具」;BUG-937 因为某些 thinking 供应商拒收 `required`,把第 0 步改回 `activeTools` + `auto`,**等于把 BUG-923 的洞原样放回来**,且没有补第三条路。窗口指令同时写着「每轮必须先调工具」和「`can_answer_precise_timing` 恒为 false,不得给出月份 / 日期 / 大运边界」,而本次问题正是应期语义;模型在冲突下选择不调工具的可能性最大。
- 待取证据:staging 该 `requestId` 的服务端日志(`modelFinishReason`、是否有 `[consult-provider-error]`、模型是否产出过被丢弃的正文)、本次使用的模型 id 对应的供应商。没有这条日志之前不得把根因写成 resolved。
- 关联记录:BUG-205、BUG-214、BUG-922、BUG-923、BUG-937、BUG-938
- 复发自:BUG-923(`auto` 不保证调用这一条在 BUG-937 修复后回归)
- 修复版本:待发布