feat(narayana-rath): follow book p.43 for dual lords and node years (BUG-1227~1229)
Independent Staging Quality Gate / validate (push) Failing after 16m17s
Independent Staging Quality Gate / publish (push) Skipped

Round-7 option A is text-first, so Scorpio and Aquarius lords, the Ketu-only degree reversal, and node exaltation years now live in the Rath display layer. Scoring files stay unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-10-04 18:37:34 +08:00
co-authored by Cursor
parent 64c652eea2
commit baf4ae8b34
15 changed files with 604 additions and 84 deletions
+18 -3
View File
@@ -151,8 +151,8 @@ _PHRASES: dict[str, str] = {
"旧算法(从上升起、一律顺行),待替换为 Sanjay Rath 版": "Legacy algorithm (starts from the Lagna, always zodiacal); to be replaced by Sanjay Rath's version",
"- 算法:": "- Algorithm: ",
# BUG-1218: narayana_legacy_label rath_report_lines_zh
"Sanjay Rath 版(并列参考,未进打分与时间轴结论):": "Sanjay Rath version (shown alongside for reference; not used in scoring or timing conclusions): ",
"Sanjay Rath 版(并列参考,未进打分与时间轴结论)": "Sanjay Rath version (shown alongside for reference; not used in scoring or timing conclusions)",
"Sanjay Rath 版(并列参考,未进打分与时间轴结论;按原书 p.43 正文(第七轮裁定)):": "Sanjay Rath version (shown alongside for reference; not used in scoring or timing conclusions; book p.43 text, round-7 ruling): ",
"Sanjay Rath 版(并列参考,未进打分与时间轴结论;按原书 p.43 正文(第七轮裁定))": "Sanjay Rath version (shown alongside for reference; not used in scoring or timing conclusions; book p.43 text, round-7 ruling)",
",宫主 ": ", lord ",
"起运宫未定,": "start sign undecided, ",
"- 并列:": "- Alongside: ",
@@ -171,7 +171,8 @@ _PHRASES: dict[str, str] = {
"宫主星座内度数": "lord's degree in sign",
"宫主落奇偶相反星座": "lord in a sign of opposite parity",
"大运年数": "dasha years",
"| Rath MD | 星座 | 宫主 | 起始年龄 | 结束年龄 | 年数 |": "| Rath MD | Sign | Lord | Start age | End age | Years |",
"| Rath MD | 星座 | 宫主 | 起始年龄 | 结束年龄 | 基本年数 | 修正 | 最终 |": "| Rath MD | Sign | Lord | Start age | End age | Base years | Adjustment | Final |",
"未决": "undecided",
"| Rath AD | 星座 | 起始年龄 | 结束年龄 |": "| Rath AD | Sign | Start age | End age |",
" 的子运:比较 ": " sub-periods: compare ",
# BUG-1225: narayana_legacy_label._ad_direction_lines_zh (AD direction + book divergence)
@@ -286,6 +287,20 @@ REGEX_EN: list[tuple[re.Pattern[str], str]] = [
f"the strongest by Panchavargiya, {m.group(2)}, is the year lord")),
(re.compile(r"五类候选都不照年盘上升,取全体 Panchavargiya 最强的([A-Za-z]+)"),
r"None of the five candidates aspects the annual Lagna; the strongest of all by Panchavargiya, \1, is the year lord"),
# BUG-1227 Rath dual-lord basis on the reference report (round-7 option A).
(re.compile(r"- 双主星 ([A-Za-z]+):"), r"- Co-lords \1: "),
(re.compile(r"两主分落别的星座,按七级比较所落星座,第 (\d+) 级取 ([A-Za-z]+)"),
r"The two lords occupy different signs, compared on the seven strength levels; level \1 takes \2"),
(re.compile(r"两主都在本宫,年数 12;身份按同宫经度,只倒算计都,取 ([A-Za-z]+)"),
r"Both lords are in the sign, so the period is 12 years; identity is by same-sign degree, and only Ketu is reversed; takes \1"),
(re.compile(r"两主同在另一宫,年数数到该宫;身份按同宫经度,只倒算计都,取 ([A-Za-z]+)"),
r"Both lords share another sign, so the years are counted to it; identity is by same-sign degree, and only Ketu is reversed; takes \1"),
(re.compile(r"一主在天蝎或水瓶本宫,取在外面的那颗;火星在白羊、土星在摩羯不算本宫,取 ([A-Za-z]+)"),
r"One lord is in Scorpio or Aquarius itself, so the lord outside it is taken; Mars in Aries and Saturn in Capricorn do not count as that own sign; takes \1"),
(re.compile(r"两主所落星座七级全平,取年数较多的一颗,取 ([A-Za-z]+)"),
r"The occupied signs tie on all seven levels, so the lord giving more years is taken; takes \1"),
(re.compile(r"双主星判定遇到循环,返回未决"),
"Dual-lord resolution hit a cycle and stays undecided"),
# BUG-1218 Rath Narayana report lines
(re.compile(r"(第 (\d) 级:([^)]+))"), r" (level \1: \2)"),
(re.compile(r"(第 (\d) 级)"), r" (level \1)"),