把被逐字锁定的年运函数改回原样,历史清单不再要求已删除的占位文件。
Independent Staging Quality Gate / validate (push) Successful in 14m11s
Independent Staging Quality Gate / publish (push) Successful in 3m43s

年数表字面量留在 calc_mudda_with_dasha_balance 里。调用矩阵测试改为确认这两个路径已删并由现行模块接替。pytest 三条文件 187 通过、1 跳过、0 失败。

Co-Authored-By: Grok (agent loop)
This commit is contained in:
jesse-ux
2026-10-16 09:02:20 +08:00
co-authored by Grok (agent loop)
parent e96de24721
commit fbf04f0b5f
6 changed files with 90 additions and 5 deletions
@@ -0,0 +1,42 @@
# PROGRESS · dasha-unify 修复 · 2026-10-16
分支 `codex/dasha-unify-20261013`。issue #69 第 1 次打回。先把 `origin/staging`(`ef9ee62a`,只有这份修复单)合并进来,没有从 staging 另起分支,也没有改写已经推送的 `5ac88e58`。
## 做了什么
年运里那个规定一个字都不能改的函数 `calc_mudda_with_dasha_balance`,已经改回基线里的年数表字面量。函数文本哈希回到 `8569dd862cf575ac8a670115206c68cd79c5b51bf53113c07bd0e21b07f0560f`。同一文件里另一个函数 `calc_mudda_dasha` 仍引用共享年数表,那一处不在逐字合同里,没有改回去。
`test_ported_function_is_verbatim` 只锁定这一个函数。旁边五分力量那 8 个逐字函数的哈希仍与合同一致,本单没有改到。
历史调用清单 JSON 没有改。两个已删除的占位文件没有加回来。测试改为:这两个路径必须不存在,并且现行模块还在。
`test_historical_artifacts_are_byte_preserved_not_refreshed` 只管另一份封存归档的字节,不管这份清单,所以按修复单的办法 a 改测试,没有重新生成清单。
大运接口改造和 Ashtottari 出生余额修正没有重做,也没有改回去。
## 断言变更
| 位置 | 原值 | 新值 | 原因 |
| --- | --- | --- | --- |
| 年数字面量白名单 | 只有 `dasha_analyzer.py`、`divisional_charts_extended.py`。其余文件的命中必须等于 `["dasha_common.py"]` | 白名单加上 `tajika.py`。命中列表的期望仍是 `["dasha_common.py"]` | `calc_mudda_with_dasha_balance` 被逐字合同锁定,函数里的年数字面量不能换成共享表 |
| 调用矩阵路径 | 清单里每个样本路径都必须是现存文件 | `scripts/extended_dashas.py` 必须不存在,由 `scripts/dasha_registry.py` 接替。`scripts/conditional_dashas.py` 必须不存在,由 `scripts/dwisaptatisama_dasha.py`、`scripts/shattrimshatsama_dasha.py`、`scripts/dwadashottari_dasha.py` 接替。其余路径仍必须存在 | BUG-1341 删除了占位文件。清单是历史归档,不能改 JSON,也不能把旧文件加回来 |
## 自测
工作树 `.venv\Scripts\python.exe -m pytest tests/test_tajika_mudda.py tests/test_owner_case_purge_contract.py tests/test_dasha_api_engine_parity.py -q --tb=no -ra`。
| 文件 | 收集 |
| --- | --- |
| `tests/test_tajika_mudda.py` | 170 |
| `tests/test_owner_case_purge_contract.py` | 9 |
| `tests/test_dasha_api_engine_parity.py` | 9 |
合计 188。结果:187 通过,1 跳过,0 失败,退出码 0。跳过的是 `tests/test_tajika_mudda.py` 第 180 行:本机没有上游仓库。哈希比对写在跳过之前,对不上仍会失败;独立算出的哈希与基线合同相同。上次变红的调用矩阵那一条在这 9 条里,已通过。
隐私标记:`.venv\Scripts\python.exe -m pytest tests/test_repo_privacy_markers.py -q`,62 通过,0 失败,退出码 0。
没跑前端全量 `npm test`,没跑 Python 快速门,没跑 `test:db`(没动数据库)。
## 偏离
无超出修复单的产品改动。本机缺少上游仓库,所以上游逐字比对这一步在本机记为跳过,不记为通过。
+1 -1
View File
@@ -494,7 +494,7 @@
| `TASK-pl9-render-split-20261013.md` | — | render_pl9_markdown 第一阶段:搬出无依赖内部函数 | 待领取(排队:api-chart-subprocess-gate) | `codex/pl9-render-split-20261013` |
| `TASK-python-hygiene-20261013.md` | — | 免费层排队开关报反、静默吞异常、功能吉凶兜底合一、测试专用脚本归位(BUG-1340) | 待领取(排队:pl9-render-split) | `codex/python-hygiene-20261013` |
| `TASK-dasha-unify-20261013.md` | — | /api/dasha 改走引擎同一套实现、删占位注册表、Ashtottari 出生余额(BUG-1341、1344) | 待领取(排队:python-hygiene) | `codex/dasha-unify-20261013` |
| `TASK-dasha-unify-fix-20261016.md` | — | **#69 第 1 次打回**:`5ac88e58` 主体通过;逐字移植的 `calc_mudda_with_dasha_balance` 被改;调用矩阵仍列已删文件 | 待领取 | `codex/dasha-unify-20261013` |
| `TASK-dasha-unify-fix-20261016.md` | `PROGRESS-dasha-unify-fix-20261016.md` | **#69 第 1 次打回**:`5ac88e58` 主体通过;逐字移植的 `calc_mudda_with_dasha_balance` 被改;调用矩阵仍列已删文件 | 待验收 | `codex/dasha-unify-20261013` |
| `TASK-api-server-service-extract-20261013.md` | — | API 单体第一阶段:拆出不带 HTTP 的计算类,生产伪造 handler 归零 | 待领取(排队:dasha-unify) | `codex/api-server-service-extract-20261013` |
| `TASK-data-layer-types-20261013.md` | `PROGRESS-data-layer-types-20261013.md` | 数据访问层改用自己的 DataClient 类型第一阶段(BUG-1351;任务书预留的 1343 已被更大编号越过) | 待验收 | `codex/data-layer-types-20261013` |
| `TASK-contracts-helpers-dedupe-20261013.md` | — | 前后端契约与小工具去重第一阶段 | 待领取(排队:frontend-dead-code、consult-route-split) | `codex/contracts-helpers-dedupe-20261013` |