From f3e727023759718ba10ea9a7736a7d5dc0aaea4e Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Mon, 7 Sep 2026 12:04:39 +0000 Subject: [PATCH] docs(tasks): accept ab57d03f with tsc blocker; range delivery fix brief (BUG-583) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P --- docs/tasks/README.md | 5 ++- ...tification-range-delivery-card-20260907.md | 18 ++++++++ ...ctification-range-delivery-fix-20260907.md | 44 +++++++++++++++++++ ...rectification-stop-rescore-fix-20260907.md | 19 ++++++++ 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 docs/tasks/TASK-rectification-range-delivery-fix-20260907.md diff --git a/docs/tasks/README.md b/docs/tasks/README.md index cab19cb0..46aa0e3f 100644 --- a/docs/tasks/README.md +++ b/docs/tasks/README.md @@ -69,8 +69,9 @@ | `TASK-rectification-capability-fix-20260907.md` | `PROGRESS-rectification-capability-fix-20260907.md` | 能力补齐修复单:答后旁白把 `range_start/range_end`(搜索窗口)当范围比较,每题都说「范围没变」;`block_scan` 五段支持度按段内原始分求和,长时段先天占优(24/24/36/30/30 个候选);`TRACK_LABEL` 音译与产品 Vimshottari/Narayana 口径不一;BLK-001 写到 `docs/BLOCKED.md` 应回根目录 | 已验收通过(P2:block_scan 15 s 壁钟断言在门禁里可能间歇红) | `517df002`(BUG-569~570);staging 未部署,需先 Migrate Staging Database | | `TASK-rectification-declared-uncertainty-20260907.md` | `PROGRESS-rectification-declared-uncertainty-20260907.md` | 出生时间「有多确定」只在 intake 问一次:三档(医院记录 / 家人大概 ±15·30·60·120 / 时段或未知),校正窗口读档案(现在有钟点一律 ±15,声明值被忽略,BUG-571);吻合率 <60% 且代表分钟贴窗口边缘时出服务端一键放宽卡,放宽后重算并写回档案(BUG-572);窗口 >120 分钟先切三子段迭代到 ≤120 再进分钟(BUG-573);日级事件问一次可靠度;四个脚本化手测场景进 docs/testing | 已验收通过(2 P3 建议:可靠度正则去掉「记得」、档案写回改走 account-profile-patch) | `8e31680b`(BUG-571~573);迁移 `20260907020000` 待应用,部署前先 Migrate Staging Database | | `TASK-rectification-stale-compare-fix-20260907.md` | `PROGRESS-rectification-stale-compare-fix-20260907.md` | **P0**:BUG-559 把过长 `candidate_split_hash` 塞进引擎比较键,答完性格/边界卡后比较静默失败;快照过期压过用户停止;holdout 用过期领域被改写成「再说一件事」;采集轮正文双写 | 已验收通过(P2 正文双写根因未拆、P3 重算节流 Map 只增不减) | `4e0db55f`(落地编号 BUG-577~580);staging 未部署 | -| `TASK-rectification-stop-rescore-fix-20260907.md` | `PROGRESS-rectification-stop-rescore-fix-20260907.md` | **P0**:BUG-579 的停止路径用「裸重算」(`rescoreMinuteAfterWindowChange` 不重建 `inference_state`、不重放已答探针、不写 transition),停止后范围变宽、卡片变成引擎裸支持度、采用 RPC 报 `candidate_state_inconsistent`;无框区分题经 `spokenCollectFallbackFollowup` 变成 domain=other 的采集题,再次冒出开场句 `GENERIC_COLLECT_QUESTION`;holdout 采集排在带年月采集之前 | 待验收 | `codex/rectification-stop-rescore-fix-20260907`(BUG-581~582) | -| `TASK-rectification-range-delivery-card-20260907.md` | `PROGRESS-rectification-range-delivery-card-20260907.md` | 结尾重设计:四张分钟卡 + 相对支持度换成一张区间交付卡(范围、代表分钟、稳定/敏感主题、边界句)+ 只列未问 D9/D10/月宿分歧的 2~3 列对比面板(文案只取类型表),动作只有「按这个范围用 / 再补一件经历」;删交付旁白里三行预测窗口;Skill §9 口径改、bump 10.0.15 | 待验收 | `codex/rectification-range-delivery-card-20260907` | +| `TASK-rectification-stop-rescore-fix-20260907.md` | `PROGRESS-rectification-stop-rescore-fix-20260907.md` | **P0**:BUG-579 的停止路径用「裸重算」(`rescoreMinuteAfterWindowChange` 不重建 `inference_state`、不重放已答探针、不写 transition),停止后范围变宽、卡片变成引擎裸支持度、采用 RPC 报 `candidate_state_inconsistent`;无框区分题经 `spokenCollectFallbackFollowup` 变成 domain=other 的采集题,再次冒出开场句 `GENERIC_COLLECT_QUESTION`;holdout 采集排在带年月采集之前 | 已验收通过(逻辑);但同提交含区间卡 tsc 错,整体不可部署 | `ab57d03f`(BUG-581~582) | +| `TASK-rectification-range-delivery-card-20260907.md` | `PROGRESS-rectification-range-delivery-card-20260907.md` | 结尾重设计:四张分钟卡 + 相对支持度换成一张区间交付卡(范围、代表分钟、稳定/敏感主题、边界句)+ 只列未问 D9/D10/月宿分歧的 2~3 列对比面板(文案只取类型表),动作只有「按这个范围用 / 再补一件经历」;删交付旁白里三行预测窗口;Skill §9 口径改、bump 10.0.15 | **未通过**:tsc 1 错(判空顺序);P2 预测窗口句兑现不了;P3 再补经历无提示 | `ab57d03f`;修复单 `TASK-rectification-range-delivery-fix-20260907.md` | +| `TASK-rectification-range-delivery-fix-20260907.md` | `PROGRESS-rectification-range-delivery-fix-20260907.md` | 区间卡修复单:`candidateResult` 判空提到最前(tsc 阻断);预测窗口接到采用后首轮或删句;「再补一件经历」隐藏卡后给采集提示;进度记录须贴 tsc 原文 | 待领取(当天须合入,否则 BUG-581 无法部署) | `codex/rectification-range-delivery-fix-20260907`(BUG-583) | | `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-505~509) | diff --git a/docs/tasks/TASK-rectification-range-delivery-card-20260907.md b/docs/tasks/TASK-rectification-range-delivery-card-20260907.md index a64db138..1dfd61ec 100644 --- a/docs/tasks/TASK-rectification-range-delivery-card-20260907.md +++ b/docs/tasks/TASK-rectification-range-delivery-card-20260907.md @@ -77,3 +77,21 @@ ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules cd frontend && ls tests/rectification-*.test.ts tests/consultation-*.test.ts tests/agent-voice-copy-contract.test.ts | grep -v database | xargs npx tsx --test 2>&1 | grep -E "^# (tests|pass|fail)" grep -n "^version" ../skills/jyotish-birth-time-rectification/SKILL.md ``` + +## 验收(Claude,2026-09-07,`origin/staging` @ `ab57d03f`) + +**未通过(P1 阻断)**:`frontend/src/components/rectification-agentic-chat.tsx` L1655 把 `dismissedRangeResultId !== candidateResult.resultId` 放在 `candidateResult &&` 判空之前,`tsc --noEmit` 报 `TS18047: 'candidateResult' is possibly 'null'`。硬红线 tsc 0 错不满足,`next build` 会失败,staging 门禁过不去。修法一行:把判空提到最前面。执行方进度记录写 tsc 0,不符。 + +其余各项(在修掉这一行之后可视为通过): + +| 项 | 结论 | +| --- | --- | +| 4.1 投影 `range_delivery` | 通过。`divergence-panel.ts`:活跃簇 2~3、只列未问的 D9/D10/月宿层,星座先从探针选项取、再从换升表推,文案只取 `D9_TYPE_TABLE` / `D10_TYPE_TABLE` 的 `userChoice` 与 nakshatra `traits`;代表 id 用公开 UUID | +| 4.2 组件 | 通过。四张分钟卡、相对支持度、当前推荐徽章全部删除;两个动作;列单选,"都不像 / 说不好"清空 | +| 4.3 旁白与 Skill | 通过。三行预测窗口删除;Skill §9 改口径、10.0.15 快照与 live 一致、五份 references 与 10.0.14 逐字相同(没有新写方法学);注册表新条目 `sourceCommit: null` 与历史条目一致 | +| 4.4 记录 | 通过;手测场景第 5 条已加 | +| P2 | 旁白改成"下一次事业变动的预测窗口留在采用后的核对阶段",但采用后没有任何地方再展示预测窗口(`prospectiveWindowsNarration` 已无调用点)——这是一句兑现不了的承诺,与之前"说一声我来汇总"同类。要么在采用后核对首轮真的接上,要么把这句删掉 | +| P3 | "再补一件经历"只在本地隐藏卡片,不给用户任何提示该说什么;建议隐藏后由步骤条/旁白给一句采集提示 | +| P3 | lint warning 从 84 涨到 103 | + +修复单:`TASK-rectification-range-delivery-fix-20260907.md`。 diff --git a/docs/tasks/TASK-rectification-range-delivery-fix-20260907.md b/docs/tasks/TASK-rectification-range-delivery-fix-20260907.md new file mode 100644 index 00000000..f4c3b8b1 --- /dev/null +++ b/docs/tasks/TASK-rectification-range-delivery-fix-20260907.md @@ -0,0 +1,44 @@ +# TASK · 区间交付卡修复单:tsc 判空顺序、兑现不了的预测窗口句、再补经历无提示(2026-09-07) + +- 基线:`origin/staging` @ `ab57d03f` +- 分支:`codex/rectification-range-delivery-fix-20260907` +- 执行方:coding agent;验收:Claude +- 优先级:**P1 阻断**(tsc 不过,staging 门禁与 `next build` 都会失败,BUG-581~582 的 P0 修复被一起卡住) +- BUG 编号起点:**BUG-583**(开工时 `grep -o "^## BUG-5[0-9][0-9]" docs/BUG_HISTORY.md | tail -1` 复核) + +## 1. 事故实证 + +| # | 事实 | 位置 | +| --- | --- | --- | +| 1 | `tsc --noEmit`:`TS18047: 'candidateResult' is possibly 'null'` | `frontend/src/components/rectification-agentic-chat.tsx` L1655:`showSelectionCards && dismissedRangeResultId !== candidateResult.resultId && message.renderKey === selectionCardMessageKey && candidateResult && (…)` | +| 2 | 交付旁白句"下一次事业变动的预测窗口留在采用后的核对阶段",但 `prospectiveWindowsNarration` 已无任何调用点,采用后从不展示 | `user-copy.ts` `deferredCareerWindow`;`grep prospectiveWindowsNarration` 只剩定义 | +| 3 | 「再补一件经历」只 `setDismissedRangeResultId`,卡片消失后没有任何提示 | `rectification-agentic-chat.tsx` `onContinue` | +| 4 | 执行方进度记录写"tsc 0",与 `ab57d03f` 实测不符 | `PROGRESS-rectification-range-delivery-card-20260907.md` | + +## 2. 决策记录 + +1. 判空提到最前:`showSelectionCards && candidateResult && dismissedRangeResultId !== candidateResult.resultId && …`。 +2. 预测窗口二选一,本单选 **接上**:采用后 `postAdoptVerify` 第一轮旁白末尾追加 `prospectiveWindowsNarration(receipt.prospective_probes)`(有则加,无则不加);`deferredCareerWindow` 句保留。若执行方评估接不上,则删句并写明。 +3. 「再补一件经历」隐藏卡片后,步骤条切到"第 1 步·收集经历"文案,并在输入框上方给一句 `continueCollectFallback`(已有文案:"请继续说下一件你记得比较清楚、大概带年份的经历。")。 +4. 进度记录必须贴 `tsc --noEmit` 的真实输出行;没有复跑不得写 0。 + +## 3. 任务分解 + +- 3.1 判空修复 + 源扫描断言(`rectification-range-delivery-20260907.test.ts`:正则锁定 `candidateResult &&` 出现在 `dismissedRangeResultId` 之前)。 +- 3.2 预测窗口接到采用后首轮(`postAdoptVerify` 路径),测试:有 `prospective_probes` 的 receipt → 采用后首轮旁白含"预测下一次事业变动";无则不含。 +- 3.3 再补经历提示:组件测试——点击后卡片隐藏且出现 `continueCollectFallback`。 +- 3.4 记录:BUG-583(tsc 判空,复发自本单 4.2);CHANGELOG 一句;PROGRESS 贴 tsc 原文。 + +## 4. 让步顺序 + +3.1 必须当天合入(否则 P0 修复无法部署);3.2、3.3 其次;3.4 不可省。 + +## 5. 开工前置命令 + +```bash +git fetch origin --prune +git worktree add -b codex/rectification-range-delivery-fix-20260907 .worktrees/rectification-range-delivery-fix-20260907 origin/staging +cd .worktrees/rectification-range-delivery-fix-20260907 +ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules +cd frontend && ./node_modules/.bin/tsc --noEmit; echo "tsc exit $?" +``` diff --git a/docs/tasks/TASK-rectification-stop-rescore-fix-20260907.md b/docs/tasks/TASK-rectification-stop-rescore-fix-20260907.md index d70b34a6..273061e4 100644 --- a/docs/tasks/TASK-rectification-stop-rescore-fix-20260907.md +++ b/docs/tasks/TASK-rectification-stop-rescore-fix-20260907.md @@ -70,3 +70,22 @@ ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules ln -s /workspace/Jyotisha/.venv .venv cd frontend && ls tests/rectification-*.test.ts tests/consultation-*.test.ts tests/agent-voice-copy-contract.test.ts | grep -v database | xargs npx tsx --test 2>&1 | grep -E "^# (tests|pass|fail)" ``` + +## 验收(Claude,2026-09-07,`origin/staging` @ `ab57d03f`;与区间交付卡同一提交) + +| 门 | 结果 | +| --- | --- | +| tsc | **1 错**(在同提交的区间交付卡改动里:`rectification-agentic-chat.tsx` L1655 先访问 `candidateResult.resultId` 再判空,`'candidateResult' is possibly 'null'`)。执行方进度记录写 tsc 0,与实测不符——应是最后一次改动后没有复跑 | +| lint | 0 error / 103 warning(比上一轮多 19 条,分散在测试文件与 `rectification-v9-tools.ts`,未清) | +| 前端 rectification + consultation + birth-time + skill + voice(非 DB) | 1605 / 0 | +| Python v5_services / input_contract / growth contract | 全绿 | +| 引擎 `minute_step=1` 字节级不变 | 全等 | + +| 项 | 结论 | +| --- | --- | +| 4.1 BUG-581 | 通过。`scoreAndPersistCurrentEvidence` 抽到 `v9/score-persist.ts`,停止/闲置 `keepAnswers=true` 带 `previous` 重放;时段/放宽 `keepAnswers=false` 仍写出空答案的 `inference_state`;VedAstro 校验与对比包逻辑随之搬迁 | +| 4.2 BUG-582 | 通过。无框区分题一律 `skipped`;工具层与 `spokenFollowupForUser` 的 GENERIC 兜底删除;`dropped_probes(frameless_distinguish)` 记录 | +| 4.3 顺序 | 通过。holdout 排在带年月采集与职业之后 | +| 4.4 记录 | 通过 | + +结论:本单逻辑通过,但同一提交因区间交付卡的 tsc 错误**整体不可部署**,见 `TASK-rectification-range-delivery-card-20260907.md` 验收段。