fix(report): use the upstream reader edition for new longform bodies

New reports request reader_main from upstream origin/main 23b9609e.
KP and transit no longer copy an empty vars() dict, solar returns keep
birth_asc_sign_idx, and ordinary projection deletes internal lines whole.
This commit is contained in:
jesse-ux
2026-09-25 02:21:46 +08:00
parent 59c2301838
commit 3c2f7bd559
22 changed files with 3126 additions and 65 deletions
@@ -0,0 +1,46 @@
# PROGRESS · 报告正文换成读者版(2026-09-25)
## 结论
T1–T7 已在 `codex/report-reader-main-20260924` 完成。没有推 `staging`。没有登录浏览器,没有声称生成过真实用户报告。
## 基线与预检
- 分支 `codex/report-reader-main-20260924`,开工 HEAD `514951d7`,跟踪 `origin/staging`。
- 预检:Anaconda Python 3.11.7 运行 `scripts/pre_work_check.py --remote-timeout 8 --command-timeout 45`。远端 `verified`,碎片扫描和适配器诊断成功。focused tests 失败 1 条:`.workbuddy/skills/jyotish-vedic-astrology` 镜像路径不存在。没有制造该目录。预检整体 **fail**,不记通过。这是台账里已有的镜像断言,不是新类错误。
- 上游:`git -C G:\Ferti\yinduzhanxing fetch origin` 成功。`origin/main` 实际是 `23b9609e330dbee70a4725bdc222b125d9b0e39f`,不是任务书的 `19195f6e`。`f3b5196f` 是其祖先。读者版按 `23b9609e` 引入。没有改上游工作区。
## 任务
| 项 | 结果 |
| --- | --- |
| T1 读者版 | 完成。`scripts/pl9_reader_export.py` 整段引入 `_render_pl9_user_markdown`、`render_pl9_parity_markdown` 及其读者版闭包。缺省 edition 仍是参考版。`pl9_ai_density` 依赖不在读者版闭包里,按让步 1 未引入。 |
| T2 生成链 | 完成。`personal-report-longform-generate.ts` 请求 `edition: "reader_main"`。版本 `pl9_personal_long_report.v3`。 |
| T3 自加泄漏 | 完成。结论等级规则、英文 boundary、不可用节的原始 error 都不再进入参考版。空数据节整节不输出。 |
| T4 KP / transit | 完成。`_copy_call_namespace` 不再依赖空的 `vars()`。虚构盘 `cmd_full_reading` 上 KP 与三项 transit 不是 blocked。 |
| T5 Muntha / Year Lord | 完成。返照结果写回 `birth_asc_sign_idx`。2024/2026/2028 的 Muntha 与 Year Lord 不恒定。一侧 blocked 不判冲突。 |
| T6 投影 | 完成。内部词删整行;删表连同紧邻说明。新增 PL9 词进入 `ordinaryOutputLeaks`。英文整段用连续 12 个英文单词,避免误伤行星名。读者版 fixture 命中为 0。 |
| T7 记录 | 完成。BUG-1026/1027/1028 仍空,已使用。1023–1025、1030 未占用。 |
## 断言三栏
| 位置 | 原值 | 新值 | 原因 |
| --- | --- | --- | --- |
| `personal-report-density-retry.test.ts` 普通投影 sha | `01cc1e03c5adca2833e014156e1162fff12e5cb336e4484c5871859cd878acd7` | `f3aeb8f4b09ba0a78af4ab5e7aee4db32d7499b8e6b1488f2925b35fd91750b9` | 原 sha 锁的是截断后的泄漏正文 |
| `report-export-blocks.test.ts` LF 下载 sha | `3c52e8bfcfcb3ce3852bd5323867a69bc47d0f9aa821a34692172e7d61c6bcb8` | `b7f6947f6ae6f82e4a972be3c1f2bc50260ed0c5f029847264f40a5ee6ba7b88` | 同上,BUG-1020 当时锁的是投影前的泄漏输出 |
| `test_report_longform_gaps2.py` 空 KP | 必须出现 KP 原始表标题和 `kp_lord_sub_unavailable` | 整节不出现,且没有 `synthetic_kp_failure` | D3。BUG-561 的 blocked 标题把原始 error 打进了正文 |
| `test_report_longform_parity.py` 导航 | 必须含「结论等级规则」 | 该标题不出现 | D3 |
## 验证
- Python:`pytest tests/test_report_reader_main.py tests/test_annual_tajika_pack.py tests/test_professional_report_reference_api.py tests/test_api_server_growth_contract.py tests/test_report_longform_parity.py tests/test_report_longform_gaps2.py tests/test_repo_privacy_markers.py` 通过。`jyotish_api_server.py` 增长合同仍绿(未改该文件)。
- 前端:`tsc --noEmit` 0 错。`npm run lint` 0 error、121 warnings,均不在本单文件;没有为消 warning 改业务代码。点名测试:投影、导出哈希、读者版 fixture、`edition: "reader_main"` 通过。
- 快速门:`scripts/run_quality_gate.py --profile quick` 退出 1。编译、JSON、能力/碎片审计、BPHS 18/18,以及门禁里的 Python pytest 名单跑完后进入 `npm test`。`npm test` 在本机失败:Skill 运行时 symlink `EPERM`,以及 Windows 把迁移 symlink 收成普通文件后的 `duplicate migration filename`。这是已知环境缺口,不是本单断言。不把快速门写成通过。没有单独再跑全量 `npm test`,也没有跑 `next build`。
- Skill 版本不 bump。报告版本升到 v3。
## 没做
- 未推 staging,未改 workflow,未动 DNS。
- 未做登录浏览器验收。清单在 `docs/testing/report-reader-main-20260924.md`。
- 未引入 `pl9_ai_density` 附录。
- 旧报告不回填。
+1 -1
View File
@@ -174,7 +174,7 @@
| 任务书 | 进度 | 主题 | 状态 | 落点 |
| --- | --- | --- | --- | --- |
| `TASK-report-reader-main-20260924.md` | — | **报告正文换上游读者版 reader_main + KP / Muntha 计算缺陷 + 投影截断(BUG-1026/1027/1028)**:正文一直是上游审计版(读者版 09-09 才出、从未同步),本仓又自加「结论等级规则」/英文段/异常原文;投影黑名单不认 PL9 词汇且截断半句、删表留说明;KP args `vars()` 拷贝为空恒失败;Muntha 漏合 `birth_asc_sign_idx` → Year Lord 恒火星。产品拍板接入读者版、旧报告不回填。引擎类需 pre_work_check;排在 BUG-1020 fix 之后 | 待领取 | — |
| `TASK-report-reader-main-20260924.md` | `PROGRESS-report-reader-main-20260924.md` | **报告正文换上游读者版 reader_main + KP / Muntha 计算缺陷 + 投影截断(BUG-1026/1027/1028)**:正文一直是上游审计版(读者版 09-09 才出、从未同步),本仓又自加「结论等级规则」/英文段/异常原文;投影黑名单不认 PL9 词汇且截断半句、删表留说明;KP args `vars()` 拷贝为空恒失败;Muntha 漏合 `birth_asc_sign_idx` → Year Lord 恒火星。产品拍板接入读者版、旧报告不回填。 | 待验收 | `codex/report-reader-main-20260924` |
| `TASK-report-reader-actions-20260924.md` | — | **报告操作收敛**:列表只留「查看报告」;阅读页删「下载原始附录」「打印」,导出改图标按钮;导出对话框 ≥860 居中、窄屏仍贴底(修订 chapter-export D9/D10)。产品变更,不开 BUG 号 | 基本通过(Claude 09-24:入口收敛、图标、≥860 居中均符合;原始附录三文件因执行方权限未删、PROGRESS/清单未写 → 并入修复单) | `f125fae0`(未部署) |
| `TASK-report-chapter-export-fix-20260924.md` | `PROGRESS-report-chapter-export-20260924.md` | **CRLF图盘JSON残留(BUG-1020)**:旧剥离器只匹配LF;建议D5对错误围栏残留作有限例外,D13不构成该授权。 | 代码已验收(Claude 09-24),待部署(被同批门禁红阻塞) | `fa8fef55`/`133aca49`(未部署) |
| `TASK-report-chapter-export-20260924.md` | `PROGRESS-report-chapter-export-20260924.md` | **我的报告:分块导出 + 中文元信息 / 状态色 / 行内确认删除(BUG-1018/1019)**。旧整篇按钮由抽屉取代;常用 / 全部正文保持 D5 逐字节,所有组全选另附盘和核对表。后续产品裁决 D13:分盘必须带安全 SVG,有限替代原无 SVG 约束;JSON 围栏及内部字段仍禁。原生底部 dialog、760px、70%、860 两列、零额外请求、保留打印 / 原始附录。 | 已验收(Claude 09-24:同上;D13 SVG 与列表页删导出按钮均按产品口径;BUG-1018/1019 resolved;CRLF 见 fix 单) | `1420471a`(staging 已部署);真机清单欠 |