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:
Jesse_Chen
2026-09-10 21:03:12 +08:00
co-authored by Cursor
parent d40f2032fc
commit a3a51c32c2
11 changed files with 621 additions and 79 deletions
@@ -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-635640 落地后的任务书 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-641643。