fix(rectification): dedupe post-adopt verify and skip this probe only
Adopted reverse-verify repeated already-asked collect stems, treated 「这题跳过」 as stopping the case, and promised holdout/OOS checks that never ran. Collect spoken stems no longer prefix a year. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
# PROGRESS · 采用后核对线(2026-09-04)
|
||||
|
||||
工作树:`.worktrees/rectification-post-adopt-verify-20260904`
|
||||
分支:`codex/rectification-post-adopt-verify-20260904`
|
||||
基线:任务书写 `origin/staging` `e27d5dc5`(含 `0be51e65`、`a793edb1`);任务书提交 `ea28521a`。交付前 `origin/staging` 已到 `6b038e6d`(占用 BUG-535),本单 rebase 上去以便快进推 staging。
|
||||
任务书:`docs/tasks/TASK-rectification-post-adopt-verify-20260904.md`
|
||||
未改 Python、未 bump Skill(仍 10.0.14)、未改 `.gitea/workflows/**`、未动迁移、未升级依赖、未改 `page.tsx`(2041 行,与 `e27d5dc5` 相同)。
|
||||
|
||||
| 任务 | 状态 | BUG |
|
||||
| --- | --- | --- |
|
||||
| 5.1 反向核对 `askedKeys` 去重 | 完成 | BUG-536 |
|
||||
| 5.2 旁白事实包与采用后计划同源 | 完成 | BUG-538 |
|
||||
| 5.3 「这题跳过」只跳本题 | 完成 | BUG-537 |
|
||||
| 5.4 `verified_idle` + `next_user_action` + `postAdoptVerifyDone` | 完成 | BUG-537 |
|
||||
| 5.5 采集题去年份前缀 | 完成(未否决) | BUG-539 |
|
||||
| 5.6 记录 | 完成 | — |
|
||||
|
||||
## 编号
|
||||
|
||||
开工时 `docs/BUG_HISTORY.md` 最大号 BUG-534。本单 **BUG-536~539**。交付前 `origin/staging` 已占用 BUG-535(报告分盘张数上限),故后移。
|
||||
|
||||
## 实现要点
|
||||
|
||||
- `remainingReverseVerifyProbes` 增加 `askedKeys`(`semantic_key` / `candidate_split_hash` / `domain.year`)。`if (input.accepted)` 与采用旁白共用 `reverseVerifyRemainingForAdopt`。
|
||||
- `post_adopt_verification` 项改为 `{kind:"reverse_verify"; domain; year_label}`。空列表模板:「采用后没有还能核对的前事…」。校验器空列表 +「会拿…核对」→ `promise`。holdout / OOS 不进旁白。
|
||||
- 核对卡 `skip_this_probe` 绑 `SKIP_PROBE_ACTION` / `optionId:"skip_probe"`。焦点 `skipped`,探针 `answered_probes` 记 `unsure`/`declined`,**不**置 `userStopped`。采用前停止按钮仍是 `STOP_ACTION`。
|
||||
- GET 案例与结构化答题返回 `next_user_action`。已采用且无下一问 → `start_consultation`。前端 `verified_idle`:一行 `postAdoptVerifyDone`,无 gap copy、无重载、无 handoff。状态栏仍走 BUG-502。
|
||||
- 已采用禁止 `adoptionNarration` / `adoptCue`。跳过但还有下一问时,旁白就是下一题干。
|
||||
- 采集口语不再拼「YYYY 年前后,」。`probe_year` 保留。答「没有」出采用卡不改(预算已满、家庭最后一条必答线)。
|
||||
- 跳过最后一道核对后,收尾消息**不**把已关闭焦点重新 `set-focus` 挂回去(否则测试夹具会把跳过的核对卡又钉到收尾句上)。
|
||||
|
||||
## 偏离
|
||||
|
||||
- 任务书 5.3 写「随后跑 `persistNextInterviewIfIdle`」。实际走 `persistApplied` 里已有的 `persistNextInterviewAfterChoice`(skip / accepted 强制续问)。效果相同:下一道核对或收尾,不另开 idle 入口。
|
||||
- 任务书验收「无新焦点」在假会计里还要断言不再 `set_agentic_rectification_conversation_focus`。夹具的 GET 仍返回已跳过的 active focus;若收尾后再 fallback `linkFocusAskedTurn`,会把旧卡挂到收尾句。已按收尾不挂焦点修。
|
||||
- 5.5 按决策 7 做了,产品未否决。
|
||||
- 交付前 `origin/staging` 已占用 BUG-535,本单实落 BUG-536~539,并 rebase 到 `6b038e6d` 以便快进推送。
|
||||
|
||||
## 测试
|
||||
|
||||
`frontend/src/app/page.tsx` 相对 `e27d5dc5`:2041 → 2041,未增长。
|
||||
|
||||
`npx tsc --noEmit`:
|
||||
|
||||
```
|
||||
exit=0
|
||||
```
|
||||
|
||||
聚焦 `tsx --test`(answer-choice / post-adopt-verify / adopt-narration / surface-state / surface-contract / collect-direction / eight-method):
|
||||
|
||||
```
|
||||
# tests 138
|
||||
# pass 138
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
exit=0
|
||||
```
|
||||
|
||||
`rectification-post-adopt-verify-20260904` 新文件 6 条:去重、空承诺、`verified_idle`、家庭口语等于 `USER_COLLECT_QUESTION.family`。
|
||||
|
||||
契约改写后补跑 decision-authority / agentic-entry / application-billing-contract / collect-stall / server-focus:102/102。
|
||||
|
||||
eslint 本单文件:0 error。`rectification-agentic-chat.tsx` 1 条既有 `react-hooks/exhaustive-deps` 警告(`3659519bd`),未扩依赖数组。
|
||||
|
||||
全量 `npx tsx --test tests/*.test.ts`(并行,本机有 Docker):
|
||||
|
||||
```
|
||||
# tests 2674
|
||||
# pass 2661
|
||||
# fail 13
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
exit=1
|
||||
```
|
||||
|
||||
13 条里 5 条是本单契约未改完(enum 加 `skip_probe`、家庭采集不再含年份前缀),已改断言后聚焦 102/102。其余 8 条为 Docker 迁移/连接争用:`admin-database`、`database-admin-owner-recovery`、`database-billing-adjustments`、`database-local-business`、`database-report-candidate-range`、`rectification-ingest-p0-database`、`rectification-v9-database`(migration + evidence lifecycle)。`--test-concurrency=1` 隔离重跑上述 7 个文件:
|
||||
|
||||
```
|
||||
# tests 13
|
||||
# pass 13
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
exit=0
|
||||
```
|
||||
|
||||
有效失败清单为空。总数 2674 不低于近期 staging 全量(collect-direction-fix 记 2656)。
|
||||
|
||||
未改 Python;预检系统 Python / swisseph 噪音不当作本单回归。MEVG 豁免:本单是产品/代码,不是运势解读。
|
||||
|
||||
## 改动文件
|
||||
|
||||
- 计划/旁白:`method-followup.ts`、`adopt-narration.ts`、`adopt-narration-agent.ts`、`user-copy.ts`
|
||||
- 跳过/收尾:`choice-action.ts`、`choice-card.ts`、`answer-choice.ts`、`interview-state.ts`、`turn-exit.ts`、`message-origin.ts`
|
||||
- 投影:`cases/[caseId]/route.ts`、`agent/route.ts`、`rectification-surface-state.ts`、`rectification-agentic-chat.tsx`
|
||||
- 文案:`frontend/DESIGN.md`、`frontend/docs/VOICE.md`
|
||||
- 测试:`rectification-post-adopt-verify-20260904.test.ts`(新)、answer-choice、adopt-narration、collect-direction、eight-method、surface-state、surface-contract、collect-stall、server-focus、decision-authority、agentic-entry、application-billing-contract
|
||||
- 类型:`turn-question.ts`、`rectification-choice-card.tsx` 接受 `skip_probe`
|
||||
- 文档:`docs/BUG_HISTORY.md`、`docs/testing/rectification-post-adopt-verify-20260904.md`、`docs/tasks/README.md`、`CHANGELOG.md`、本文件
|
||||
@@ -49,7 +49,7 @@
|
||||
| `TASK-rectification-adopt-narration-fix2-20260904.md` | `PROGRESS-rectification-adopt-narration-fix2-20260904.md` | 采用旁白超时用了 unref 的 `AbortSignal.timeout`,测试挂死取消同文件后三条用例,门禁 `npm test` 退出码 1 | 已验收(门禁通过,staging 已部署) | `45bdb63e`(BUG-523) |
|
||||
| `TASK-rectification-collect-direction-20260904.md` | `PROGRESS-rectification-collect-direction-20260904.md` | 可评分事件 2 条时盘外核对抢跑到刚拒答的家人领域,Agent 只能改写成不指向任何领域的泛问;缺第三件带年份的事却先问职业 | 已验收:5.1/5.3/5.4 通过;5.2 顺序错位(任务书责任)见修复单 | `codex/rectification-collect-direction-20260904`(BUG-527~530) |
|
||||
| `TASK-rectification-collect-direction-fix-20260904.md` | `PROGRESS-rectification-collect-direction-fix-20260904.md` | dated 补采集分支插在方法轮转之前,新案例第二问被家人抢占感情/事业;`7ee7f825` CSS 与合同测试脱节挡住门禁 | 已验收通过(0be51e65),待 staging 部署核对 | `codex/rectification-collect-direction-fix-20260904`(BUG-531~532) |
|
||||
| `TASK-rectification-post-adopt-verify-20260904.md` | `PROGRESS-rectification-post-adopt-verify-20260904.md` | 采用后核对题重复已问题;核对卡「这题跳过」等于整案停止、已采用仍念"选一个先用着"、前端"没有拿到下一个问题";采用旁白承诺的 holdout/OOS 核对与实际计划不同源(原任务书 §4 错误);家庭采集题带年份前缀自相矛盾 | 待执行 | — |
|
||||
| `TASK-rectification-post-adopt-verify-20260904.md` | `PROGRESS-rectification-post-adopt-verify-20260904.md` | 采用后核对题重复已问题;核对卡「这题跳过」等于整案停止、已采用仍念"选一个先用着"、前端"没有拿到下一个问题";采用旁白承诺的 holdout/OOS 核对与实际计划不同源(原任务书 §4 错误);家庭采集题带年份前缀自相矛盾 | 待验收 | `codex/rectification-post-adopt-verify-20260904`(BUG-536~539) |
|
||||
| `TASK-rectification-ux-20260902.md` | `PROGRESS-rectification-ux-20260903.md` | 会话面空白假死与交互摩擦 | 已验收 | `d159f08e`(09-03 在新基线重做后合入,BUG-505~509) |
|
||||
|
||||
### 聊天主链路与首页
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- 基线:`origin/staging` @ `e27d5dc5`(含 `0be51e65` 补采集顺序修复、`a793edb1` BUG-533)。
|
||||
- 开工分支:`codex/rectification-post-adopt-verify-20260904`,worktree `.worktrees/rectification-post-adopt-verify-20260904`。
|
||||
- 串行关系:本任务书改 `method-followup.ts`、`answer-choice.ts`、`rectification-agentic-chat.tsx`,与当天其他校正任务书无并行;`TASK-rectification-collect-direction-fix-20260904.md` 已合入基线,不再冲突。
|
||||
- BUG 编号起点:**BUG-535**(开工时再核对 `docs/BUG_HISTORY.md` 最大号)。
|
||||
- BUG 编号起点:任务书写 **BUG-535**;交付前 `origin/staging` 已占用该号(报告 chart-cap `61194690`),本单实落 **BUG-536~539**。
|
||||
|
||||
## 1. 事故实证(staging,真实案例,资料已抽象)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
### 5.6 记录
|
||||
|
||||
- `docs/BUG_HISTORY.md` 从 BUG-535 起:A(重复核对题)、B(跳过=停止 + 已采用仍念采用提示 + 前端 unavailable)、C(旁白承诺与计划不同源,关联 BUG-519~523 并写明原任务书 §4 是根因)、D 前半(年份前缀,关联 BUG-414/418)。每条含现象、触发、根因、修复、验证、防复发。
|
||||
- `docs/BUG_HISTORY.md` 从 BUG-536 起:A(重复核对题)、B(跳过=停止 + 已采用仍念采用提示 + 前端 unavailable)、C(旁白承诺与计划不同源,关联 BUG-519~523 并写明原任务书 §4 是根因)、D 前半(年份前缀,关联 BUG-414/418)。每条含现象、触发、根因、修复、验证、防复发。
|
||||
- `docs/testing/rectification-post-adopt-verify-20260904.md`:真人清单——采用后核对题不重复;「这题跳过」出下一题;最后一题跳过后一行收尾且无重载按钮;家庭题无年份前缀;**答"没有"后直接出采用卡属预期**(写明原因:预算已满、家庭是最后一条必答线)。
|
||||
- `CHANGELOG.md`、`docs/tasks/PROGRESS-rectification-post-adopt-verify-20260904.md`(含 tsc / lint / 测试六行汇总 + 退出码、无 Docker 时失败清单与基线逐条比对)。
|
||||
|
||||
@@ -107,4 +107,4 @@ npx tsx --test tests/*.test.ts 2>&1 | tail -8 # 记基线失败清单
|
||||
|
||||
## 8. BUG 编号起点
|
||||
|
||||
BUG-535(基线最大号 BUG-534)。
|
||||
BUG-536~539(交付前 `origin/staging` 已占用 BUG-535;基线任务书最大号曾是 BUG-534)。
|
||||
|
||||
Reference in New Issue
Block a user