fix(rectification): re-ask superseded collect ids instead of fake delivery (BUG-644/645)
A superseded collect row still occupied the unique question id, so the last "没有" skipped the unasked domain and spoke delivery copy while can_adopt stayed false. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9956,3 +9956,35 @@
|
||||
- 相关记录:BUG-593
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-644 | 被顶替的采集题号永久占位,落库撞号后当成已问过并断流
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-10
|
||||
- 最近更新:2026-09-10
|
||||
- 影响面:`persistCollectFocus`、`persistExhaustionCollect`、`set_v10_conversation_focus`
|
||||
- 用户现象:同一轮里分两次记下两件经历后,再答完各领域采集题,最后一条线回「没有」,助手改口说「这次给出的范围…」,下面是「没有拿到下一个问题。」感情采集题从未出现过。
|
||||
- 触发条件:一轮里 `record-evidence-batch` 被调两次,第一次落下的采集焦点被第二次顶替成 `superseded`;之后计划层仍要问那个领域。
|
||||
- 根因:RPC 把旧焦点改成 `superseded` 而不删行,`unique (case_id, question_id)` 仍占着原题号。计划层看不到 superseded,`collect_retry` 为 false,`persistCollectFocus` 撞号直接 `duplicate_focus`。`persistExhaustionCollect` 把 `duplicate_focus` 当成「这题已经问过并关掉了」,跳过口语采集走进交付旁白。
|
||||
- 修复:采集题撞号一律试 `:next` / `:next2` / `:next3`;`collect_retry` 只换重问文案。`duplicate_focus` 与其它落库失败一样返回采集口语或中间态范围句,并在 `rectification_exhaustion_collect` 日志写下 `persist_status` 与题号。点选探针题号不加后缀。
|
||||
- 验证:`frontend/tests/rectification-superseded-focus.test.ts`、`frontend/tests/rectification-server-focus.test.ts`。
|
||||
- 防复发:采集题撞号不得因 `collect_retry` 为 false 就放弃换号;`duplicate_focus` 不得落到 adopt 分支。
|
||||
- 相关记录:BUG-462、BUG-520、BUG-525、BUG-559、BUG-626、BUG-627、BUG-633、BUG-645
|
||||
- 复发自:BUG-462、BUG-626(题号唯一约束叠上顶替不删行)
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-645 | 出口旁白说「这次给出的范围」却没有卡、公开 can_adopt 为 false
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-10
|
||||
- 最近更新:2026-09-10
|
||||
- 影响面:`persistExhaustionCollect`、`persistNextInterviewAfterChoice`、`POST /api/rectification/agent` 非收敛区间分支、`deliveryNarrationAllowed`
|
||||
- 用户现象:助手正文是交付三句(「这次给出的范围…代表性候选」),公开 `can_adopt=false`、没有对照卡,下面是「没有拿到下一个问题。」
|
||||
- 触发条件:内部 `decision.canAdopt` 为真,但 `session_outcome=collect_evidence`,公开 `can_adopt` 仍为 false;穷尽采集落库失败后走进 adopt 旁白。
|
||||
- 根因:交付旁白只看内部 `canAdopt`。公开 `can_adopt` 只在采用结果态为真,采集期即使内部可采纳也不出卡。
|
||||
- 修复:新增 `deliveryNarrationAllowed`:必须 `publicCanAdopt` 为真,或 `selection_allowed` 且下一动作为 `offer_provisional_range`。三处调用在不允许时改用中间态范围句加当前采集题。
|
||||
- 验证:`frontend/tests/rectification-superseded-focus.test.ts`、`frontend/tests/agent-voice-copy-contract.test.ts`、`frontend/tests/rectification-delivery-report-facts.test.ts`、`frontend/tests/rectification-exhaustion-exit-20260906.test.ts`。
|
||||
- 防复发:`can_adopt=false` 时源码合同禁止交付句路径;公开不能采用时不得输出「这次给出的范围」。
|
||||
- 相关记录:BUG-644、BUG-626、BUG-627
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# PROGRESS · 被顶替的采集题号永久占位(2026-09-10)
|
||||
|
||||
工作树:`.worktrees/rectification-superseded-focus-duplicate-20260910`
|
||||
分支:`codex/rectification-superseded-focus-duplicate-20260910`
|
||||
任务书:`docs/tasks/TASK-rectification-superseded-focus-duplicate-20260910.md`
|
||||
基线:任务书写 `origin/staging` @ `82eb3b79`;开工接到最新 `origin/staging` @ `d40f2032`(含 BUG-635~640 落地后的任务书 rebase)。
|
||||
|
||||
## 开工回执
|
||||
|
||||
- 编号 **BUG-644**(P0)/ **BUG-645**(P1)。`docs/BUG_HISTORY.md` 当时最大已发布号是 640;641~643 仍由采集语义单占用,本单按任务书从 644 起。
|
||||
- 顺序:采集撞号必换号 → `duplicate_focus` 不落 adopt → 交付口吻守卫 → 记录。T4 延后。
|
||||
- 未改 Skill、引擎、迁移。
|
||||
|
||||
## 已完成
|
||||
|
||||
- **T1**:`persistCollectFocus` 撞号依次试 `:next` / `:next2` / `:next3`;`collect_retry` 只换重问文案。点选探针路径仍一次撞号即 `duplicate_focus`。
|
||||
- **T2**:`persistExhaustionCollect` 删除「duplicate_focus = 已问过」特判;失败时返回采集口语或中间态范围句;日志加 `persist_status`、`question_id`。
|
||||
- **T3**:`deliveryNarrationAllowed`;`persistNextInterviewAfterChoice` skip、`persistExhaustionCollect` adopt、路由 `isNonConvergingRangeOffer` 三处共用。不允许时不用交付句。
|
||||
- **T5**:BUG-644/645、CHANGELOG、走查清单、本文件。Skill 版本不变(`10.0.21`)。
|
||||
|
||||
## T4 延后
|
||||
|
||||
同轮多次 batch 的 `persistPlanFocus` 先 resolve 再新建,只减少 superseded 行,不是闭合点。`resolve(status="superseded")` 也不是现有 resolve RPC 的合法状态;unique `(case_id, question_id)` 即使改成 resolved 仍占题号。T1 换号已闭合再问。
|
||||
|
||||
## 验收命令(实测)
|
||||
|
||||
工作树相对 `origin/staging` @ `d40f2032`。
|
||||
|
||||
| 命令 | 结果 |
|
||||
| --- | --- |
|
||||
| `frontend` `tsx --test` 任务书相关文件(superseded-focus / server-focus / spoken-collect / exhaustion-exit / delivery-report-facts / agent-voice / skipped-health) | **79/79 pass** |
|
||||
| 追加 `answer-choice` / `range-offer-deadend` / `adopt-narration` / `collect-direction` | **79/79 pass** |
|
||||
| `frontend` `./node_modules/.bin/tsc --noEmit` | **0 error** |
|
||||
| `frontend` 对改动文件 `eslint` | **0 error** |
|
||||
| `git diff --check` | 待提交前再跑 |
|
||||
|
||||
相关套件基线(staging 上 `test(` 条数)71;本单新增 `rectification-superseded-focus.test.ts` 并给 copy-contract 加 1 条,总数高于基线。
|
||||
|
||||
### 既有断言改动
|
||||
|
||||
- `rectification-server-focus.test.ts` `collect focus unique conflict is duplicate_focus unless collect_retry`:原值 duplicate_focus / RPC 一次 / 新值 `:next` 成功、原文案 / 原因:BUG-644 被顶替题号必须能再问。
|
||||
- 同文件探针 `duplicate focus conflict does not throw`:补 `writes=1` 且题号不含 `:next`。原因:BUG-559,点选探针不得加后缀。
|
||||
|
||||
## 环境缺口
|
||||
|
||||
- 无登录态:`docs/testing/rectification-superseded-focus-duplicate-20260910.md` 真人走查未做,不得写通过。
|
||||
- 未跑 `next build`,未核 `/` 是否仍 Static、首屏 gzip ±2%。
|
||||
- 未推 staging,未核 `/api/health` 的 `deployment.gitCommit`。
|
||||
|
||||
## 未做
|
||||
|
||||
- T4 同轮多次 batch 计划焦点。
|
||||
- 未提升 `main`。Skill 未升版。
|
||||
- 未实现 BUG-641~643。
|
||||
@@ -0,0 +1,28 @@
|
||||
# 生时校正 · 被顶替的采集题仍能再问(2026-09-10)
|
||||
|
||||
对应 BUG-644 / BUG-645。不要把真实案例里的姓名、地点、精确出生资料或 Case id 写进记录。
|
||||
|
||||
自动化已锁:`frontend/tests/rectification-superseded-focus.test.ts`(撞号换号、四次撞号、`duplicate_focus` 不交付、三处守卫)、`frontend/tests/rectification-server-focus.test.ts`(无 `collect_retry` 也换号;探针不加后缀)、`frontend/tests/agent-voice-copy-contract.test.ts`(`can_adopt=false` 不得走交付句)。
|
||||
|
||||
## 0. 确认测的是新版本
|
||||
|
||||
浏览器打开 `https://staging.jyotisha.chat/api/health`,看 `deployment.gitCommit` 是否等于本单合入 staging 后、含代码改动的提交。不一致 = 先别测。
|
||||
|
||||
## 1. 一轮里分两句说两件学业经历,走完采集后回「没有」(P0)
|
||||
|
||||
资料:家人记得大概时间,钟点任意,范围「差不多准」。地点任意公开城市。虚构经历即可。
|
||||
|
||||
1. 开场后在**同一轮**里先说一件带年月的学业经历,等助手开始记;再立刻补第二件不同年月的学业经历(诱发两次 batch)。
|
||||
2. 按提示走完家人 / 财务 / 搬家 / 健康等采集题;能跳过的打字「没有」。
|
||||
3. 不要主动说感情经历。
|
||||
|
||||
- ✅ 预期:各领域采集问完后,会出现感情采集题,而不是「没有拿到下一个问题。」
|
||||
- ✅ 预期:未出现可采用卡时,助手不得说「这次给出的范围」或「代表性候选」却不出卡。
|
||||
- ❌ 失败:最后一条线答「没有」后直接交付三句、下面缺口文案、顶部还在核对。
|
||||
|
||||
## 2. 带年月的感情经历仍可直接写入(绕行)
|
||||
|
||||
若第 1 节仍复现,直接打一句带年月的感情经历(例如「某年某月开始交往」)。
|
||||
|
||||
- ✅ 预期:batch 写入并重算,不依赖那道被挡住的采集题。
|
||||
- ✅ 或点「先这样」:`selection_allowed=true` 时应出区间卡,而不是只有交付口吻。
|
||||
Reference in New Issue
Block a user