Merge PR #49: pass birth-time accuracy truth into consultation engine

Reviewed: tsc + consult 295 + rectification 747 + python suites green;
guard functions and window/general instructions verified unchanged.
Conflict: BUG entry renumbered 467→468 (467 taken by report-extraction).
Review fix: test_consultation_birth_accuracy.py added to CORE_PYTEST_TARGETS
(pytest-style file outside the rectification glob would never hit the auto gate).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
This commit is contained in:
Jesse_Chen
2026-09-01 20:48:27 +00:00
15 changed files with 534 additions and 14 deletions
+16
View File
@@ -7182,3 +7182,19 @@
- 相关记录:BUG-457
- 复发自:无
- 修复版本:待发布
## BUG-468 | 填报精确出生时间后咨询仍按未校正范围交互
- 状态:resolved
- 首次发现:2026-09-01
- 最近更新:2026-09-01
- 影响面:`prepareConsultationRoute` / `serverChartFromProfile``runConsultationWorkflow` 请求体、`toAgentConsultationContext``run_rectification_gate` / `_build_consumer_context`、咨询模型指令
- 用户现象:初始化已填医院记录级精确出生时间,或已付费采用校正时间的用户,咨询时模型仍说没做过生时校正、要按时间范围交互。
- 触发条件:`hospital_record` 未校正填报分钟进入咨询;或 `birth_time_status``accepted` / `confirmed` 且存在 `active_birth_time``verified_chart` 咨询。
- 根因:前端星盘 `toolInput` 不传 `declared_accuracy` / `time_source`,引擎默认 `minute`+`family_clear` 得到 `5min` 且矩阵缺档;mastra 又无条件把 `rectification.boundary` 写成 `not_auto_rectified`
- 修复:按档案真值映射精度字段;`rectified` 只在 `accepted`/`confirmed` 且有 active time 时声明。workflow 透传引擎 gate 边界。补 `5min` 分盘档与分级文案。`declared_birth_window` / `general_no_birth_time` 与输出守卫不改。
- 验证:任务 0 不变量先红后绿;`consultation-birth-time-mode` 守卫 9 条保持全绿;聚焦 `consultation-*` / `consult-*` / `chat-*` / `rectification-*``tests/test_rectification_*.py``tests/test_consultation_birth_accuracy.py`
- 防复发:不得对未采用校正的档案声明 `rectified`;不得把 `not_auto_rectified` 写回每次咨询;不得改输出守卫或 window/general 两档指令来“修好”精度传递。
- 相关记录:BUG-009、BUG-073
- 复发自:无
- 修复版本:待发布