fix(ephemeris): alias the engine's three panchanga spellings to the table
Coordinator ruling (brief author, 2026-09-26): Aindra -> Indra (因陀罗), Variyana -> Variyan (安逸), Dhanishtha -> Dhanishta (虚宿). Spelling aliases only; the brief's table and its typed test copy are unchanged. BLOCKED item struck through, PROGRESS / checklist / task index updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2981da6fbc
commit
dd8912fea0
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
- 本机只有 Node v20.19.2:`mock.module` 类测试以 ERR_MODULE_NOT_FOUND 失败(基线即 61 条)。本轮全量 3915 条,失败 61 条,与基线测试名逐条一致、新增失败 0、无消失测试名;Linux Node 22 全量待协调方复跑。
|
||||
- 无受控登录账号:`/people`、`/ephemeris` 的真实数据只用本地 `next start` + 临时宿主页(虚构人物、真实引擎 golden 五要素,未提交)在 Chrome 151 里看过;登录态真机、iPhone Safari、浏览器返回手势、读屏按 `docs/testing/people-ephemeris-ui-20260926.md` 待验。
|
||||
- 任务书对照表与引擎拼写有三处不一致(`Aindra` / `Variyana` / `Dhanishtha`,表里是 Indra / Variyan / Dhanishta),按任务书只允许三组别名,这三个名字现在照写梵文,待产品裁决是否补别名。
|
||||
- ~~任务书对照表与引擎拼写有三处不一致(`Aindra` / `Variyana` / `Dhanishtha`,表里是 Indra / Variyan / Dhanishta),按任务书只允许三组别名,这三个名字现在照写梵文,待产品裁决是否补别名。~~ **已解除(2026-09-26)**:协调方以任务书作者身份裁定补这三组拼写别名,映射到表内既有条目(因陀罗 / 安逸 / 虚宿),不改译名。
|
||||
- 未部署;BUG-1039 保持 investigating。
|
||||
|
||||
## 三份修复单 final-r4b:自动化缺口解除与剩余边界(2026-09-25)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
1. **中文名在视图层投影,不改接口。** 任务书 T2 写「`panchangaFromEngine` 输出中文主名与梵文副名」,同时红线 3 写「不改接口」。实际函数名是 `panchangaFactorsFromEngine`,它的输出就是 `/api/ephemeris` 的 `factors` 字段。为守红线,接口字段一字未改(`value` 仍是引擎名),中文主名 / 梵文副名由 `panchangaDisplayRows` 在客户端从 `panchanga-names-zh.ts` 查。「未知名记日志」因此在浏览器控制台,每个名字只记一次。
|
||||
2. **星期不出副行。** 接口里星期本来就是中文(服务端 `VARA_ZH`),引擎原名是英文 Sunday,不是梵文;附表也没有星期。原型里的「土星日」不在附表里,没加。
|
||||
3. **对照表与引擎拼写三处不一致,未擅自加别名(待裁决)。** 引擎 `scripts/muhurta.py` 输出 `Aindra`、`Variyana`、`Dhanishtha`,附表写的是 Indra、Variyan、Dhanishta。任务书只允许三组别名,所以这三个名字现在照写梵文(测试 `panchanga-names-zh.test.ts` 锁住了这一现状并注明待裁决)。真实 golden 2026-09-14 的瑜伽就是 `Aindra`。产品若同意,只需在 `PANCHANGA_NAME_ALIASES` 加三行别名、改那条测试。
|
||||
3. **对照表与引擎拼写三处不一致 → 已按裁决补别名。** 引擎 `scripts/muhurta.py` 输出 `Aindra`、`Variyana`、`Dhanishtha`,附表写的是 Indra、Variyan、Dhanishta(真实 golden 2026-09-14 的瑜伽就是 `Aindra`)。首版按任务书只收三组别名,这三个名字照写梵文并挂待裁决;协调方 09-26 以任务书作者身份裁定:在 `PANCHANGA_NAME_ALIASES` 补 `Aindra → Indra`、`Variyana → Variyan`、`Dhanishtha → Dhanishta` 三组拼写别名,指向表内既有条目(因陀罗 / 安逸 / 虚宿),译名不变。测试里「任务书附表第二份抄本」保持原样,另加一条别名断言;原先锁「这三个名字返回 null」的三行断言随裁决删除(原值 null / 新值 因陀罗·安逸·虚宿 / 原因:裁决补别名)。
|
||||
4. **D10 的两个边界句。** 资料岁差是 Lahiri 时,「和星盘页的 Lahiri 不同」是错的,改写「五要素按 Lahiri 岁差算,和星盘页相同。」;读不到资料岁差时只写「五要素按 Lahiri 岁差算。」已写进 VOICE。岁差名取接口已有的 `transits.ayanamsa`(即资料设置),名字与设置里一致,不带「(默认)」。
|
||||
5. **没有本命上升时的句子改了。** 原句「还没有本命上升,相对本命这一列空着。」里的「列」随表格一起没了,改为「还没有本命上升,先不写落在你的第几宫。」行运逆行保留为副行「· 逆行」(D9 没提,但删掉会丢事实)。
|
||||
6. **「已校正」判定** = 状态 accepted / confirmed **且**有校正案例 id。只看状态会把旧资料读回时 `readProfile` 的 `confirmed` 兜底(有时间就算 confirmed)误标成已校正。
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
| 任务书 | 进度 | 主题 | 状态 | 落点 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `TASK-people-ephemeris-ui-20260926.md` | `PROGRESS-people-ephemeris-ui-20260926.md` | **星盘档案页补样式 + 星历可读性改版**(原型 https://claude.ai/artifact/FmPy9xZ7dQw9u7yrW4WzTw ,产品 09-26 确认):/people 样式 0 条(BUG-1039)→ 手机列表→详情、桌面两栏;星历五要素先中文后梵文(附唯一对照表)、吉凶彩色标签、固定规则当日总评(不调模型)、标题栏大按钮移到底部提示卡。必须真实浏览器截图验收。与 BUG-1038 单并行、文件不交叉 | 待验收(Claude 子代理 09-26 实现;全量失败名单与基线一致、Static 保持、Chrome 375/390/1280 亮暗截图;对照表三处引擎拼写待裁决) | 分支 `codex/people-ephemeris-ui-20260926`,未推送 |
|
||||
| `TASK-people-ephemeris-ui-20260926.md` | `PROGRESS-people-ephemeris-ui-20260926.md` | **星盘档案页补样式 + 星历可读性改版**(原型 https://claude.ai/artifact/FmPy9xZ7dQw9u7yrW4WzTw ,产品 09-26 确认):/people 样式 0 条(BUG-1039)→ 手机列表→详情、桌面两栏;星历五要素先中文后梵文(附唯一对照表)、吉凶彩色标签、固定规则当日总评(不调模型)、标题栏大按钮移到底部提示卡。必须真实浏览器截图验收。与 BUG-1038 单并行、文件不交叉 | 待验收(Claude 子代理 09-26 实现;全量失败名单与基线一致、Static 保持、Chrome 375/390/1280 亮暗截图;对照表三处引擎拼写已按协调方裁决补别名) | 分支 `codex/people-ephemeris-ui-20260926`,未推送 |
|
||||
| `TASK-round-0925-followup-20260925.md` | `PROGRESS-round-0925-followup-20260925.md` | **0925 收尾单**:西洋盘标签偏移 ≤30° + 第三圈;删除后只在当前人物里回退;人物接口故障降级为本人;P3 删旧面板、点击按最近行星、删除年运死调用 | 已验收(Claude 09-26:偏移 ≤30° 达成;删后回退按人、人物接口降级、账户单次请求、面板与死代码删除均通过;残留 0.73% 盘标签重叠为 P3) | `d08ffdc0` + 合同修复 `e84d6eb8`(d08ffdc0 的门禁 run 2901 红于一条引用已删面板文案的 Python 合同,Claude 经产品授权直接修复);已部署 run 2906,health 一致 |
|
||||
| `TASK-chart-western-fix-20260925.md` | `PROGRESS-chart-western-fix-20260925.md` | **西洋盘 ASC/MC 重叠**:固定锚点避让、真实引擎64盘与固定种子512盘扫描、343px盘宽命中≥44px;raw golden;文档陈旧行更正 | 已验收(重叠 0%);新 P1 标签偏移最大 115° → 收尾单 D1(产品定 ≤30° + 第三圈) | `4d801e53`(已部署,health 核对一致) |
|
||||
| `TASK-chart-dasha-western-redesign-20260924.md` | `PROGRESS-chart-dasha-western-redesign-20260924.md` | **大运 / 西洋盘改版**(原型 https://claude.ai/artifact/DYovEPMqD1xwNgna5xVTre ,产品 09-24 全部同意,相位线常显):大运「现在」卡 + 时间条 + 默认折叠(原 81/144 行平铺);西洋盘 520 三圈、行星避让 + 引线、宫号居宫中、ASC/MC 盘内、行星位置表、点选过滤相位。排在 chart-ephemeris-fixes T1 之后 | 已验收,1 P1(ASC/MC 标签不参与避让,约 34% 盘重叠)→ chart-western-fix | `5a2d9da9`(已部署) |
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
14. 顶栏只剩「星历」和人名,**没有**右上角的「带这天去提问」大按钮。
|
||||
15. 「今日五要素」卡片第一行是一句总评,例如「满月之日,整体偏吉;迦那落在毗湿提,重要的事避开。」下面两个小标签「N 吉」「M 凶」。换几天看看,句子跟着变,且只有这几种说法:满月之日 / 新月之日 / 月亮渐盈 / 月亮渐亏 + 整体吉 / 整体偏吉 / 吉凶参半 / 整体偏凶。
|
||||
16. 五行里月相日、月宿、瑜伽、迦那先写中文(例如「白分初五」「亢宿 · 第 4 足」「分离」「巴瓦」),下面小字是梵文。遇到「Aindra」「Variyana」「Dhanishtha」这三个名字时目前只写梵文(对照表待产品裁决),记下日期。
|
||||
16. 五行里月相日、月宿、瑜伽、迦那先写中文(例如「白分初五」「亢宿 · 第 4 足」「分离」「巴瓦」),下面小字是梵文。引擎拼法「Aindra」「Variyana」「Dhanishtha」也应显示中文「因陀罗」「安逸」「虚宿」。
|
||||
17. 每行右边有彩色小标签:吉是绿色、凶是红色、中是黄色。
|
||||
18. 卡片底下一行写「五要素按 Lahiri 岁差算,和星盘页的 Raman 不同。」——如果你的岁差设置改成了 KP,这里写 KP;改成 Lahiri 时写「和星盘页相同」。
|
||||
19. 「当日行运」每行:彩色行星符号、「太阳 在 狮子座」、下面小字「落你的第 N 宫」(逆行的星再加「· 逆行」),右边是「29°33′」这样的度数。给一个还没填出生时间的人看,行运没有「落你的第几宫」,段首写「还没有本命上升,先不写落在你的第几宫。」
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
*
|
||||
* Matching ignores case, spaces and hyphens. The three spelling aliases the
|
||||
* brief lists (Garija/Gara, Dwitiya/Dvitiya, Shashthi/Shashti) live in
|
||||
* `PANCHANGA_NAME_ALIASES`; no other alias is accepted.
|
||||
* `PANCHANGA_NAME_ALIASES`, plus three the coordinator ruled on 2026-09-26 so
|
||||
* the engine's own spellings (`scripts/muhurta.py`) reach the existing
|
||||
* entries: Aindra → Indra, Variyana → Variyan, Dhanishtha → Dhanishta. These
|
||||
* are spellings, not translations; no other alias is accepted.
|
||||
*/
|
||||
|
||||
export type PanchangaNameKind = "tithi" | "nakshatra" | "yoga" | "karana";
|
||||
@@ -114,11 +117,14 @@ export const KARANA_ZH: Readonly<Record<string, string>> = {
|
||||
Kimstughna: "金斯图格纳",
|
||||
};
|
||||
|
||||
/** Spelling alias → table key. Only the three pairs the brief names. */
|
||||
/**
|
||||
* Spelling alias → table key. The brief's three pairs, plus the engine's three
|
||||
* spellings (coordinator ruling 2026-09-26).
|
||||
*/
|
||||
export const PANCHANGA_NAME_ALIASES: Readonly<Record<PanchangaNameKind, Readonly<Record<string, string>>>> = {
|
||||
tithi: { Dvitiya: "Dwitiya", Shashti: "Shashthi" },
|
||||
nakshatra: {},
|
||||
yoga: {},
|
||||
nakshatra: { Dhanishtha: "Dhanishta" },
|
||||
yoga: { Aindra: "Indra", Variyana: "Variyan" },
|
||||
karana: { Gara: "Garija" },
|
||||
};
|
||||
|
||||
|
||||
@@ -85,6 +85,21 @@ test("the three listed aliases resolve to the same entry", () => {
|
||||
assert.equal(panchangaNameZh("tithi", "Krishna Shashthi"), "黑分初六");
|
||||
});
|
||||
|
||||
test("the engine's own spellings reach the existing entries (coordinator ruling 2026-09-26)", () => {
|
||||
// `scripts/muhurta.py` spells these three differently from the brief's table.
|
||||
// 原值:6de277a4 里断言这三个引擎拼法返回 null(照写梵文、待裁决)。
|
||||
// 新值:映射到表内既有条目。
|
||||
// 原因:协调方 2026-09-26 以任务书作者身份裁定补拼写别名,译名不变。
|
||||
assert.equal(panchangaNameZh("yoga", "Aindra"), "因陀罗");
|
||||
assert.equal(panchangaNameZh("yoga", "Indra"), "因陀罗");
|
||||
assert.equal(panchangaNameZh("yoga", "Variyana"), "安逸");
|
||||
assert.equal(panchangaNameZh("yoga", "Variyan"), "安逸");
|
||||
assert.equal(panchangaNameZh("nakshatra", "Dhanishtha"), "虚宿");
|
||||
assert.equal(panchangaNameZh("nakshatra", "Dhanishta"), "虚宿");
|
||||
// An alias stays inside its own limb.
|
||||
assert.equal(panchangaNameZh("nakshatra", "Aindra"), null);
|
||||
});
|
||||
|
||||
test("case, spaces and hyphens are ignored", () => {
|
||||
assert.equal(normalizePanchangaName("Uttara-Bhadra pada"), "uttarabhadrapada");
|
||||
assert.equal(panchangaNameZh("nakshatra", "uttara bhadrapada"), "壁宿");
|
||||
@@ -100,13 +115,6 @@ test("a name the table does not know returns null so the caller keeps the engine
|
||||
assert.equal(panchangaNameZh("karana", "Unknown"), null);
|
||||
// A yoga name is not looked up in another limb's table.
|
||||
assert.equal(panchangaNameZh("nakshatra", "Vriddhi"), null);
|
||||
/* Engine spellings (`scripts/muhurta.py`) that the brief's table spells
|
||||
differently. Not aliased here: the brief allows only the three aliases
|
||||
above, so these stay in Sanskrit until the table is ruled on — see
|
||||
PROGRESS-people-ephemeris-ui-20260926 「待裁决」. */
|
||||
assert.equal(panchangaNameZh("yoga", "Aindra"), null);
|
||||
assert.equal(panchangaNameZh("yoga", "Variyana"), null);
|
||||
assert.equal(panchangaNameZh("nakshatra", "Dhanishtha"), null);
|
||||
});
|
||||
|
||||
test("tithi split separates the fortnight from the day", () => {
|
||||
|
||||
Reference in New Issue
Block a user