fix(tajika): year lord blocked instead of Muntha-lord stand-in (BUG-1223)

Panchadhikari blocked -> status blocked + reason, year_lord None, sentence
「年主暂无法确定(原因)」 on card and report; Tri-Pataka blocked with it;
Mudda unchanged. Aligned with upstream 03bea6ed. Nine public charts: both
producers byte-identical before/after.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
Jesse_Chen
2026-10-04 07:25:48 +08:00
co-authored by Claude Opus 5.5
parent 77645ce25f
commit 7dda1b45c3
8 changed files with 249 additions and 37 deletions
+7 -2
View File
@@ -924,7 +924,12 @@ def build_annual_tajika(birth_payload: dict, chart: dict, *, reference: datetime
producers = {key: field.get("status") for key, field in fields.items()}
periods = fields["mudda_dasha"].get("periods")
required = ("solar_return", "annual_chart", "muntha", "year_lord", "mudda_dasha")
unreliable = [key for key in required if producers.get(key) != "partial_verified"]
# BUG-1223: a year lord the producers blocked (annual chart incomplete,
# no stand-in planet) does not block the card; it shows
# "年主暂无法确定(原因)". Mudda does not depend on the year lord.
year_lord_blocked = _record(fields["year_lord"].get("blocked_detail")) if producers.get("year_lord") == "blocked" else {}
unreliable = [key for key in required
if producers.get(key) != "partial_verified" and not (key == "year_lord" and year_lord_blocked)]
if start is None or end is None or end <= start:
unreliable.append("solar_return_dates")
if not isinstance(periods, list) or not periods:
@@ -939,7 +944,7 @@ def build_annual_tajika(birth_payload: dict, chart: dict, *, reference: datetime
}
annual_chart = _record(fields["annual_chart"].get("data"))
muntha = _record(fields["muntha"].get("data"))
year_lord_data = _record(fields["year_lord"].get("data"))
year_lord_data = year_lord_blocked or _record(fields["year_lord"].get("data"))
year_lord = year_lord_data.get("year_lord")
annual_lagna_idx = _sign_index(annual_chart.get("asc_sign"))
focus = {"Sun", "Moon", year_lord}