fix(rectification): stop re-asking covered domains after adopt (BUG-590, BUG-591)
Independent Staging Quality Gate / validate (push) Successful in 11m33s
Independent Staging Quality Gate / publish (push) Successful in 7m49s

Yearless-to-collect now skips domains already confirmed, declined, or asked; adopt-exhausted turns skip leftover collect persist. Collect focus collisions only retry with :next when collect_retry is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-08 12:27:40 +08:00
parent 43fd8875ce
commit 7ca6ade244
11 changed files with 613 additions and 36 deletions
@@ -0,0 +1,44 @@
# PROGRESS · 已覆盖领域再采集(2026-09-08
工作树:`.worktrees/rectification-covered-domain-recollect-20260908`
分支:`codex/rectification-covered-domain-recollect-20260908`
任务书:`docs/tasks/TASK-rectification-covered-domain-recollect-20260908.md`
基线:`origin/staging` @ `43fd8875`
本单状态:**待验收**。本提交交付到 staging。
未改:采用门、确认门、`MIN_SEPARATION_LEAD``_relative_support``minute_step=1``SCORE_DELTA`、四选项合同、Skill 版本(仍 10.0.15)。
## 做了什么
- **决策 1** `method-followup.ts` 职业覆盖后的 yearless→采集:遍历全部 `yearlessDiscriminators`,跳过拒答、`hasConfirmedDomain`(含 `health`/`health_pressure`)和已问过 `collect:<domain>:*` 的领域。全部跳过则 `next` 保持空。
- **决策 2** `shouldSkipFollowupPersist``canAdopt` 且(`nextAction === "ready_to_adopt"``sessionOutcome === "adopt_representative"`)且 `stopReason === "probe_pool_exhausted"` 时,`isRemainingEvidenceCollect` 只有该领域没有确认事件且未拒答才算剩余采集;否则跳过持久化、`terminalNote`
- **决策 3** `persistCollectFocus``focus_idempotency_conflict`:仅 `collect_retry === true``:next`,否则 `duplicate_focus``persistFocusAfterChoice` 不再为 `duplicate_focus` 读 dossier 重试。
- **决策 4** `holdoutFollowupFor` 的 occupied 归并 `health` / `health_pressure`
## 三栏(被触碰断言)
| 用例 | 原值 | 新值 | 理由 |
| --- | --- | --- | --- |
| 事故形状 yearless→采集 | `next_followup.domain = finance`(取 yearless[0]=D11 | `null` | 决策 1,财务已覆盖 |
| 同形状但迁居未覆盖 | finance | relocation | 守卫只跳过已覆盖领域 |
| idle persist 事故形状 | 财务采集焦点 / `:next` | `terminalNote: true`0 次 set-focus | 决策 1+2 |
| 非 retry 采集撞 id | 任何撞 id 都 `:next` | `duplicate_focus`RPC 一次 | 决策 3 |
| `collect_retry` 撞 id | `:next` | 仍 `:next` | 保留 BUG-462 retry |
| holdout 账本 `health` + oos `health_pressure` | `health_pressure` | `null` | 决策 4 |
## 测试
- `frontend` `./node_modules/.bin/tsc --noEmit`exit 0
- `npm run lint`0 error(仓库既有 warning 未清)
- 任务书指定 TS 切片(`tests/rectification-*.test.ts` + `agent-voice-copy-contract.test.ts`,排除 database):**1006 passed / 0 failed**
- Docker `database-rectification-*.test.ts`:本机未跑,记 blocked
- `block_scan` 壁钟(BUG-570 P2):既有缺口,本单不声称全量 Python 门通过
- 浏览器七领域真人走查:无登录态,记环境缺口,见 `docs/testing/rectification-scenarios-20260907.md` §6
## 偏离
1. 任务书写 `nextAction === "adopt_representative"`。实现同时认 `ready_to_adopt``sessionOutcome === "adopt_representative"`,因为公开 nextAction 是前者。
2. 验收形状扩在 `rectification-occupation-coverage-exit.test.ts`,没有新建文件。
3. idle 夹具按解析后账本算 `evidenceLedgerFingerprint`,避免 RPC `summary` 与内存账本对不上把快照判成过期、决策掉回 `collect_evidence`
4. `rectification-eight-method.test.ts`yearless D24 在 CLASSIC_COVERAGE 已有学业时,不再锁「再问一遍学业」;改为收未覆盖的财务。
+1 -1
View File
@@ -75,7 +75,7 @@
| `TASK-rectification-duplicate-narration-20260907.md` | `PROGRESS-rectification-duplicate-narration-20260907.md` | 每轮采集旁白说两遍 + 题干在正文与问题块各一次:`step-answer` 的 set-focus 例外(BUG-533)放行了 set-focus 前后两个 step 的正文并拼接;`detachCollectSpokenAssistantText` 只剥逐字后缀,模型写进正文的问句没有代码守卫(BUG-488 防线只在提示词) | 已验收通过 | `9d1c08ca`BUG-584585 |
| `TASK-rectification-other-collect-fallback-20260908.md` | `PROGRESS-rectification-other-collect-fallback-20260908.md` | 七领域问完落到「也可以再说一件」、职业题从未出现、不自动出卡:`USER_COLLECT_QUESTION.other` 仍有三条活路(职业焦点 `target_domain` 压成 other 后被 active-focus 承接 followup 重建;set-focus 两次无效兜底查表;无领域采集归 other),`collect:other:*` 焦点挂着让 `persistNextInterviewIfIdle` 的出卡路径永远不跑 | 已验收通过(触发链仍 investigatingBUG-586 mitigated | `9aec5029`BUG-586 |
| `TASK-rectification-probe-replay-loss-20260908.md` | `PROGRESS-rectification-probe-replay-loss-20260908.md` | **P0** 收敛不了的直接原因:答完 5 道题范围收到 8 分钟,之后每补一件经历触发的重算换了候选集,`buildInferenceState` 找不到已答题定义(引擎与对照包按 asked keys 排除、状态 probes 不携带、分盘 key 内嵌分钟列表)→ `rounds:[]`、posterior=prior,交付回到 29 分钟;证据轮旁白不报范围变化;交付卡闪现待证实 | 已验收通过(真实 Case 范围收到 2 分钟;BUG-589 闪现 investigating | `df182c16`BUG-587589 |
| `TASK-rectification-covered-domain-recollect-20260908.md` | `PROGRESS-rectification-covered-domain-recollect-20260908.md` | 范围已收到 2 分钟、决策已是采用,却再问答过的财务题:职业覆盖后的 yearless→采集分支(L2224)不看领域是否已覆盖;`shouldSkipFollowupPersist` 把它当剩余采集挡住出卡;`persistCollectFocus` 撞 id 无条件 `:next` 再插;holdout `occupied` 不认 health/health_pressure 同义 | 待执行 | `codex/rectification-covered-domain-recollect-20260908`BUG-590591 |
| `TASK-rectification-covered-domain-recollect-20260908.md` | `PROGRESS-rectification-covered-domain-recollect-20260908.md` | 范围已收到 2 分钟、决策已是采用,却再问答过的财务题:职业覆盖后的 yearless→采集分支(L2224)不看领域是否已覆盖;`shouldSkipFollowupPersist` 把它当剩余采集挡住出卡;`persistCollectFocus` 撞 id 无条件 `:next` 再插;holdout `occupied` 不认 health/health_pressure 同义 | 待验收 | `codex/rectification-covered-domain-recollect-20260908`BUG-590591 |
| `TASK-api-not-configured-mislabel-20260904.md` | `PROGRESS-api-not-configured-mislabel-20260904.md` | 16 处路由把数据库瞬断(部署切换窗口)兜底翻译成 503「服务尚未配置」;改为仅配置错误用该文案,其余 `service_unavailable`,收敛为共享 helper | 已验收 | `5483649b`(BUG-542);2 条子进程测试留 CI Node 22 复核 |
| `TASK-rectification-ux-20260902.md` | `PROGRESS-rectification-ux-20260903.md` | 会话面空白假死与交互摩擦 | 已验收 | `d159f08e`(09-03 在新基线重做后合入,BUG-505509 |