merge: feat/persona-explainability → main(画像可解释性 + 历史联系最近一次 + ⑤g 未来回访排除闸)
已在 test(a0d20f82)部署验证。三块内容: 1. 画像可解释性 —— 水位对齐 fact 层 + 写入侧节流;到期改档精确调度(nextBoundaryAt); 详情页说明收回 @pac/types 单一真理源 + 打通证据链 + 分组定序 + 圈人标签 hint 2. 历史联系「最近一次」—— 程序判定 isLatestPast,摘要开头必须交代;prompt 加数据边界 硬约束(源里只有标签没有原话,没记的不许补);抽屉标最近一次/未到期; 修 fallback 拿 items[0] 当最近一次的老 bug;两处 orderBy 改 nulls:'last' 3. ⑤g 未来回访排除闸 —— 诊所已排未来回访则本轮不召,排到哪天挡到哪天,到期自愈⚠ ️ 部署后必须做的两件事(见两个 migration 文件内注释): a. patient_facts 复合索引已在 migration 内,大表建议先 CONCURRENTLY 预建 b. 画像回填 **--force 必须加**:next_boundary_at 为 NULL 语义是「不再改档」, 水位闸认为这些版本新鲜、永远不会重算,不会自愈 c. ⑤g 需 plan 重算才整体生效(生产预估挡下 30,426 条在池 plan / 12.9%) 本地 477 单测 / service+web tsc 干净;test 服已验闸的两个方向。
Showing
This diff is collapsed.
Click to expand it.
apps/pac-service/tests/persona-diff.spec.ts
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment