The two upstream files stay verbatim in scripts/. The path helper moved into a subdirectory so the root file budget rises by only those two. Niryaana Shoola is a placeholder until its rule is corrected. Targeted tests passed. Co-Authored-By: Grok (agent loop) Co-authored-by: Cursor <cursoragent@cursor.com>
69 lines
6.2 KiB
Markdown
69 lines
6.2 KiB
Markdown
# 进度:full-reading 补齐上游 5 个模块(2026-10-18)
|
||
|
||
基线:`origin/staging` = `b3ef2d815`(任务书写作时写的 `47b4a2317` 已过时,开工以 fetch 后的最新 staging 为准)。分支 `codex/full-reading-module-parity-20261018`。
|
||
|
||
## 做了什么
|
||
|
||
- T3:`navamsha_dasha`、`niryaana_shoola_dasha` 用 `rashi_dashas_native.calculate_rashi_dashas` 的结果填键。profile id 仍是 `goel_method_1_v1` 和 `goel_nirayana_shoola_v1`,期间表原样放在 `periods`。外层 `status` 为 `parameter_sensitive`,给上游合盘校验器读。没有导入 `niryaana_shoola_dasha.py`。
|
||
- T2:搬入 `_calc_lagna_vargottamamsa`、`_summarize_pushkara_planets`,并在 full-reading 写入 `lagna_vargottamamsa`、`pushkara_planets`、`punarphoo`(调用已有的 `scripts/punarphoo.py`)。
|
||
- T1:按上游副本搬入 `scripts/unified_western_reading.py` 和 `scripts/classical_astrology.py`。西占排盘补了本仓没有的 `_birth_times`、`build_draconic_chart`、`build_relocation_chart`。加了 `scripts/_script_root.py`,因为搬来的文件会可选导入它,本仓原来没有这个文件。
|
||
- T4:`tests/test_full_reading_module_parity.py` 固定 86 个模块键。
|
||
- 两位公开名人用的是仓库里已有的样例(`tests/indastro_cases.json` 的 `brad_pitt`,`tests/celebrity_cases.json` 的 `jolie`),没有新抄出生时间。
|
||
|
||
## 耗时
|
||
|
||
同一进程里先跑一次预热,再各跑 3 次,取中位数。参考日 `2026-10-18`,ayanamsa `lahiri`,node `mean`。
|
||
|
||
| 样例 | 改前 3 次(秒) | 改前中位数 | 改后 3 次(秒) | 改后中位数 | 变化 |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| brad_pitt | 4.943 / 5.000 / 5.043 | 5.000 | 4.964 / 5.152 / 5.192 | 5.152 | +3.0% |
|
||
| jolie | 5.022 / 5.047 / 5.094 | 5.047 | 5.132 / 5.139 / 5.174 | 5.139 | +1.8% |
|
||
|
||
没有超过 20%。多出来的时间主要是西占各层和一次本仓七套 rashi 大运。
|
||
|
||
## Navamsha 首段
|
||
|
||
两位公开名人的首段星座序号和年数,与上游 `goel_method_1_v1` 用「D9 上升 + 宫主星在 D9 的位置」算出的首段一致,也与本仓用黄经直接取九分盘的算法一致。没有需要仲裁的差异。
|
||
|
||
## 没整份同步的西占差异
|
||
|
||
- `western_timing_engine.py` 里西占层要的函数,签名已经和上游副本一致,没有改这个文件。
|
||
- `build_tropical_natal_chart` 签名已一致。本仓这份还多了接口请求包装和岁差展示,没有用上游文件覆盖。
|
||
- 上游 `classical_astrology.py` 在导入时需要 `western_real_case_calibration._build_calibration_summary`。这个函数不在本单的上游副本里,本仓原来也没有。补了一个只返回 `blocked` 的垫片,键是调用方实际读取的那些,不编造特异性分数。完整解读里的 classical 层仍然是 `executed`。
|
||
- full-reading 不传迁居坐标,所以西占包里的 `relocation` 层是 `blocked`,整包状态是 `partial`。这和上游调用方式一样。挂到 full-reading 上的模块状态是 `parameter_sensitive`,不再是 `blocked`。
|
||
- 现有 VedAstro 适配器仍会尝试本地外部程序,失败被它自己接住。打桩测试确认这次调用栈不经过 `unified_western_reading.py` 或 `classical_astrology.py`;单独跑西占包时,`urlopen` 和 `subprocess.run` 的调用次数为 0。
|
||
|
||
## 检查
|
||
|
||
| 检查 | 命令 | 结果 |
|
||
| --- | --- | --- |
|
||
| 新测试 + 大运红线 + Punarphoo | `pytest tests/test_full_reading_module_parity.py tests/test_rashi_dashas_native.py tests/test_punarphoo_observation.py -q` | 27 passed |
|
||
| 屏蔽 PyJHora 后再跑新测试和大运红线 | 拦截 `jhora` 导入后跑上述前两个文件 | 19 passed |
|
||
| 改过的西占文件 | `pytest tests/test_western_chart_engine.py tests/test_western_real_case_calibration.py -q` | 8 passed |
|
||
| 全量 pytest | 未跑 | Windows 执行侧按循环约定不跑,留给验收 |
|
||
| 快速门 | 未跑 | 同上 |
|
||
|
||
解释器是本机 Anaconda,不是仓库 `.venv`(工作树里没有 `.venv`)。
|
||
|
||
## 修改单(产品选 A,2026-10-18)
|
||
|
||
已 `git merge origin/staging`(合并提交在功能提交之后)。合入后 `scripts/` 根目录 `.py` 为 449,其中多出来的 3 个是本单的两个上游原样文件和本地辅助文件。
|
||
|
||
- M1:删除根目录 `scripts/_script_root.py`。上游文件只接住 `ModuleNotFoundError`,名字找不到时实际抛出的是 `ImportError`,只改 `sys.path` 接不住。按修改单允许的做法,把同样的路径辅助放进 `scripts/_script_root/`(子目录,不占根目录名额)。没有改两个上游文件。full-reading 组装处仍先把仓库根放进 `sys.path`。
|
||
- M2:`ROOT_PY_BUDGET` 原值 446,新值 448。合入后 staging 仍是 446,只为本单两个上游原样文件加名额。删掉辅助文件后根目录为 448。
|
||
- M3:`niryaana_shoola_dasha` 改为占位 `execution_status=blocked`,原因「口径更正中,见 TASK-niryaana-shoola-pvr-20261018」。`navamsha_dasha` 仍用 `goel_method_1_v1`。校验器改读 `upstream_full_synastry_7a773d13`:Niryaana 这一行是 `not_applicable`,次要大运互证不因它 blocked。
|
||
- 断言三栏见 `tests/test_full_reading_module_parity.py` 与 `tests/test_python_hygiene_budget.py`。
|
||
|
||
## 修改单检查
|
||
|
||
解释器:`C:\Users\74082\anaconda3\python.exe`。工作树没有 `.venv`。
|
||
|
||
| 检查 | 命令 | 结果 |
|
||
| --- | --- | --- |
|
||
| 预算、大运红线、模块键 | `python -m pytest tests/test_python_hygiene_budget.py tests/test_rashi_dashas_native.py tests/test_full_reading_module_parity.py -q` | 21 通过 |
|
||
| 屏蔽 PyJHora 后再跑这三份 | 拦截 `jhora` 导入后同一条命令 | 21 通过 |
|
||
| 隐私标记 | `python -m pytest tests/test_repo_privacy_markers.py -q` | 通过 |
|
||
| 全量 pytest | `python -m pytest tests -q --tb=line` | 失败名单 176 条。上面三份测试都不在里面。抽样是 `python3` 退出码 9009、路径分隔符、控制台用 GBK 打不出表情符号。没有在 `origin/staging` 上把这 176 条再跑一遍做逐名差集。婚恋合盘修改轮在 Windows 上记录的也是 176 条,抽查原因同类。 |
|
||
|
||
根目录 `.py` 在删掉辅助文件后是 448,与新上限一致。静默处理只剩上游原文那一处 `scripts/classical_astrology.py:12558`。
|