d4627a5019
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>
104 lines
5.9 KiB
Markdown
104 lines
5.9 KiB
Markdown
# 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`、本文件
|