Staging took BUG-1472..1482 while this branch was in review, so the branch's eight entries move to BUG-1483..1490. Docs and one test comment only; the branch's commit messages keep the old numbers. Co-Authored-By: Claude (agent loop) <noreply@anthropic.com>
95 lines
10 KiB
Markdown
95 lines
10 KiB
Markdown
# PROGRESS · 上游同步第九轮(2026-10-28)
|
||
|
||
- 分支:`codex/upstream-sync9-20261028`
|
||
- 基线:`9a0ce76d480c8b3d9fd8dd73bcc5ab59437469c4`(当时的 `origin/staging`)
|
||
- 计算提交止于:`8aed605a43ad8e235cd341ebcaeb7675503325e6`
|
||
- 结论:甲批九项已按语义移植。生时校正 20 条和 900 条与第八轮回放的名次、分钟误差逐条相同。乙批未做。
|
||
|
||
## 做了什么
|
||
|
||
| 项 | 上游 | BUG | 提交 |
|
||
| --- | --- | --- | --- |
|
||
| T1 Yogini 起点余额 | `d268d519` | BUG-1483 | `d226b0e5388cc3606272956bc5b9c2072685210d` |
|
||
| T2 Tithi 主星 | `33537b31` | BUG-1484 | `9d3f59a87206d4b7f6c10f94c56565bbd98089a6` |
|
||
| T3 Saham Table 74 | `cb8a1ca7` | BUG-1485 | `16bae006158aad8b493362ce1a51391626a95dca` |
|
||
| T4 Ashtottari | `0712f98f` | BUG-1486 | `b35c424945e578abe95fca69de5eff1a8e14c0e1` |
|
||
| T5 Kalachakra | `f353a096` | BUG-1487 | `96312893b7ad7660e72081c81bf4bf031f0b38a0` |
|
||
| T6 Arudha 只到星座 | `8b55630a` | BUG-1488 | `bd09485243000ea7012b865dbee04fc00c535005` |
|
||
| T7 Darakaraka | `45b3b66b` | BUG-1489 | `7bede9c99a056446648aa1e8fa36b3a4734a36eb` |
|
||
| T8 边界测试,不改代码 | `07fc5be3` | 无(没有改冻结文件) | `c1bd59e97a76e914b884b650cae1adfb13b1e858` |
|
||
| T8b 相位调用方传速度 | `e628118d` | BUG-1490 | `8aed605a43ad8e235cd341ebcaeb7675503325e6` |
|
||
|
||
`aspects.py` 本体在 `d226b0e5` 里。开工时它已经在暂存区,第一次提交把它和 Yogini 记在了一起。没有改写历史。相位行为由后面的调用方提交和几何测试覆盖。
|
||
|
||
接入映射:`docs/research/upstream_capability_map_2026_10_28.md`。
|
||
|
||
## 第 1 次打回(2026-10-28)
|
||
|
||
- 被验 SHA:`57867c94fe7fd08196a2cb5d0be4b7c1f2cdf5df`。修复单:`docs/tasks/TASK-upstream-sync9-fix-20261028.md`。
|
||
- 只改测试与记录:`tests/test_cli_smoke.py` 一条测试、`docs/BUG_HISTORY.md` 的 BUG-1489、本文件。没有改 `scripts/`、冻结文件、前端。
|
||
- 这张盘:`dk_planet` 由 `Sun` 变 `Moon`(月亮 3.09° 最低,太阳 8.85°),D9 由 `Gemini` / `ENEMY` 变 `Cancer` 第 1 宫 / `OWN_SIGN`。同一结果里 `chara_karaka_7` 与 `chara_karaka_8` 的 `Darakaraka` 都是 `Moon`。
|
||
- 检索 `grep -rn "dk_planet\|Darakaraka\|darakaraka" tests/` 共 56 处:只有 `test_cli_smoke.py` 这一条锁具体星名;`test_api_server_security.py` 只判真假;`test_chara_karaka_8_bphs_order.py`、`test_jaimini.py` 自己算期望;`test_consultation_consumer_context.py` 与主表互比;其余是自造 fixture 的输入,不经过读者。
|
||
- 发现但没改:`tests/golden/upstream_sync2/relationship_einstein.json` 记的 `dk_planet` 是 `Jupiter`,这张盘现在算 `Sun`。`test_upstream_sync2_goldens.py` 只比键和类型、不锁值,本轮不动它。
|
||
|
||
跑过的命令:
|
||
|
||
| 检查 | 命令 | 结果 |
|
||
| --- | --- | --- |
|
||
| Darakaraka CLI 测试 | `.venv\Scripts\python -m pytest tests/test_cli_smoke.py -k darakaraka -o addopts="" -q` | 1 passed、34 deselected |
|
||
| 11 个上游同步测试文件 | 同一命令,参数换成那 11 个文件 | 240 passed(本机收集 240 条) |
|
||
| 检索到的 Darakaraka 相关测试 | `test_chara_karaka_8_bphs_order.py`、`test_jaimini.py`、`test_synastry_full_dossier.py`、`test_consultation_consumer_context.py`、`test_d9_evidence_bands.py` | 80 passed |
|
||
| 接口里的配偶星片段 | `tests/test_api_server_security.py -k relationship_returns_spouse_status_fragment` | 1 passed、134 deselected |
|
||
|
||
环境缺口:Windows 上不设 `PYTHONUTF8=1` 时,`full-reading` 子进程按 GBK 编码输出,写到 `⚠` 抛 `UnicodeEncodeError`,测试看起来像引擎挂了。这是本机控制台口径,不是代码问题;本轮所有命令都带了这个变量。
|
||
|
||
## 跑过的命令
|
||
|
||
| 检查 | 命令 | 结果 |
|
||
| --- | --- | --- |
|
||
| 本轮新增测试 + 年运几何 + 相位 + 特殊点 + 星盘点 | `.venv\Scripts\python -m pytest` 下列 16 个文件 | 297 个点,退出码 0 |
|
||
| Yogini 非边界抽样 | 种子 `20261028`,1 万个随机经度,与改前 `int` 公式比第一大运余额 | 核对 10000,不一致 0 |
|
||
| 既有 Yogini / Saham / Tajika / Dasha | `test_yogini_seed_profile.py`、`test_saham_daynight.py`、`test_saham_directed_operand_contract.py`、`test_tajika.py`、`test_dasha.py` | 退出码 1。唯一失败是 `test_tajika.py` 的 Windows 路径断言,见下面三栏。其余为通过的点 |
|
||
| 密封校正 20 条 | `scripts/research/sealed_holdout_rerun.py`(没有 `--freeze`) | `trial_count` 20,`implementation_hash_matches_at_replay` true。与 `sealed_holdout_rerun_upstream_sync8_2026_10_18.json` 比 `true_rank`、`opaque_true_rank`、`minute_error`、`would_confirm`、`false_confirmation`、`insufficient_evidence_rejected`、`candidate_count`、`event_count`:不一致 0。相对更老档案的 `changed_trial_count` 仍是 8,与第八轮记录相同 |
|
||
| 报时窗口 900 条 | `scripts/research/reported_offset_sweep.py --json`(没有 `--freeze`) | `trial_count` 900,冻结哈希匹配。与 `reported_offset_upstream_sync8_2026_10_18.json` 同样八个字段:不一致 0。相对更老档案的 `changed_trial_count` 仍是 581 |
|
||
| 开工预检 | `scripts/pre_work_check.py --remote-timeout 8 --command-timeout 45` | 退出码 1。只有碎片扫描 90 秒和定向测试 45 秒在 Windows 上超时。远端可见、Python、外部适配器是通过的。不把这次写成预检通过 |
|
||
|
||
16 个文件是:`test_upstream_sync9_yogini_exact_boundaries.py`、`test_upstream_sync9_tithi_lord_source.py`、`test_upstream_sync9_saham_table74_completion.py`、`test_upstream_sync9_saham_pvr_directed_arc.py`、`test_upstream_sync9_ashtottari_reference_clock.py`、`test_upstream_sync9_ashtottari_source_arcs.py`、`test_upstream_sync9_kalachakra_source_lords.py`、`test_upstream_sync9_special_lagnas_arudha_coordinates.py`、`test_upstream_sync9_darakaraka_reader_identity.py`、`test_upstream_sync9_dasha_analyzer_boundary_contract.py`、`test_upstream_sync9_aspect_geometry_regressions.py`、`test_dasha_master_children.py`、`test_aspects.py`、`test_annual_native_geometry.py`、`test_special_lagnas_birth_instant.py`、`test_chart_view_points_api.py`。
|
||
|
||
Python 快速门、前端 tsc / lint / build、`npm test`、`test:db` 本轮不跑。没有改前端,没有改表。
|
||
|
||
## 断言三栏
|
||
|
||
| 位置 | 原值 | 新值 | 原因 |
|
||
| --- | --- | --- | --- |
|
||
| `tests/test_dasha_master_children.py` 来源大运 | major 行没有 `antardasha` | 计算函数自己挂上子运 | 上游 `f353a096` 在返回前附上按比例的子运。简化附件仍只改自己的副本 |
|
||
| 同上,无月亮经度的 Kalachakra | major 行没有 `antardasha` | 无月亮经度时也带按比例子运 | 上游简化路径同样在返回前附上子运 |
|
||
| Saham `formula_traces` | 上游是 36 个键的字典 | 我方仍是报告用的 36 条列表,每条有 `key` / `rule` / `longitude` | 年运几何测试和报告章节按列表读。Table 74 的数值在各 `*_saham` 行上,黄金值按上游数字断言,没有放宽 |
|
||
| `tests/test_tajika.py` 规则路径 | `SAHAM_RULES_PATH.endswith('references/saham_rules.json')` | 没有改这条断言 | Windows 上 `os.path.join` 是反斜杠,断言为假。路径拼法本轮没改。这是环境缺口,不把断言改成「或反斜杠」 |
|
||
| `tests/test_cli_smoke.py::test_full_reading_uses_d9_context_for_darakaraka_dignity` | `dk_planet` 期望 `Sun`,D9 期望 `Gemini` / `ENEMY` | `Moon`,D9 `Cancer` 第 1 宫 / `OWN_SIGN`,并加「`dk_planet` = `chara_karaka_8.karaka_table_8.Darakaraka.planet`」断言 | 原断言锁的是旧读者八星法取第 7 高给出的错值(BUG-1489)。这张盘月亮 3.09° 最低,主表本来就是 `Moon`;没有删除或放宽任何断言,另补了 D9 宫位 |
|
||
|
||
## 偏离
|
||
|
||
- 有向弧方向保持 BUG-1387,没有按一份更早的上游习惯翻回去。Table 74 失败来自缺公式和旧行覆盖,不是方向反了。
|
||
- Kalachakra 的 pada 起点用本地 `10/3` 度表。共用 `find_nakshatra` 在 108 个精确起点里有 50 个会划进上一份。不改共用函数,免得带动 Yogini、Vimshottari 和校正。
|
||
- 没有月亮经度时,Kalachakra 仍是原来的简化表,所以 `tests/test_dasha.py` 里「没有月亮经度则从 Ketu / 摩羯起」仍然成立。
|
||
- 上游 `95ea9e02` 的瑜伽节点测试不收。我方 `YogaContext` 没有 `parashari_aspect`。计都进入相位由几何测试覆盖。
|
||
- 不新增 `scripts/tithi_ashtottari.py`。Tithi 主星在 `scripts/tithi_lord.py`,顺序用已有的 `tithi_seed`。
|
||
- 清单里的 `source_commit` 仍是 `b9a0ef8f`。改它会让 `tests/test_upstream_import_plan.py` 和 `tests/test_upstream_git_import_b9a0ef8f.py` 失败,而且那份提交在上游已经不存在。本轮只加长 `boundary`,并在同步台账另记 main `5fb8379c`。`hash_contract_result` 用和上一笔一样的文字结论,没有编文件哈希。导入器要求工作树干净,而且 `--apply` 会覆盖镜像,本轮没有跑。
|
||
- 相位三个生产调用方:`cmd_aspects`、`cmd_full_reading`、接口 `_compute_aspects`。有数字速度就传入,没有就传 `None`。`calc_house_aspects` 不接收速度。
|
||
- 校正不读 `special_lagnas` 的 Arudha 度数。20 条和 900 条因此不必改回旧显示。冻结文件没有改,也没有重新冻结。
|
||
- 能力图里「上游有、我方没有」的计算模块按文件名筛出 33 个,另加 `tithi_ashtottari.py`。任务书写的 43 没有逐份清单,这里不把 901 个上游独有脚本算进去,也不凑数。
|
||
|
||
## 未做
|
||
|
||
- 乙批:`50847e57`(Drekkana / Sarpa)、`6859b263`(Narayana 小运强度)。都要改冻结文件,等 #137。
|
||
- 统一结果外层(`source_commit` / `execution_status` 包在所有接口上)。任务书明确不做。
|
||
- `tests/test_full_report_quality_gate.py` 没有跑。它不断言 Arudha 度数。
|
||
- `tests/run_all.py` 的 t62 没有重跑。
|
||
- Python 快速门留给 Claude。
|
||
|
||
## 环境缺口
|
||
|
||
- 预检的碎片扫描和定向测试超时。
|
||
- `test_tajika.py` 那一条路径断言在 Windows 上失败,Linux 验收应再看一次。
|
||
- 无模型凭据,没有跑真人盘面。走查清单仍是 `docs/testing/upstream-sync9-20261028.md`。
|