fix(web): isolate rectification answers from tool-step planning text
Mastra intermediate text-delta was published as answer.delta, then set-focus domain errors reset the attempt and replayed evidence. Publish only the terminal no-tool step, persist the next probe on the server, and ground batch quotes in the source turn. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5531,6 +5531,22 @@
|
||||
- 复发自:无
|
||||
- 修复版本:未修复
|
||||
|
||||
## BUG-368 | 工具步骤英文规划被当成回答,set-focus 失败又整轮重放证据
|
||||
|
||||
- 状态:resolved(本地修复,待提交与发布)
|
||||
- 首次发现:2026-08-24
|
||||
- 最近更新:2026-08-24
|
||||
- 影响面:`POST /api/rectification/agent`、Mastra `fullStream` 步骤边界、`rectification-set-focus`、Evidence Batch、用户消息 origin、推荐问题
|
||||
- 用户现象:用户说「2020年4月开始实习、6月转正、10月离职」后,界面先刷出残缺英文(`Let me`、`_probe`、`_gain`)。`rectification-set-focus` 连续失败后整轮重跑,已成功的证据再提交一次,只落地实习、另外两条被引文拒。随后聊天里出现一条用户从未输入的「2002 年发生什么了」。
|
||||
- 触发条件:自由文本经历回合;Agent 在调用工具前输出规划文本;`set-focus` 因重复探针或零信息增益被拒;失败运行的推荐问题被写进历史。
|
||||
- 根因:三组独立回归。(1) 禁止 `thinking.delta` 后,把每个 step 的 `text-delta` 都公开成 `answer.delta`,工具前规划变成用户正文;再对碎片做英文过滤,句子被剪成残片。(2) `compare-candidates` 已算出下一问,仍让模型自己调 `set-focus`;确定性校验失败后 `attempt.reset` 重放已成功的 Evidence 写入。(3) 未完成运行的 suggestion / 角色映射把「2002 年发生什么了」写成 user 消息。2002 不是引擎从 2020 算出来的。
|
||||
- 修复:按 step 缓冲,只发布无工具且 `stop`/`length` 的终端文本;`reasoning-delta` 不下发。Agent 工具列表去掉 `set-focus`,由 compare/read-case 在服务端持久化 `open_question`。`duplicate_focus` 等域错误不整轮重试,相同工具参数最多一次。用户消息记录 `origin`/`clientActionId`/`content_hash`。Evidence quote 用源消息 offset,按条返回 created/already_exists/quote_mismatch。推荐问题只在 `run.completed` 后解析,纠正 UI 仍无 suggestion chip。不改已哈希 Skill `10.0.11`。
|
||||
- 验证:`frontend/tests/rectification-step-answer.test.ts`、`frontend/tests/rectification-v9-stream.test.ts`、`frontend/tests/rectification-server-focus.test.ts`、`frontend/tests/rectification-evidence-quote.test.ts`、`frontend/tests/rectification-agentic-entry.test.ts`、`frontend/tests/rectification-v10-tool-contract.test.ts`。
|
||||
- 防复发:禁止把含工具调用的 step 的 `text-delta` 发给浏览器。禁止把 `thinking.delta` 改名为 `answer.delta`。禁止模型驱动 `set-focus`。禁止对 `duplicate_focus` / `quote_mismatch` / `zero_information_gain` 做 `attempt.reset`。禁止未完成运行解析或自动提交 suggestion。禁止模型改写 Evidence quote。
|
||||
- 相关记录:BUG-345、BUG-354、BUG-357、BUG-367
|
||||
- 复发自:BUG-367(关掉公开 `thinking.delta` 后,中间 step 的 `text-delta` 被整段当成回答)
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-367 | 点选 A 被当成聊天,部分写入后长推理失败并抢走滚动
|
||||
|
||||
- 状态:resolved
|
||||
|
||||
Reference in New Issue
Block a user