fix(consult): a stored smalltalk reply is not a prior answer; summary counts as one (acceptance fix for BUG-1071)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199rbQDTsUbCVw84wc8BTFe
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
2b435f11d0
commit
9d01757f27
@@ -74,3 +74,22 @@
|
||||
- `next build` 默认 Turbopack 对软链的 `node_modules` 报 `Symlink … points out of the filesystem root`(与 `PROGRESS-consult-gender-optional-20260927` 同一现象),改用 `next build --webpack` 量 `/` 状态与首屏 gzip;数字口径与该记录一致(rootMainFiles,gzip level 9)。
|
||||
- lint 有 127 条既有 warning(0 error),不在本单范围,未动。
|
||||
- 真实模型输出未验(无凭据):见 `docs/testing/consult-answer-the-question-20260927.md`。
|
||||
|
||||
## Claude 验收补修(2026-09-27 晚)
|
||||
|
||||
- 发现:`hasPriorAssistantAnswer` 只看 `role === "assistant"`,而寒暄快路(BUG-976/977)的回复也以 `responseKind: "smalltalk"` 存成 assistant 消息(`route.ts` `p_response_message`),历史窗口又把 `responseKind` 丢掉。后果:用户先说「你好」再问第一个正式问题,会被当成追问轮(≤ 200 字、无骨架)。会话摘要把早先轮次折掉后 tail 里可能没有 assistant,则反过来误判为首轮。
|
||||
- 修:`consultation-session-history.ts` 的 `StoredTurn` / `ConsultationHistoryMessage` 带可选 `responseKind`,窗口 tail 透传;`hasPriorAssistantAnswer(history, { summaryText })` 忽略寒暄回复、摘要存在即追问;`natalUserTurnShape` 与 `route.ts` 两处调用带 `historyWindow.summaryText`。`product-voice.ts` Never 段一句改措辞(原句第二个分句读成也被禁止)。
|
||||
- 断言三栏:`consult-single-pass-answer-20260927.test.ts`(route 源码匹配:原值不带 summaryText / 新值带 / 原因如上)、`consultation-voice-contract.test.ts`(Never 句:原值分号并列 / 新值拆两句 / 原因措辞)。新增用例见 `consultation-thinking-plan.test.ts`、`consultation-session-history.test.ts`。
|
||||
- 复跑门禁数字见下方「Claude 验收」。
|
||||
|
||||
## Claude 验收(2026-09-27 晚,Node 22.14,本工作树,含补修)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| `tsc --noEmit` | 0 错 |
|
||||
| `npm run lint` | 0 error(既有 warning 未动) |
|
||||
| `npm test` | 4197(基线 4192,+5);pass 4143 / fail 24 / skipped 30;24 条失败按名称与基线逐条一致(无 Docker 的 DB / 部署套件) |
|
||||
| `next build --webpack` | exit 0;`/`、`/chart`、`/ephemeris`、`/people` 仍 ○ Static;首屏 gzip 以执行方实测 130,933 B(=基线)为准,补修只改服务端与 lib 类型 |
|
||||
| 真机 | 未做(无登录态、无模型凭据),见 `docs/testing/consult-answer-the-question-20260927.md` 8 条 |
|
||||
|
||||
结论:T1–T6 通过;补修一处(寒暄回复误判追问)已并入本分支。推 staging 后核对 `/api/health` 的 `deployment.gitCommit`。
|
||||
|
||||
Reference in New Issue
Block a user