docs(tasks): accept BUG-590/591; same-year probe dedupe fix brief (BUG-592)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
Jesse_Chen
2026-09-08 06:50:22 +00:00
parent 7ca6ade244
commit f3a1a58378
3 changed files with 80 additions and 1 deletions
+2 -1
View File
@@ -75,7 +75,8 @@
| `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 同义 | 验收通过 | `7ca6ade2`BUG-590591 |
| `TASK-rectification-same-year-probe-dedupe-20260908.md` | `PROGRESS-rectification-same-year-probe-dedupe-20260908.md` | 答完「2023 年 5 月前后」又问「2023 年前后」(BUG-559 复发):点选不重跑引擎,同一份 probes 里同域同年两题并存;TS 侧 `existenceProbeAsked` 只降权不排除,`inspectDiscriminatorProbes` 连领域+年份规则都没有。决策:同域同年硬排除、相邻年维持降权 | 待执行 | `codex/rectification-same-year-probe-dedupe-20260908`BUG-592 |
| `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 |
@@ -81,3 +81,21 @@ ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules
cd frontend && ./node_modules/.bin/tsc --noEmit; npm run lint 2>&1 | tail -1
ls tests/rectification-*.test.ts tests/agent-voice-copy-contract.test.ts | grep -v database | xargs npx tsx --test 2>&1 | grep -E "^# (tests|pass|fail)"
```
## 验收(Claude2026-09-08`origin/staging` @ `7ca6ade2`staging 已部署同 SHA
| 门 | 结果 |
| --- | --- |
| tsc | 0 错 |
| lint | 0 error / 102 warning |
| 前端 rectification + consultation + voice + skill-registry(非 DB | 1259 / 0 |
| Python v5_services + growth contract | 全绿 |
| 项 | 结论 |
| --- | --- |
| 4.1 BUG-590 | 通过。yearless→采集分支遍历并跳过已覆盖/拒答/已问领域;`shouldSkipFollowupPersist` 在题库耗尽且可采用时不再把已覆盖领域当剩余采集;偏离 1(同时认 `ready_to_adopt`)合理 |
| 4.2 BUG-591 | 通过。非 retry 撞 id 返回 `duplicate_focus``collect_retry``:next` |
| 4.3 P2 | 通过。holdout `occupied` 归并 health/health_pressure |
| 4.4 记录 | 通过 |
结论:通过。真实环境"职业答完直接出卡"待下次实测;本轮转录尚未走到该步,先暴露了 BUG-592(同年点选题问两遍),另立修复单。
@@ -0,0 +1,60 @@
# TASK · 生时校正修复单:答完「2023 年 5 月前后有没有…」又问「2023 年前后有没有…」(2026-09-08
- 基线:`origin/staging` @ `7ca6ade2`BUG-590/591 已合入并部署;本轮转录跑在这版)
- 分支:`codex/rectification-same-year-probe-dedupe-20260908`,基于 `origin/staging`
- 执行方:coding agent;验收:Claude
- 涉及文件:`frontend/src/lib/rectification-agentic/core/candidate-contrast-packet.ts``inspectDiscriminatorProbes`)、`v9/method-followup.ts``rankRenderableDiscriminators``asked` 处理、`existenceProbeAsked`)、`v9/probe-question-contract.ts``rankDiscriminatorScore`)、`v9/decision-from-dossier.ts``decideAfterInferenceChange`
- BUG 编号起点:**BUG-592**
- 优先级:**P1**(连续三次实测都出现;用户原话"相同的选择题又问了两遍")
## 1. 事故实证(三次实测同形;只写结构)
点选题顺序:D9 风格 → `career.2023.05.dasha_boundary`(答 C 没发生)→ `career.2024.04.dasha_boundary``relocation.2015.05.dasha_boundary`**`career.2023.dasha_activation`**(题干"2023 年前后,有没有入职、换工作或职责加重?")。上一个 Case 的 `rounds` 也是同一顺序,且顺序正好等于各题 `information_gain` 降序(1.53 / 1.10 / 0.97 / 0.74 / 0.46)。
同一领域、同一年、同一句问法问了两遍;用户已经答过 5 月"明确没有发生",整年再问一遍没有信息量。
## 2. 根因(BUG-559 复发)
BUG-559 的修复分两半:引擎侧在**重新生成**时按 `asked_probe_keys` 屏蔽同年与相邻年(`event_probes.py::_existence_blocked_years`),TS 侧加了 `existenceProbeAsked`。但:
1. **点选答题不重跑引擎。** 五道题都来自同一次 compare 生成的 `inference_state.probes``career.2023.05.dasha_boundary``career.2023.dasha_activation` 同时在列表里。引擎侧屏蔽只在下一次 compare 生效,而 compare 只在新证据写入时才跑。
2. **TS 侧只降权、不排除。** 点选后的下一题由 `decideAfterInferenceChange``core/candidate-contrast-packet.ts::inspectDiscriminatorProbes` 挑选,`askedAlready` 只认精确 `semantic_key` / `candidate_split_hash` / `probe_id` / 分盘层,没有领域+年份规则;`method-followup.ts::rankRenderableDiscriminators` 虽然调了 `existenceProbeAsked`,结果只是把 `asked=true` 交给 `rankDiscriminatorScore``semanticNovelty` 从 1 降到 0.35——0.46×0.35≈0.16 仍高于 0.08 门槛,前面的题问完就轮到它。`remainingReverseVerifyProbes` 里倒是 `continue` 排除,但那只管采用后核对。
BUG-559 的验证用例只锁了引擎重生成和 `existenceProbeAsked` 本身返回 true,没有锁"同一份 probes 列表里答完 5 月后不得再问同年"。
## 3. 决策记录
1. **同领域同年份,答过一道就不再问第二道(硬排除)。** `inspectDiscriminatorProbes``rankRenderableDiscriminators` 都增加:`askedKeys` 中存在同 `domain` 且**同 `year`** 的 key`SEMANTIC_YEAR` 解析)→ 不进候选,`dropped_probes(reason="same_year_asked")``year=0` 的分盘风格题不受影响。
2. **相邻年(±1)维持降权,不硬排除。** 本轮 2023 年 5 月答"没发生"、2024 年 4 月答"发生",两题分裂的候选组不同,都有信息量;BUG-559 引擎侧对相邻年的屏蔽只影响重生成,不动。
3. `existenceProbeAsked` 拆成 `sameYearProbeAsked`(硬)与现有的邻近年判断(软);`rankDiscriminatorScore``semanticNovelty` 语义不变。
4. 引擎 `asked_probe_keys` 行为不变;`SCORE_DELTA`、四选项合同、各道门槛不动;Skill 不 bump。
## 4. 任务分解
### 4.1 BUG-592
- 验收(`rectification-probe-year-dedupe-20260906.test.ts` 扩 + `rectification-inference-*.test.ts`):
- (a) `inference_state.probes` 同时含 `career.2023.05.dasha_boundary`gain 1.10)与 `career.2023.dasha_activation`gain 0.46),答完前者后 `decideAfterInferenceChange(...).probe.semantic_key !== "career.2023.dasha_activation"``dropped_probes``same_year_asked`
- (b) 同列表含 `career.2024.04.dasha_boundary` → 仍可被问(相邻年不硬排除)。
- (c) `buildMethodFollowupPlan` 路径同 (a)。
- (d) 事故顺序回放(五道题 + D10):第五题不再是 2023 activation,而是 D10 风格题或直接进入交付。
- (e) 引擎 `tests/test_rectification_event_probes.py` 全绿(不改)。
### 4.2 记录
- `docs/BUG_HISTORY.md` BUG-592**复发自 BUG-559**,写明旧防线为何没拦住(引擎侧只管重生成;TS 侧只降权);`CHANGELOG.md``PROGRESS-rectification-same-year-probe-dedupe-20260908.md``docs/testing/rectification-scenarios-20260907.md` 加"同领域同年份的点选题只出一次"。
## 5. 让步顺序
4.1 (a)(c)(d) 必做;(b) 是守卫,防止把有信息量的相邻年题一起砍掉;4.2 不可省。
## 6. 开工前置命令
```bash
git fetch origin --prune
git worktree add -b codex/rectification-same-year-probe-dedupe-20260908 .worktrees/rectification-same-year-probe-dedupe-20260908 origin/staging
cd .worktrees/rectification-same-year-probe-dedupe-20260908
ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules
ln -s /workspace/Jyotisha/.venv .venv
cd frontend && ./node_modules/.bin/tsc --noEmit; npm run lint 2>&1 | tail -1
ls tests/rectification-*.test.ts tests/agent-voice-copy-contract.test.ts | grep -v database | xargs npx tsx --test 2>&1 | grep -E "^# (tests|pass|fail)"
cd .. && .venv/bin/python -m pytest tests/test_rectification_event_probes.py -q
```