Files
Jyotisha/docs/tasks/PROGRESS-qizheng-native-chart-20260915.md
T
jesse-ux f7386e0717
Independent Staging Quality Gate / validate (push) Failing after 6m58s
Independent Staging Quality Gate / publish (push) Skipped
fix(qizheng): pin vendor bytes to local a911c890 checkout
Re-copy LICENSE/README/package.json/cli.cjs from the local yinduzhanxing snapshot. Drop dist/index.cjs that was assembled from npm. Do not include 6c27aab6 or 8bba9cb5.
2026-09-15 16:33:31 +08:00

89 lines
5.8 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 · TASK-qizheng-native-chart-20260915
分支:`codex/qizheng-native-chart-20260915`
开工基线:`4cacea8e`(任务书四份已在 staging;代码基线仍是 `2d7698ea` 之后的 staging 全量)
本机:Windows。Python 用 Anaconda 3.11.7`pytest` + `pyswisseph` 已装)。仓库 `.venv` 是指向 `/workspace/Jyotisha/.venv` 的 git symlinkWindows 上不是可用目录。
## 开工核对
| 项 | 结果 |
| --- | --- |
| `git status -sb` | `codex/qizheng-native-chart-20260915...origin/staging` |
| `scripts/jyotish_api_server.py` 行数 | 开工 11313;上限 11363 |
| `docs/BUG_HISTORY.md` 最大号 | 开工时 BUG-699。本单按预分配写入 **700703**。rebase 时发现 `3e58e85f``TASK-rectification-tiebreak-card-loss-20260915.md` 把 702–704 写进了另一份任务书(尚未写入 BUG_HISTORY)。本单记录已落盘,另一单须整体后移,不得覆盖 700–703 |
| Skill | `6.9.16`**未 bump** |
| `pre_work_check.py` | python_runtime / fragment_scan / external_engine_adapters / remote_visibility 均 ok。focused_tests 两条 `test_preflight_fragment_scan.py` 红:本机没有 `.workbuddy/skills/jyotish-vedic-astrology` 镜像路径,且 fragment candidate_count 5 < residue 14。与本单改动无关,未修 |
## 任务 1 · vendored 归档与镜像 Node
- 上游不从 GitHub 拉。本机 `G:\Ferti\yinduzhanxing-codex-add-birth-time-rectification-skill` = 任务书 `/workspace/yinduzhanxing``a911c890`)。已按内容拷贝 `vendor/stem-branch/{LICENSE,README.md,package.json,dist/cli.cjs}` 到本仓同名路径。`cli.cjs` **45,963 行 / 2,682,464 B**sha256 前缀 `cf1bca10507ffcc9`,与上游文件逐字节相同。
- `scripts/qizheng_chart_engine.py` 以上游 168 行适配器为起点(`calculate_qizheng_chart` + CLI `--seven-governors --json`),再按任务 2 改派别参数、boundary、坐标系和错误路径。vendor 以本机 `a911c890` 目录为准,已删除从 npm 另凑的 `dist/index.cjs`。未带 `6c27aab6` / `8bba9cb5`。CLI 无 ketuMode 旗标:请求派别回写 `calculation.ketu_mode`,实际盘面以 `engine_ketu_mode` 为准。
- 仓库根 `NOTICE`:包名、0.8.0、Apache-2.0、上游地址、取入方式。
- `deploy/railway-api.Dockerfile``nodejs` 运行时(不装 npm/构建链),`COPY vendor ./vendor`
- `deploy/gated-paths.txt`:新增 `vendor/**`
- **镜像构建 / 容器内 `node --version`:无 Docker,未跑,不写成通过。** 宿主机 `node --version` = `v22.23.2`。镜像体积变化:未知。
## 任务 2 · 适配器
`scripts/qizheng_chart_engine.py`:只调 `getSevenGovernorsChart`;禁止 `--pillars` 等子命令。`ketu_mode` / `sidereal_mode` 从请求读取并回写。`coordinate_system=qizheng_mansion_degrees_from_jiao`。boundary 无「神煞」,庙旺 `unclosed`。五种错误路径结构化,不 500、不外泄 stderr。
实跑虚构资料 `1990-04-09T13:24:00+08:00 / 31.19N 121.44E`
| 项 | 值 |
| --- | --- |
| 太阳 | 宿度 177.94 奎 7.44° 亥宮 陷 |
| 罗睺 | 宿度 112.09 女 5.09° 丑宮 |
| 计都(apogee | 宿度 27.46 亢 15.46°(近月孛,非罗睺对点) |
| 紫炁 | 宿度 33.34 房 0.34° 卯宮 |
| 命宫 | 星 · 午宮 |
| 宫 / 相位 / 神煞 | 12 / 27 / 0 |
## 任务 3 · 三个只读端点
`scripts/jyotish_api_server.py` 净增 **21 行**11313 → 11334,预算 32,上限 11363)。三个 handler 各 ≤ 8 行。已纳入 `JYOTISH_HEAVY_COMPUTE_CONCURRENCY`
- `/api/qizheng` 见上。
- `/api/western``build_tropical_natal_chart``house_system` 默认 `P` 可覆盖;回归黄道边界句含 Raman 岁差差值。
- `/api/ephemeris_events`90 天 Raman 窗口 **14** 条(ingress 8 + station 6),Lahiri 同窗 16 条且不同;>730 天 400。
本地 `POST http://127.0.0.1:5200/api/qizheng`(与任务书 curl 等价;PowerShell 下 `curl.exe -d` 引号被吃掉,改用 Python `urllib`status 200):
```json
{"success": true, "endpoint": "qizheng", "coordinate_system": "qizheng_mansion_degrees_from_jiao", "calculation": {"engine": "@4n6h4x0r/stem-branch", "engine_version": "0.8.0", "ketu_mode": "apogee", "sidereal_mode": {"type": "modern"}, "engine_ketu_mode": "apogee", "engine_sidereal_mode": {"type": "modern"}, "iso_local": "1990-04-09T13:24:00+08:00", "timeout_seconds": 20}, "ascendant": {"mansion": "星", "palace": "午宮"}, "bodies.sun": {"siderealLon": 177.94225865978694, "mansion": "奎", "mansionDegree": 7.442258659786944, "palace": "亥宮"}}
```
`GET /api/health``status=ok``swisseph_available=true`。本地 `git_commit` 为 unknown(未部署)。
## 任务 4 · Bug
| 号 | 状态 |
| --- | --- |
| BUG-700 | blocked(不调用 `--pillars` |
| BUG-701 | resolved(派别参数化) |
| BUG-702 | resolvedboundary / 庙旺 unclosed |
| BUG-703 | investigatingpanchanga Lahiri,本轮不修) |
## 测试
Anaconda `python -m pytest`
- `tests/test_qizheng_chart_engine.py`
- `tests/test_qizheng_api_productization.py`
- `tests/test_readonly_chart_endpoints.py`
- `tests/test_ephemeris_events.py`
- `tests/test_api_server_growth_contract.py`
- `tests/test_api_heavy_compute_gate.py`
- `tests/test_western_chart_engine.py`
**36 passed**
`run_quality_gate.py --profile quick`:本机无 Docker`npm test` 预期仍是既有 27 条 DB 失败,不得写成全绿。Python 段另缺 `timezonefinder` / `mcp`(见根 `BLOCKED.md`)。上述定向测试已绿。新测试已列入 `CORE_PYTEST_TARGETS`
## 让步
无。3b/3c 已交付。限流已接入。`raw_engine_output` 已落地并去掉路径键。
## 合入
本单最先合入 staging。`git push` 经 SSH `git.copse.top:2222`。远端 `origin/staging` = **`e776cf9d`**(与 HEAD 一致)。不提升 `main`、不改 workflow、不动 DNS。staging `/api/health``deployment.gitCommit` 要等 `backend-quality-gate` 部署后才能等于该 SHA。