feat(report): render longform Markdown as the report and close gaps2 holes

New reports skip the writer, persist pl9 Markdown as the body, and settle zero-token usage on the catalog model. Planned longform sections now emit blocked rows instead of vanishing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-06 21:46:16 +08:00
parent e428e9d056
commit cfcd369d4f
36 changed files with 2290 additions and 402 deletions
+32
View File
@@ -8629,4 +8629,36 @@
- 复发自:BUG-553`a1956deb` 的测试没断言守卫会命中)
- 修复版本:`0102a973`
## BUG-561 | 长报告 KP Lord/Sub 与专题 KP 表在失败信封下整段消失
- 状态:resolved
- 首次发现:2026-09-06
- 最近更新:2026-09-06
- 影响面:`scripts/jyotish_engine.py` pl9 长报告、专业参考 Markdown
- 用户现象:三年 KP 月表还在,但 KP Lord/Sub 原始表和事业/财运/关系章的 KP 结构小表整段不见,页面上也没有 blocked 说明。
- 触发条件:专业参考路径把 `cmd_kp` 收成 `{status: blocked, reason}` 且没有 planets/houses;渲染层遇到该信封直接返回空列表。鉴别条件是候选窗/blocked KP 信封,不是 Raman 本身。
- 根因:`_kp_lord_sub_section` 等装配函数在 KP 模块失败时 `return []`,计划段被静默跳过。
- 修复:失败路径改为输出显式 blocked 标题和原因码;最终 Markdown 再扫一遍计划标题,缺席则补 `planned_section_unavailable`
- 验证:`tests/test_report_longform_gaps2.py`
- 防复发:计划内段必须 present 或 blocked,不允许缺席。禁止再对失败 KP 信封直接 `return []`
- 相关记录:无
- 复发自:无
- 修复版本:待本单合入 SHA
## BUG-562 | 专业参考路径剥掉 raw_full_reading 后模块审计表只剩表头
- 状态:resolved
- 首次发现:2026-09-06
- 最近更新:2026-09-06
- 影响面:`scripts/jyotish_engine.py` 长报告审计表、力量章 Yogini/Narayana/Kala/Bhava Bala
- 用户现象:逐模块执行审计只有表头、零数据行。力量章缺 Bhava Bala 与三套辅助大运明细。
- 触发条件:professional 路径 sanitize 掉 `raw_full_reading`worksheet 只抄了 dasha 家族状态、没有 periods。
- 根因:审计行只从将被剥离的 raw 模块读;辅助大运渲染拿不到规范化 periods。
- 修复:sanitize 前抽出 `_iter_audit_modules`;规范化 dasha family periods,并从本地 yogini/narayana/kala/bhava_bala 模块补装,缺数据走 blocked 行。
- 验证:`tests/test_report_longform_gaps2.py`
- 防复发:full pack 下审计表数据行必须达到模块执行数下限;力量章六子块缺数据必须有 blocked 标题。
- 相关记录:BUG-561
- 复发自:无
- 修复版本:待本单合入 SHA