docs(tasks): full-reading parity change brief after product decision (issue #81)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LutgzyJqNhPpZy1nFsJtN3
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
76c152d0ef
commit
7a2d7bd6a1
@@ -0,0 +1,60 @@
|
||||
# TASK · full-reading 补齐上游模块 · 修改单(issue #81)
|
||||
|
||||
- 日期:2026-10-18
|
||||
- 被看提交:`900581068e06df14ab1f3de6bf5e7bbfe2ad1dee`(分支 `codex/full-reading-module-parity-20261018`)
|
||||
- 原任务书:`docs/tasks/TASK-full-reading-module-parity-20261018.md`
|
||||
- 执行方:Grok,同一分支追加提交;`origin/staging` 前进时用 `git merge origin/staging`,不 rebase
|
||||
- 性质:**不是打回**。验收中发现一条与既有合同冲突的规则,产品已拍板;本单写清怎么按决定改,连同 issue 里的 F2b 补充一起做
|
||||
- BUG 编号:沿用 BUG-1375、BUG-1376,不新开号
|
||||
|
||||
## 决策记录(产品负责人 2026-10-18,issue #81「我选 A」)
|
||||
|
||||
`tests/test_python_hygiene_budget.py` 的 `ROOT_PY_BUDGET = 446` 规定 `scripts/` 根目录 `.py` 文件数只许减不许增(`TASK-python-hygiene-20261013`)。本分支根目录 449 个。
|
||||
|
||||
产品选 **A**:**上游原样文件**可以放在 `scripts/` 根目录(与上游同路径,方便以后同步),预算为这几个文件相应调高;**我们自己写的文件仍不许增加**。
|
||||
|
||||
## 已核对(Claude)
|
||||
|
||||
- `scripts/classical_astrology.py`、`scripts/unified_western_reading.py` 与 `docs/research/upstream_full_reading_parity_bde5d615/` 副本逐字一致(只差 CRLF / BOM)。
|
||||
- `scripts/western_chart_engine.py`、`scripts/western_real_case_calibration.py` 只有新增函数,没有整份覆盖。
|
||||
|
||||
## 要改的
|
||||
|
||||
### M1 · 删掉 `scripts/_script_root.py`
|
||||
|
||||
这是本地新建的文件,不是上游原样文件(上游副本里没有它),按决定不许占根目录名额。两个上游模块对它的引用都包在 `try / except ModuleNotFoundError: pass` 里,是可选的。
|
||||
|
||||
- 删掉该文件(它还带了 UTF-8 BOM)。
|
||||
- 若删掉后两个上游模块有 import 失败,**不要**改上游文件;改为在调用方(`jyotish_engine.py` full-reading 组装处或测试)保证仓库根在 `sys.path` 上,或把辅助放进子目录,在进度里写明。
|
||||
- 验收:`tests/test_full_reading_module_parity.py` 全绿,且其中「模块能导入」那条在没有 `_script_root.py` 时仍成立。
|
||||
|
||||
### M2 · 预算按决定调高,并写明例外
|
||||
|
||||
`tests/test_python_hygiene_budget.py`:
|
||||
|
||||
- `ROOT_PY_BUDGET` 由 446 改为 **446 + 本单新增的上游原样文件数**(预期 448),常量旁写三栏:
|
||||
- 原值:446
|
||||
- 新值:448
|
||||
- 原因:产品 2026-10-18(issue #81 选 A):上游原样文件按上游路径放在 `scripts/` 根目录,`classical_astrology.py`、`unified_western_reading.py` 两个;本地新写的文件仍不得增加。
|
||||
- 合并时若 `origin/staging` 的根目录计数已因其他单变化(例如 #79 合入),按合并后的实际数重算,只为本单的上游原样文件加名额。
|
||||
|
||||
### M3 · F2b:`niryaana_shoola_dasha` 改为占位
|
||||
|
||||
照 issue #81 2026-10-18 20:40 的补充:本单的 `niryaana_shoola_dasha` 键不再用 `rashi_dashas_native` 的 Niryaana Shoola 结果填,只写
|
||||
|
||||
```json
|
||||
{"execution_status": "blocked", "reason": "口径更正中,见 TASK-niryaana-shoola-pvr-20261018"}
|
||||
```
|
||||
|
||||
`navamsha_dasha` 照原计划。相应测试与进度同步改;原任务书 T3 对 Niryaana 那一行的验收改为「校验器判为不适用,合盘任务不因它 blocked」。
|
||||
|
||||
### M4 · 交回前必跑
|
||||
|
||||
- 全量 `pytest tests` 与开工时 `origin/staging` 逐名比对(预算这条正是全量才抓得到的)。
|
||||
- `python3 -m pytest tests/test_python_hygiene_budget.py tests/test_rashi_dashas_native.py tests/test_full_reading_module_parity.py -q`。
|
||||
- 屏蔽 PyJHora 后再跑新增测试(原任务书已要求)。
|
||||
|
||||
## 不要做
|
||||
|
||||
- 不改两个上游原样文件;不整份覆盖 `western_*`。
|
||||
- 不把预算调到超过上游原样文件所需的数。
|
||||
Reference in New Issue
Block a user