fix(report): fallback copy — PVR 表 30, no stray comma after the planet name (#243)
Independent Staging Quality Gate / validate-frontend (pull_request) Successful in 9m16s
Independent Staging Quality Gate / validate-python (pull_request) Successful in 9m35s
Independent Staging Quality Gate / publish (pull_request) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXozsiu43ob7B8UZCmDM
This commit is contained in:
2026-11-13 18:10:01 +08:00
co-authored by Claude Opus 5.5
parent 2731c34bb7
commit a40cdc0eae
2 changed files with 4 additions and 4 deletions
@@ -56,7 +56,7 @@ function placement(facts: Facts, name: unknown, label: string, showDignity = tru
const dignity = typeof row.d1_dignity_zh === "string" ? row.d1_dignity_zh : undefined;
const details = [location && `落在${location}`, showDignity && dignity && `尊贵状态为${dignity}`].filter(Boolean);
return {
text: body ? `${label === body ? body : `${label}是${body}`}${details.length ? `,${details.join(",")}` : ""}。` : "",
text: body ? `${label === body ? `${body}${details.join(",")}` : `${label}是${body}${details.length ? `,${details.join(",")}` : ""}`}。` : "",
incomplete: !body || !location || (showDignity && !dignity),
};
}
@@ -95,7 +95,7 @@ function participation(facts: Facts, domain: string, id: string) {
}
const functionalProfiles: Readonly<Record<string, string>> = {
pvr_table30_v1: "拉奥表 30",
pvr_table30_v1: "PVR 表 30",
bphs_exception_profile: "《帕拉沙拉占星经典》例外表",
};
@@ -117,7 +117,7 @@ function character(facts: Facts, claims: Facts) {
ascendantText && grade(ascendantText, !zodiac || !mansion),
lord.text && grade(lord.text, lord.incomplete),
Object.keys(record(record(facts.planets).Moon)).length > 0 && grade(moon.text, moon.incomplete),
profile && roles && grade(`按${profile},依上升划分的功能吉凶星中,${roles}。`, !benefics || !malefics),
profile && roles && grade(`按 ${profile},依上升划分的功能吉凶星中,${roles}。`, !benefics || !malefics),
];
}
@@ -45,7 +45,7 @@ test("all eight computed sections use their requested engine facts and grade cei
const character = fallback("character", facts);
assert.match(textOf(character), /上升在处女座。命宫对应的星宿是翼宿/);
assert.match(textOf(character), /上升星座的主星是水星,落在第 \d+ 宫,尊贵状态为[\s\S]+月亮/);
assert.match(textOf(character), /拉奥表 30.*功能吉凶星.*吉星.*凶星/);
assert.match(textOf(character), /PVR 表 30.*功能吉凶星.*吉星.*凶星/);
const career = textOf(fallback("career", facts));
assert.match(career, /第 10 宫(事业)在双子座。宫主是水星,落在第 \d+ 宫,尊贵状态为/);
assert.match(career, /事业分盘(D10)的上升在[\s\S]+事业映射点(A10)在狮子座。事业指标星(AmK)是土星/);