Files
Jyotisha/docs/tasks/PROGRESS-chart-ephemeris-fixes-20260924.md
T
jesse-ux 59c2301838
Independent Staging Quality Gate / publish (push) Canceled after 0s
Independent Staging Quality Gate / validate (push) Canceled after 8m10s
docs: point chart ephemeris status at the rebased SHA
2026-09-25 02:14:20 +08:00

66 lines
4.7 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 · Chara 0 年大运 + 星历切日期 + 星盘无资料入口(2026-09-25)
## 当前结论
T1、T2、T3、T4 都已完成,没有让步,也没有写进 BLOCKED。引擎 kn_rao 口径、`HEAVY_COMPUTE_PATHS`、数据库和 workflow 都没动。浏览器登录验收没做。没有推 `staging`,也没有推 `main`。实现提交在变基到 `82c8aeb0` 之后是 `19ea0f06`。状态板写这个 SHA。
- 工作树:`G:\Ferti\Jyotisha\.worktrees\chart-ephemeris-fixes-20260924`
- 分支:`codex/chart-ephemeris-fixes-20260924`
- 基线:`origin/staging` = `514951d7`(代码提交 `824647f2`)
- BUG:1023 / 1024 / 1025 开工时仍空着,沿用任务书预留号。最大已占用号是 1022。没有占用 1026 及以后。
## 逐项
| 项 | 结果 | 说明 |
| --- | --- | --- |
| T1 | 完成 | 0 年大运显示「0 年」,不展开子运,前后日期首尾相接。`assembleChartView({layers:["chara"]})` 对真实引擎响应返回 ok。 |
| T2 | 完成 | 未缓存日期保留日期条,三段换成静态句。429 后点右箭头重试成功。挂载时的今天刷新和迟到的旧日期都不会盖住新日期。本命 `/api/chart` 按账户和出生资料短缓存,并把 `request.signal` 传进引擎调用。 |
| T3 | 完成 | 四种资料类失败都有「去填写出生资料」,链到 `/?settings=chart`,首页打开星盘资料。`?settings=billing` 的解析结果没改。 |
| T4 | 完成 | BUG 历史、DESIGN §15 / §16、VOICE 三句、CHANGELOG、本记录、真人清单和状态板同一提交。 |
## 真实 golden
本机没有仓库 `.venv`,Anaconda Python 3.11 能 `import swisseph`。fixture `frontend/tests/fixtures/chara-zero-year-1985-08-03-beijing.golden.json` 由下面的调用生成,没有手造引擎形状:
- `C:\Users\74082\anaconda3\python.exe`
- `JyotishAPIHandler.__new__()._compute_chart`,再 `_compute_chara_dasha`
- 虚构 1985-08-03 03:59,纬度 39.9042,经度 116.4074,时区 8,`ayanamsa=raman`,`node_mode=mean`,`skip_vedastro_main_entry_overview`,`antardasha=true`
生成结果 12 段,Sagittarius `duration_years` 为 0(debilitated)。`scripts/jaimini.py` 未改。
## 历史检索
开工读过 BUG-966、BUG-715、BUG-716、BUG-717、BUG-996、BUG-1016、BUG-1017,以及 chart-view / ephemeris / `birth_profile_incomplete` 的相关段。
- BUG-966 的「星历不得再上骨架 / 正在加载」还在。本单没有加骨架。它删掉未命中时清空状态的副作用,就是 BUG-1024。
- BUG-715 的失败分档还在。0 年以前会在 mapper 里抛 `RangeError`,被收成 `engine_bad_payload`。现在 0 年是合法段,不再走这条失败。
- BUG-1016 的骨架例外仍只在星盘盘位。星历没有用。
- BUG-1017 的按需层失败出口没改。
- BUG-996:查询失败仍不是 `birth_profile_incomplete`。四种资料失败各自留原文,只是多了同一颗按钮。
## 行为说明
失败当天,左右箭头重试这一天,不先改日期。日历里另选一天仍会换日期。成功之后箭头恢复成前一天 / 后一天。
本命缓存键用的是账户 id 加上出生日期、时间、经纬、时区、岁差和交点,与 `cachedPostEngine` 同一组字段、同一 5 分钟 TTL。键的 path 是 `/api/ephemeris/natal-chart`,避免和星盘页略有不同的 `/api/chart` 请求体串结果。行运盘仍按所选日期现算。
## 测试
改代码前,在 `frontend` 跑下面这组,93 条,失败 0:
`tests/ephemeris-page.test.tsx`、`tests/ephemeris-route.test.ts`、`tests/chart-page-view.test.tsx`、`tests/chart-page-hook.test.ts`、`tests/settings-url.test.ts`、`tests/home-shell-growth-contract.test.ts`、`tests/secondary-page-entry.test.ts`、`tests/billing-panel.test.ts`
改完后同一组再加上 `tests/ephemeris-page-lifecycle.test.tsx` 和 `tests/chart-view-zero-year.test.ts`:104 条,失败 0。改前那 93 条里没有新增失败。
- `.\node_modules\.bin\tsc --noEmit`:通过。
- `npm run lint`:0 error,121 条既有 warning。本次新文件没有新增 warning,也没有为了清 warning 改业务代码。
- 没有改既有断言的期望值,所以没有「原值 / 新值 / 原因」三栏。
- 没有跑 Windows 全量 `npm test`,也不把别人机器上的 3809 / 56 写成这次的结果。
- 没有跑 `next build`,没有声称 `/`、`/chart`、`/ephemeris` 的 Static 标记在本机构建里复核过。源码没有把这三条改成动态路由。
## 没做的验证
- 没有浏览器登录。真人步骤在 `docs/testing/chart-ephemeris-fixes-20260924.md`,结果都是待验。
- 没有部署,没有对过 staging health。
- 没有推 `origin/staging`。功能分支可以另推 `origin`,以回报里的远端核对为准。