fix(report): keep monthly KP headings and readable timing sources

Heading-ensure only covered empty packets, so present KP months still dropped MD/AD titles and sanitizer blanked source_path. Also lock the quality gate onto the new contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-06 23:00:01 +08:00
parent 5aa05bf0d0
commit e4d16b7545
10 changed files with 213 additions and 20 deletions
+17
View File
@@ -8677,4 +8677,21 @@
- 复发自:无
- 修复版本:`ebc8380f`
## BUG-564 | 长报告 heading-ensure 之后仍丢逐月 KP 标题、时间来源与分钟排行
- 状态:resolved
- 首次发现:2026-09-06
- 最近更新:2026-09-06
- 影响面:`scripts/jyotish_engine.py` pl9 长报告、`scripts/flexible_birth_time_report_section.py``scripts/run_quality_gate.py` 快速门
- 用户现象:有 KP 月份数据时,事业/财务/关系三条「逐月 MD/AD 支持」标题仍不见;时间节点归因表的来源列被脱敏成空;校时附录没有分钟排行。快速门也不跑 gaps2 合同。
- 触发条件:`kp_monthly_report.months` 非空;professional 路径 sanitize 掉 `source_path`;候选窗存在但渲染层不读 `candidate_times`
- 根因:`_kp_monthly_theme_brief` 成功路径不写标题,空包才靠文末 heading-ensure 补 blocked 标题;parity_gates 用 `source_path`sanitize 会剥掉任何 `_path` 键;CLI provenance 只读显式 `uncertainty_minutes`;分钟排行未装配。顺带 `d1_d60_ledger` / `support_topics.kp` 为 None 时 `.get` 会在有月份数据的渲染里炸掉。
- 修复:逐月 brief 始终输出标题,空数据走 blockedparity_gates 改 `source_label`;窗口宽度回填 uncertainty;校时附录列出候选分钟;None 守卫;快速门列入 gaps2 / parity / timing / flexible 合同。
- 验证:`tests/test_report_longform_gaps2.py``tests/test_flexible_birth_time_report_contract.py``tests/test_timing_precision_contract.py`
- 防复发:有月份数据时三条逐月标题必须各出现一次,且不得靠文末 blocked 标题顶替;sanitize 后 Markdown 仍须保留可读 source_label;快速门必须跑上述四个测试文件。
- 相关记录:BUG-561、BUG-562
- 复发自:BUG-561`cfcd369d` 的 heading-ensure 只覆盖空包缺席,未覆盖成功路径漏标题)
- 修复版本:待本提交 SHA
@@ -39,3 +39,18 @@
本 worktree 无独立 `.venv`,实测用父仓解释器。实现已随 `809bdf13` 快进到 `origin/staging`;门禁因 MD 页 lintBUG-563)未部署,与 gaps2 装配无关。
未改 `.gitea/workflows/**`,不提升 main。
## 补洞(相对 `cfcd369d` / `5aa05bf0`
并行 worktree 在旧基线上多做的实现没有整棵 rebase(`jyotish_engine.py` 与 MD 页提交重叠太大)。在当前 staging HEAD 上只移植仍缺的洞:
| 洞 | 处理 |
| --- | --- |
| 有月份时逐月 MD/AD 标题仍缺 | `_kp_monthly_theme_brief` 始终写 `#### KP {事业\|财务\|关系}逐月 MD/AD 支持`;空数据 blocked |
| sanitize 抹掉 `source_path` | parity_gates 改 `source_label` |
| 快速门未跑 gaps2 | `CORE_PYTEST_TARGETS` 列入 gaps2 / parity / timing / flexible |
| 校时附录无分钟排行 | `flexible_birth_time_report_section` 列出 `candidate_times`,禁止 winner/approved |
| CLI provenance 只认显式分钟 | 从 `candidate_range` / `declared_window_*` 回填 11:5012:10 → 20 |
| Vargas I / KP 三年节 None.get | `d1_d60_ledger``support_topics.kp` 做 dict 守卫 |
Muntha `conflict``pyjhora_behavior_only`、事件回放 `user_history_not_supplied` 保持原样。未 vendor `professional_parity_closure`
+2
View File
@@ -92,6 +92,8 @@
| `TASK-report-candidate-range-read-20260904.md`(仓库根) | `PROGRESS-report-candidate-range-20260904.md` | accepted 生时报告直读已收权校正表 | 待验收 | `e27d5dc5`BUG-526/534;终稿见 BUG-535 |
| `TASK-report-chart-cap-20260904.md`(仓库根) | `PROGRESS-report-chart-cap-20260904.md` | 文档 charts 上限绑定 CHART_IDS | 待验收 | `4ef4c406`BUG-535 |
| `TASK-report-longform-parity-20260905.md`(仓库根) | `PROGRESS-report-longform-parity-20260905.md` | 长报告对齐全量版并挂入产品附录 | 待验收 | `codex/report-longform-parity-20260905`(任务 6 待部署后核对) |
| `TASK-report-longform-gaps2-20260906.md`(仓库根) | `PROGRESS-report-longform-gaps2-20260906.md` | 长报告真实参数组合下的装配缺口 | 待验收 | `codex/report-longform-gaps2-20260906`BUG-561/562;补洞 BUG-564 |
| `TASK-report-md-page-20260906.md` | `PROGRESS-report-md-page-20260906.md` | 长报告 Markdown 直接作为报告页 | 已合入 | `cfcd369d` / `809bdf13`BUG-563 lint 随后修) |
### 前端基础与工程