BUG-714: deploy/gated-paths.txt already listed vendor/** after the qizheng vendoring, but backend-quality-gate.yml did not. The contract test requires the two lists to match.
3.3 KiB
PROGRESS · 三份只读页单验收修复(2026-09-16)
- 执行分支:
codex/readonly-pages-fix-20260916 - 工作树:
.worktrees/readonly-pages-fix-20260916 - 基线:
origin/staging@6bb892b8(含fadb64fb任务书与page.tsx1951 冻结修复)
方案选择
BUG-710 走任务书方案 A。 vendored cli.cjs 里的库函数 getSevenGovernorsChart(date, location, options) 接受 ketuMode / siderealMode;CLI main() 调用时不传 options。本单用 scripts/qizheng_seven_governors.js 在内存编译该 bundle、取出库函数并传入 options,不改 vendor/** 字节、不加 CLI 旗标。
做了什么
- BUG-710: 请求派别真正进入引擎。
calculation.ketu_mode/sidereal_mode只写实际生效值。mapper 读calculation.engine_ketu_mode。 - BUG-711: 星历合同不再禁止 sidebar 出现
ephemeris。侧栏「星历」入口保留。 - BUG-712: 浮点量化到 6 位;golden 缺失失败,不自动重建。
测试
| 项 | 结果 |
|---|---|
node --version |
v22.23.2 |
pytest tests/test_qizheng_chart_engine.py tests/test_ephemeris_events.py tests/test_qizheng_api_productization.py |
21 passed |
pytest tests/test_api_server_growth_contract.py |
通过(未改 jyotish_api_server.py) |
npx tsx --test tests/ephemeris-page.test.tsx |
6/6 |
npx tsx --test tests/chart-view-route.test.ts |
8/8(含冻结上限与 mapper 引擎字段) |
既有断言变更(AGENTS.md §7.3)
frontend/tests/ephemeris-page.test.tsx「the ephemeris page is its own route and never grows page.tsx」:
| 原值 | assert.doesNotMatch(app-sidebar.tsx, /ephemeris/) |
| 新值 | 不读 sidebar;本测试文件不得 import app-sidebar |
| 原因 | chart-page 单按任务书在 sidebar 加了 /ephemeris 入口;文件归属不是产品入口禁止(BUG-711) |
tests/test_qizheng_chart_engine.py::test_ketu_mode_request_is_echoed_and_engine_mode_is_visible:
| 原值 | 请求 descending-node 时 ketu_mode == descending-node 且 engine_ketu_mode == apogee |
| 新值 | 请求 descending-node 时两者都是 descending-node,且计都位置相对默认派别改变 |
| 原因 | 原断言把 BUG-710 的错误行为锁成合同 |
未改 jyotish_api_server.py 行数契约。未删 sidebar 星历入口。未放宽 dignities / boundary。
门禁补修(BUG-713)
Gitea backend-quality-gate run 2635(a38a9415)失败:
tests/test_api_server_security.py::test_capability_audit_scans_registry_and_local_sources
| 原值 | app_routes 在 chart 后直接 home,无 ephemeris |
| 新值 | 加入 'ephemeris' |
| 原因 | _scan_app_routes 扫到了 frontend/src/app/ephemeris/page.tsx;这是 BUG-454 同类遗漏,不是放宽 |
门禁数字:1 failed, 765 passed, 1 skipped。本条修完后应回到 766 passed。
门禁补修(BUG-714)
Gitea run 2636(8d6a4bd0)Python 段过了,前端 # fail 1:
gated paths are one list shared by both quality-gate triggers
deploy/gated-paths.txt 已有 vendor/**,.gitea/workflows/backend-quality-gate.yml 的两份 paths: 没有。按清单补上,不改 job 逻辑。
合入
git push origin HEAD:staging,核对远端 SHA。部署是否追上见推送后的 /api/health。