Keep targeted existence questions as A-D cards. Recover collect-schema stock by question-id prefix, surface the stem when persist fails, and send spoken targeted existence to the repair exit instead of a naked prompt.
2.6 KiB
2.6 KiB
进度 · 定向补事口述焦点复原(2026-09-13)
范围
- 分支:
codex/rectification-targeted-collect-spoken-focus-20260913(基于origin/staging@9a943cc2) - 任务单:
docs/tasks/TASK-rectification-targeted-collect-spoken-focus-20260913.md - BUG-673(复发自 BUG-670);最大号核对时为 672
- 不改数据库、迁移、
deploy/**、workflow、page.tsx
完成
- T1 写入侧:
serverOwnedExpectedAnswerSchema/persistServerOwnedFocusCore对定向存在题先rebuildTargetedCollectExistenceFollowup;重建失败返回 null / skipped,不得collectFocusSchema。rectification-set-focus同一条件不降级,spokenPrompt 不替换卡片题干。年份阶段collect:targeted:<domain>:year仍是口述。 - T2 复原侧:承接焦点与 GET
choice_card按题号前缀识别采集型 schema,用schema.prompt重建 frame。projectCurrentQuestion同条件投影kind: "choice"。:next后缀同样能复原。 - T3
persistNextInterviewAfterChoice尾部显式persisted: false;keptNextQuestion为假时next_user_action不再引用未落库的题。persistSkippedCollectFocus对定向存在题写点选 schema,resolve 失败重试一次,返回值不得为active。 - T4
interviewChoiceCardUnavailable增加questionId:口述形态的定向存在题走 unavailable + repair-exit;普通口述与 year 阶段不误伤。 - T5 BUG-673、CHANGELOG、本文件、
docs/testing/rectification-targeted-collect-spoken-focus-20260913.md。
让步
- 任务书 T4 写「questionId 以
collect:targeted:开头」一律判不可用。年份追问collect:targeted:<domain>:year本来就是口述,若按字面会误伤。实现只把存在题(可带:next)当缺卡。
验收
tsc --noEmit:0 错- ESLint(改动文件):0 error;既有 unused-vars warning 未新增
- 新测试
rectification-targeted-spoken-focus-recovery-20260913.test.ts:10/10 - 相关回归:
rectification-server-focus/question-ownership/answer-choice/spoken-prompt69/69;targeted-card-live+surface-state通过 - 本机
npm test:2948 tests,2775 pass / 159 fail / 14 skip。失败项是 Windows CRLF、无 Docker、bash 脚本合同(Caddy\nvs\r\n、deploy/.sh、database-),与本单无关。新增测试只增加通过数。 next build:Compile + TypeScript 通过;collect page data 在本机 Windows 因EPERM symlink与 Skill 10.0.26 SHA 校验失败(未改skills/)。/是否仍○ Static未在本机核对。- 真机存量会话复验见
docs/testing/rectification-targeted-collect-spoken-focus-20260913.md。