fix(rectification): keep same-sentence dated events after structured answers
The choice and collect fast paths applied the answer then returned, so a dated event in the same utterance never reached the evidence ledger. Idle persist also prechecked follow-up with a hardcoded collect_evidence outcome instead of the dossier decision. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-3
@@ -6744,9 +6744,9 @@
|
||||
- 用户现象:点完若干区分卡后,助手口述问家里有没有结婚、添丁或住院这类记得住时间的事。用户回「没有」。助手只确认「记下了」,随后 `current_question` 与 `choice_card` 均为 null,`interview.type = ask_fact_collection`,对话停住,无法继续。
|
||||
- 触发条件:方法覆盖未齐(尤其 relatives),剩余可渲染探针都是无年份分盘题;用户对家人口述采集题给出明确否定,且该轮走自由文本而不是点选。
|
||||
- 根因:三段同时成立才会空转。(1) 「没有」既不是证据也不是计分答案,`answered_probes` 与 revision 不变;若焦点以 `resolved` 关闭,`declined_skipped_topics` 只聚合 `status in ('declined','skipped')`,`buildMethodFollowupPlan` 又只认 `target_domain`,覆盖度不前进。(2) 无年份分盘题被 `coverageComplete` 挡在 dated 排序之后,计划回落到同领域口述采集题;家人覆盖要求「有家人证据或有 declined 记录」,家里确实没发生过事的用户两条都不满足,而 `varga.d12` 本就是这道家人题、`no` 分支可以计分淘汰候选,却被当成不计分采集题问出去并丢失。(3) 点选路径有 `persistNextInterviewAfterChoice` 保证下一问落库;自由文本路径跑完 `runV9AgentTurn` 后没有同等兜底。Agent 不重复刚被否掉的问题(这点是对的),于是只确认不提问,`current_question` 变成 null。
|
||||
- 修复:P0:即将返回某领域 `intent=collect_method_evidence` + `source=method_coverage` 口述题时,若 `rankRenderableDiscriminators` 的 yearless 桶里有同领域可渲染探针,改出该 distinguish 卡(`followupFromRanked`,按既有 `rankDiscriminatorScore` 取最高)。未放宽 coverageComplete 对 yearless 的总排序,避免回归 BUG-405/407。无年份 varga 探针允许铸出 choice_frame,不得向题干借用账本年份。P1:采集焦点自由文本接入同一套轻量分类器;明确否定时服务端把焦点 resolve 成 `declined`(不是 `resolved`),并按点选路径持久化下一问。同步修正 `rectification-resolve-focus` 工具描述。未引入语义正则、关键词表或 A/B/C/D 位置推断。`focusStatusForAnswer` 的 `no → declined` 语义未改。P2:`runV9AgentTurn` 成功后若无 open focus 且 plan 仍有 followup,按点选路径补落下一问。Skill 版本保持 10.0.13,未放宽 confirmation gate。
|
||||
- 验证:`frontend/tests/rectification-collect-stall.test.ts` 9 项全过。revision 5 fixture 锁:plan 出 D12 distinguish 卡而不是家人口述题;答 C 焦点 declined 且按 d12 `no` 分支计分;relatives 覆盖后推进 occupation;occupation 口述明确否定 → declined 并推进 horary;自由文本轮结束后只要 plan 有 followup 则 `current_question` 非 null;覆盖未齐时仍先出可渲染有年份区分题,不同领域无年份分盘题仍不出。既有 eight-method / discriminator-followup 里「无年份家人对比在没有有年份区分题时改出口述题」的旧断言,去掉 P0 即变红,现改为期望 D12 卡。`npx tsc --noEmit` 通过;eslint 改动文件 0 error(8 条既有 warning)。指定套件 `tests/rectification-*.test.ts tests/birth-time-rectification-contract.test.ts tests/agentic-rectification-*.test.ts` 667 项、666 通过,1 项 `rectification-ingest-p0-database` 在并行 Docker 下 migration spawn 失败,单独重跑通过。全量 `tests/*.test.ts` 2261 项、2257 通过;4 项失败均为既有环境类(`database-billing-adjustments` / `database-redeem-security` Docker slot 超时、`database-personal-report-jobs` migration、`onboarding-route` 5ms/50ms 竞速),后一项单独重跑通过。失败集合未扩大到产品逻辑。
|
||||
- 防复发:同一领域的问题若存在可渲染计分卡,不得改用不计分口述题。采集题的明确否定必须产生 declined 记录,不得写成 resolved。出题层还有 followup 时 `current_question` 不得为 null。不得为了救这条空转而取消 coverageComplete 对 yearless 的总限制。
|
||||
- 修复:P0:即将返回某领域 `intent=collect_method_evidence` + `source=method_coverage` 口述题时,若 `rankRenderableDiscriminators` 的 yearless 桶里有同领域可渲染探针,改出该 distinguish 卡(`followupFromRanked`,按既有 `rankDiscriminatorScore` 取最高)。未放宽 coverageComplete 对 yearless 的总排序,避免回归 BUG-405/407。无年份 varga 探针允许铸出 choice_frame,不得向题干借用账本年份。P1:采集焦点自由文本接入同一套轻量分类器;明确否定时服务端把焦点 resolve 成 `declined`(不是 `resolved`),并按点选路径持久化下一问。同步修正 `rectification-resolve-focus` 工具描述。未引入语义正则、关键词表或 A/B/C/D 位置推断。`focusStatusForAnswer` 的 `no → declined` 语义未改。P2:`runV9AgentTurn` 成功后若无 open focus 且 plan 仍有 followup,按点选路径补落下一问。收尾:(a) 分类器新增可选 `has_new_dated_event`,缺失按 false;选择题与采集题快路径在该字段为 true 时先确定性地应用答案(计分 / declined),不落确定性正文、不 return,继续 `runV9AgentTurn` 记同一句里的新带时间事件;为 false 时行为与原先逐字一致。应用答案时 `deferFollowup`,让 Agent 看到没有 active focus,不得再 resolve。(b) `persistNextInterviewIfIdle` 预检改为先 `decideFromDossier`,用同一个 `decision.sessionOutcome` 建 plan,并复用该 decision 做 `publicNextAction`,不再写死 `collect_evidence`。Skill 版本保持 10.0.13,未放宽 confirmation gate。
|
||||
- 验证:`frontend/tests/rectification-collect-stall.test.ts` 锁 D12 卡、答 C declined 计分、occupation 否定推进 horary、自由文本后 `current_question` 非 null、有年份区分题仍优先。新增:缺失 `has_new_dated_event` 按 false;采集/选择题快路径在该字段为 true 时应用答案后进入 Agent 且不落确定性正文;采集否定 + deferFollowup 不抢先落下一问;选择题 deferFollowup 仍计分且不落下一问/正文;`persistNextInterviewIfIdle` 同一 dossier 只调用一次 `decideFromDossier`,预检 sessionOutcome 与决策层相同。`npx tsc --noEmit` 通过;eslint 改动文件 0 error。指定套件 `tests/rectification-*.test.ts tests/birth-time-rectification-contract.test.ts tests/agentic-rectification-*.test.ts` 672 项、0 失败。全量 `tests/*.test.ts` 2266 项、0 失败。失败集合未扩大到产品逻辑。
|
||||
- 防复发:同一领域的问题若存在可渲染计分卡,不得改用不计分口述题。采集题的明确否定必须产生 declined 记录,不得写成 resolved。出题层还有 followup 时 `current_question` 不得为 null。不得为了救这条空转而取消 coverageComplete 对 yearless 的总限制。确定性快路径不得吞掉同一句话里的新带时间事件。同一次调用里出题层与决策层必须用同一个 sessionOutcome。
|
||||
- 相关记录:BUG-404、BUG-405、BUG-407、BUG-411、BUG-432、BUG-437
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
Reference in New Issue
Block a user