Files
Jyotisha/docs/tasks/PROGRESS-report-longform-parity-20260905.md
T
Jesse_ChenandCursor 52a4570ca1 fix(report): keep the public table allowlist in sync with the longform appendix
The staging quality gate failed because database-local-business still listed the old pg_tables set after 20260905010000.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 11:32:17 +08:00

95 lines
7.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROGRESS · 长报告对齐全量版并挂入产品(2026-09-05)
工作树:`/Users/jesse/Downloads/Copse/astrology/.worktrees/report-longform-parity-20260905`
分支:`codex/report-longform-parity-20260905`
基线:任务书写 `d2955c62` 之后;开工 `origin/staging``3fd001ca`(含本任务书);收尾已快进到 `18a5a488`
任务书:仓库根 `TASK-report-longform-parity-20260905.md`
未改 `.gitea/workflows/**`,不提升 main,不反向同步上游 yinduzhanxing,未把两份真实对标报告入库。
五章 writer / bundle / schema 未改。附录失败不改 `personal_reports.status`、不触发退款。
并行队列:BUG-535 chart-cap 已在 staging `4ef4c406` / `73c2a1a5` 关闭并真实五章 ready,本轮未重做。
| 任务 | 状态 | 说明 |
| --- | --- | --- |
| 0 全量时长与覆盖基线 | 完成 | 虚构北京盘;同步生成,不改异步 job |
| 1 调用面 / 装配对齐 | 完成 | 三年年度、KP 月度、五系统表、专题三表、Upagraha、KP Lord/Sub、功能吉凶 |
| 2 年度层 Muntha / Mudda / Patyayini | 完成(诚实标签,见下) | 未把 blocked/conflict 涂成可读 |
| 3 校时敏感层 | 完成 | 无窗「未做校时」;有窗走 `provisional` + `candidate_range` |
| 4 成品阅读导航 | 完成 | 生成器确定性产出,不依赖 Agent 后处理 |
| 5 产品附录存储 + 下载入口 | 完成 | 首次请求同步生成 + 缓存;`maxDuration=300` |
| 6 部署后真实核对 | 未做 | 待 staging 部署后按覆盖表抽查 |
## 任务 0 · 虚构北京盘 smoke
出生资料按任务书:`1990-01-01 12:00``39.9042, 116.4074`tz 8Raman`--today 2026-09-05 --target-year 2026 --pack full --format markdown`。产物只在 `/tmp/longform-parity-20260905/`,不入库。
| 指标 | 装配前(同盘) | 本轮装配后 |
| --- | --- | --- |
| 墙钟 | 20.67s | **7.64s** |
| 体积 | 250,819 B / 2605 行 / 155 标题 | **282,502 B / 2965 行 / 178 标题** |
| 旧 Web 参考版 | 约 188K / 2088 行 | 已超过 |
| skill 全量版 | 约 391K / 3634 行 | 仍薄一截,剩余主要是受限材料与未 vendor 的 `professional_parity_closure` |
止损:单次远低于 5 分钟,任务 5 保持同步生成 + 表缓存。`maxDuration = 300` 足够。
## 覆盖对照(标题结构,虚构盘)
| 差距项 | 装配后 | 状态标签 |
| --- | --- | --- |
| 成品阅读导航五块 | present | 质量门本次 `blocked`37/49 passed),不改写正文 |
| 2026/2027/2028 年度重点 | present | 年度层可读壳 |
| 大运与时间主线五系统表 | present | Vimshottari / Narayana / Yogini / Ashtottari / Kala Chakra 均为 `executed` + `parameter_sensitive` |
| KP 三年流月 + 重点月份 | present | `parameter_sensitive` |
| Muntha | present | **`conflict`**solar_return 与 tajika 同 profile 不一致,保持仲裁标签) |
| Mudda Dasha | present | `executed` / `partial_verified` |
| Patyayini | present(外部回放段) | 回放 `pyjhora_behavior_only / not_multiengine_parity`;质量门 `patyayini_annual_support=blocked`(本地 producer 仍缺) |
| 专题 KP 小表 / 宫位核对 / 月度 MD-AD | present | `parameter_sensitive` |
| 功能性吉凶与 Yogakaraka | present | `used` |
| Upagraha 表 | present | `parameter_sensitive` |
| KP Lord/Sub、Ruling Planets、ABCD | present | `parameter_sensitive` |
| 出生时间敏感度 / 未做校时 | present | `not_rectified` |
| 质量门对照表若干受限层 | missing | `restricted_or_unclosed``jaimini_special_points` / `tajika_named_yoga` / `annual_sahams` / `kranti` / `alternate_ashtottari`(正文另有本地 Saham/Jaimini 段,质量门走受限材料路径,未涂成 closed) |
## 实现要点
### 引擎调用面
- `_export_args` 与 API `_high_rigor_birth_payload` 默认 `today` / `target_year` / `age``age` 不再重复 kwargs。
- `cmd_full_reading``cmd_kp``_build_natal_foundation_modules`panchanga / upagrahas / bhava_chalit / moon_chart / sudarshana / functional_benefic_malefic)、`varga_research_high`
- `cmd_kp` 算完立即把 Swiss Ephemeris 岁差从 KP 恢复到报告口径(默认 Raman),避免后续本命模块被带跑。
- `professional_parity_closure` 未 vendor(约 3500 行)。`dasha_master_pack` 装配失败时用本地 Vimshottari / Narayana / Yogini / Ashtottari / Kala Chakra 填五系统表,不假装外部 dasha oracle 已闭环。
- 无候选窗时 `birth_time_sensitivity` 保留为 `not_rectified` /「未做校时」,不再整段消失。
- 成品阅读导航由 `_render_finished_reading_navigation` 写出。
### 产品附录
- 迁移 `frontend/supabase/migrations/20260905010000_personal_report_longform_appendices.sql`PK=`report_id`,另有 `(user_id, request_id)` FKowner SELECT`service_role` 写;错误码无正文。未双写冻结的 `frontend/db/migrations`
- `POST /api/reports/[reportId]/professional-reference``runtime=nodejs``maxDuration=300`;鉴权/同源/本人/主报告 ready 不变;缓存命中直接返回;`unavailable` → 503「全量数据附录暂不可用」;payload 带 `packs:["full"]``today`/`target_year`/`age`、有窗则 `birth_time_accuracy=provisional`。缓存写入失败不阻断下载,也不改 `personal_reports`
- UI:报告中心与阅读页按钮改为「全量数据附录」;打印通道仍独立。
## 测试与门禁
- 定向 pytest`test_report_longform_parity` + 参考导出 / quality gate / 生时敏感 / KP monthly / calculation profile / annual pack):全部绿,3 skipped(未 vendor 的 dasha-master gate)。
- `./node_modules/.bin/tsc --noEmit`0
- 定向前端:`professional-report-reference-route` + `personal-report-longform-appendix` + entry/view 相关:**通过**
- `tests/database-personal-report-longform-appendices.test.ts`**1 pass**owner 可读、他人 0 行、authenticated 不能 insert、appendix `unavailable``personal_reports.status``ready`
- 未改 `.gitea/workflows/**`;未跑全量 `npm test` / 未提升 main。`bab07187` 的 staging 质量门因此在 `database-local-business` 表白名单上失败(BUG-548
- 任务 6 部署后真实用户附录未做
## 门禁修复(BUG-548
Gitea run 2416 / job 5696 `validate``npm test` 唯一失败是 `local PostgreSQL applies the reviewed business schema...`。实际名单多了 `personal_report_longform_appendices`。附录定向库测 `ok 951`。未改 workflow。
## 让步
- 未 vendor `professional_parity_closure.py`。五系统表走本地模块状态;辅助大运明细表仍可能缺 master-pack 周期行。
- Patyayini 本地 producer 仍无;只呈现 PyJHora 回放并保持 `pyjhora_behavior_only`。质量门继续 `blocked`
- Muntha `conflict` 未做 producer 仲裁。
- 质量门整体 `blocked`(37/49)。对照表里受限材料 missing 保持 missing。
- 附录是首次点击同步生成,不是后台异步 job。7.64s 墙钟支持该选择。
- 任务 6 必须等 staging 部署。
## BUG_HISTORY
BUG-548staging 质量门因 public 表白名单未含附录表失败;产品行为未改。BUG-535 保持 resolved。