fix(consult): a stored smalltalk reply is not a prior answer; summary counts as one (acceptance fix for BUG-1071)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199rbQDTsUbCVw84wc8BTFe
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
2b435f11d0
commit
9d01757f27
+2
-2
@@ -14395,8 +14395,8 @@
|
||||
- 现象:会话里第二个问题起(「那我爸呢」「我妈是不是不太在意我」),回答仍是口语开场加四个二级标题的完整解读,重述上一轮已经写过的宫位;用户感受是「太宽泛」。
|
||||
- 触发条件:同一会话已有一轮本命解读后的任何追问。
|
||||
- 根因:`jyotishInstructions`「Call run-jyotish-consultation before answering every turn, including short follow-ups」、`natalSpokenReportContract` 末句「One natal … question still uses the opener-plus-skeleton above」、每轮用户轮的 `natalAnswerShapeInstruction()`「一次写完这四个二级标题」三处都不区分首轮与追问轮。
|
||||
- 修复:`consultation-thinking-plan.ts` 新增 `followUpAnswerShapeInstruction()`(≤ 200 字、第一句答问的那句、是非题先答是 / 不是、最多三处盘面事实、不写二级标题、不写行动清单、不重述上一轮、不解释用户为什么问;明确换领域或要求完整看才回首轮形状)、`hasPriorAssistantAnswer(history)`(存量历史里已有非空 assistant 正文即追问轮,不看问句字面)与 `natalUserTurnShape()`(daily 不变 / 追问 / 首轮);`route.ts` 用户轮按它切指令,grounded 兜底同样切换(同一份 `legacyNatalInstruction`);思考栏与工具上下文带 `followUpTurn`。合同末句改为「首轮用开场 + 骨架,追问轮按用户轮里的指令」。工具仍每轮调用,扣点与结算不变(D7)。
|
||||
- 验证:新文件 `frontend/tests/consult-answer-the-question-20260927.test.ts`:真实 Agent + 记录提示词的假模型 + 公开盘 golden,追问轮 → 写作步的提示词含「这是追问轮 / 不超过 200 字」、不含三标题指令,工具跑 1 次、模型 2 次,无标题短正文(< 160 字)整段放出并结算扣点 1 次;首轮对照用例保持开场 + 三标题。`consultation-thinking-plan.test.ts` 覆盖 `hasPriorAssistantAnswer` / `natalUserTurnShape` 四种情况(空历史、只有用户轮、空白 assistant、有回答;daily 不受历史影响)。
|
||||
- 修复:`consultation-thinking-plan.ts` 新增 `followUpAnswerShapeInstruction()`(≤ 200 字、第一句答问的那句、是非题先答是 / 不是、最多三处盘面事实、不写二级标题、不写行动清单、不重述上一轮、不解释用户为什么问;明确换领域或要求完整看才回首轮形状)、`hasPriorAssistantAnswer(history, { summaryText })`(存量历史里已有非空、且不是寒暄回复(`responseKind: "smalltalk"`)的 assistant 正文即追问轮,会话摘要存在也算;不看问句字面。Claude 验收补修:子代理首版只看 role,「你好」的寒暄回复也存成 assistant 消息,会把其后第一个正式问题当追问;历史窗口现在把 `responseKind` 透传到 tail)与 `natalUserTurnShape()`(daily 不变 / 追问 / 首轮);`route.ts` 用户轮按它切指令,grounded 兜底同样切换(同一份 `legacyNatalInstruction`);思考栏与工具上下文带 `followUpTurn`。合同末句改为「首轮用开场 + 骨架,追问轮按用户轮里的指令」。工具仍每轮调用,扣点与结算不变(D7)。
|
||||
- 验证:新文件 `frontend/tests/consult-answer-the-question-20260927.test.ts`:真实 Agent + 记录提示词的假模型 + 公开盘 golden,追问轮 → 写作步的提示词含「这是追问轮 / 不超过 200 字」、不含三标题指令,工具跑 1 次、模型 2 次,无标题短正文(< 160 字)整段放出并结算扣点 1 次;首轮对照用例保持开场 + 三标题。`consultation-thinking-plan.test.ts` 覆盖 `hasPriorAssistantAnswer` / `natalUserTurnShape` 四种情况(空历史、只有用户轮、空白 assistant、有回答;daily 不受历史影响)。验收补修加:寒暄回复后仍是首轮形状、摘要存在即追问、空白摘要不算;`consultation-session-history.test.ts` 加 `responseKind` 透传用例。
|
||||
- 防复发:D6 硬红线——追问判定只用历史事实,禁正则识别意图(沿用 BUG-976/977);route 合同测试断言 `natalUserTurnShape({ entrypoint: consultEntrypoint, history })` 与 `followUpTurn` 的接线。
|
||||
- 相关记录:BUG-1070、BUG-1073、BUG-1053(答案由看过工具结果的步写)、BUG-976/977(禁正则)。
|
||||
- 复发自:无
|
||||
|
||||
Reference in New Issue
Block a user