After the dated domains are asked or declined, keep the occupation question or the range card instead of hanging on a leftover other-collect prompt. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
3.7 KiB
Markdown
50 lines
3.7 KiB
Markdown
# PROGRESS · 采集问完落到补问兜底句(2026-09-08)
|
||
|
||
工作树:`.worktrees/rectification-other-collect-fallback-20260908`
|
||
分支:`codex/rectification-other-collect-fallback-20260908`
|
||
任务书:`docs/tasks/TASK-rectification-other-collect-fallback-20260908.md`
|
||
基线:`origin/staging` @ `6c7a8b02`
|
||
|
||
本单状态:**待验收**。未 commit、未 push。
|
||
|
||
未改:采用门、确认门、`MIN_SEPARATION_LEAD`、`_relative_support`、`minute_step=1`、`page.tsx`、Skill 版本(仍 10.0.15)、`persistableFocusDomain("occupation") === "other"`(表约束未动)。
|
||
|
||
## 做了什么
|
||
|
||
- **决策 1** 删除 `USER_COLLECT_QUESTION.other` / `_RETRY.other` 与死代码 `otherCollectFollowup`。`spokenFollowupForUser` 对 `domain=other` 只保留开场 GENERIC,其余 `null`。
|
||
- **决策 2** 新增 `parseCollectFocusQuestionId`。active-focus 非点选承接 followup 的 `domain` 先从 `collect:<domain>:` 解析,再退回 `focus.targetDomain`。
|
||
- **决策 3** set-focus 两次无效后的查表兜底排除 `other`;没有真实领域题干则 `invalid_spoken_prompt`、不落地。
|
||
- **决策 4** 同轮已成功 persist 后再调 set-focus:若 active focus 的 `askedTurnId === turnId`,返回现有投影并标 `idempotent: true`。
|
||
- **决策 5** `isOrphanOtherCollectFocus`:`collect:other:*` 且账本已有带年月事件时,闲置路径 `skipped` 后继续出卡。
|
||
- 采用跳过 followup 持久化(idle 与 after-choice 两条)补 `terminalNote: true`,agent-run 才能写 exhaustion 闸门轮。
|
||
|
||
## 三栏(被触碰断言)
|
||
|
||
| 用例 | 原值 | 新值 | 理由 |
|
||
| --- | --- | --- | --- |
|
||
| 职业承接 followup `domain` | `focus.targetDomain`(other) | `parseCollectFocusQuestionId` → occupation | 决策 2,稳定 id 保持 `collect:occupation:*` |
|
||
| set-focus other 两次无效 | 查表落地 `USER_COLLECT_QUESTION.other` | `invalid_spoken_prompt`,0 次 persist | 决策 3 |
|
||
| 同轮第二次 set-focus | 可 supersede 成 `collect:other:*` | `idempotent: true`,焦点 id 不变 | 决策 4 |
|
||
| 存量 `collect:other:*` + 已有带年月事件 | idle 见 focus 提前返回 | `skipped` 后 `terminalNote` 出卡 | 决策 5 |
|
||
| `spokenFollowupForUser` other retry | `USER_COLLECT_QUESTION_RETRY.other` | `null` | 决策 1 |
|
||
| 开场 `collect:other:collect_method_evidence` | 同左 | 同左 | 开场身份仍是 other + GENERIC |
|
||
| `persistableFocusDomain("occupation")` | `"other"` | `"other"` | 表约束未改,测试保留 |
|
||
| covered accident idle `terminalNote` | `undefined` | `true` | 验收 (d),agent-run 闸门轮 |
|
||
|
||
## 测试
|
||
|
||
- `frontend` `./node_modules/.bin/tsc --noEmit`:exit 0
|
||
- 本单改动文件 eslint:0 error(tools / method-followup 上既有 unused-import warning)
|
||
- 任务书指定 TS 切片(`tests/rectification-*.test.ts` + `agent-voice-copy-contract.test.ts`,排除 database):**983 passed / 0 failed**
|
||
- `grep -rn "也可以再说一件" src tests`:空
|
||
- Docker `database-rectification-*.test.ts`:本机未跑,记 blocked
|
||
- 事故 Case receipt / 任务书 2.2:未取到,仍 investigating
|
||
- 浏览器七领域真人走查:无登录态,记环境缺口,见 `docs/testing/rectification-scenarios-20260907.md` §6
|
||
|
||
## 偏离
|
||
|
||
1. 验收形状写在新建 `frontend/tests/rectification-other-collect-fallback-20260908.test.ts`,没有只扩 `rectification-collect-stall.test.ts` / `rectification-occupation-coverage-exit.test.ts`。既有 exhaustion-exit covered-accident 补了 `terminalNote`。
|
||
2. `isConfirmedDated` 参数放宽为 dated 字段 Pick,否则 `ledgerHasConfirmedDatedEvent` 在 tsc 上报 domain 缺失。
|
||
3. 决策 4 已做,没有后置为 P2。
|
||
4. BUG-586 状态写 **mitigated** 而非 resolved:三条活路已堵,但 2.2 同轮覆盖链没有事故 receipt。
|