fix(report): describe a partly met yoga from what is met in personal, annual and synastry writing; dismissals go back for a rewrite (BUG-2421)
Independent Staging Quality Gate / validate-python (push) Successful in 8m19s
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m44s
Independent Staging Quality Gate / publish (push) Successful in 4m13s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp3RzgZVEpT1PXxkwHj
This commit is contained in:
2026-11-26 17:46:47 +08:00
co-authored by Claude Opus 5.5
parent d070cd7809
commit 644c4f70d0
18 changed files with 283 additions and 15 deletions
@@ -680,10 +680,14 @@ def _candidate_months(candidates: Any) -> set[tuple[int, int]]:
ZH_INTERNAL_WORDING = (
"事件门槛", "事件类", "激活证据", "观察项", "门控", "正式核对", "研究扫描", "候选窗口",
"参数敏感", "证据链", "年度层", "书证", "时刻边界", "档案时刻",
# BUG-2421, 占星师原则,负责人 2026-11-26 转发: a partly met combination is described, never dismissed.
"条件待核", "无法分析", "强弱另评", "没有据此加强",
)
EN_INTERNAL_WORDING = (
"event gate", "event class", "activation evidence", "formal check", "research scan",
"candidate window", "parameter-sensitive", "evidence chain", "annual layer",
# BUG-2421: the English of the dismissals above.
"conditions pending", "cannot be analysed", "cannot be analyzed", "strength assessed separately", "not used to strengthen",
)
ZH_PARAGRAPH_LIMIT = 170
EN_PARAGRAPH_LIMIT = 95
+25
View File
@@ -914,6 +914,26 @@ def _active_lords(packet: dict) -> list[str]:
return [name for name in dict.fromkeys(lords) if isinstance(name, str)]
def _yoga_placements_zh(engine_row: dict[str, Any] | None) -> str:
"""「木星在双子座第 10 宫;金星在射手座第 4 宫」: the participants the engine recorded for this rule (BUG-2421)."""
from .appendix_language import PLANET_ZH
evidence = engine_row.get("condition_evidence") if isinstance(engine_row, dict) else None
participants = evidence.get("participants") if isinstance(evidence, dict) else None
if not isinstance(participants, dict):
return ""
parts = []
for planet, place in participants.items():
if planet not in PLANET_ZH or not isinstance(place, dict):
continue
sign = _SIGN_ZH_NARAYANA.get(place.get("sign"))
house = place.get("house")
if not sign:
continue
parts.append(f"{PLANET_ZH[planet]}在{sign}" + (f"第 {house} 宫" if isinstance(house, int) else ""))
return ";".join(parts)
def _yogas(packet: dict) -> list[dict[str, Any]]:
from .neecha_witness import is_neecha_bhanga_row
from .yoga_status_words import report_yoga_table, yoga_status
@@ -954,6 +974,11 @@ def _yogas(packet: dict) -> list[dict[str, Any]]:
entry.update(_neecha_roles_fields(engine_row, packet, active))
if isinstance(row.get("same_fact"), list) and row["same_fact"]:
entry["same_fact"] = _same_fact_block(evidence, row, engine_rows)
# BUG-2421 (占星师原则,负责人转发 2026-11-26): a yoga that is not fully formed is written from what IS
# satisfied and the related placements, so the writer gets where each participating planet sits.
placements = _yoga_placements_zh(engine_row)
if placements:
entry["placements_zh"] = placements
# BUG-2292: what supports and limits this yoga's planets (the yoga page's 「支持的因素」 line).
if engine_row is not None:
from scripts.pl9_interpretation_packs import _yoga_strength_text
+11 -3
View File
@@ -41,10 +41,18 @@ YOGA_FIELDS = (
"rule_id", "method_version", "rule_state", "route_packet", "packet_domain", "parent_rule_id", "reference_rule_ids",
)
UNEVALUATED_FIELDS = ("name", "rule_id", "evaluation_status", "error_class")
YOGA_NOTICE_ZH = "以下是按规则筛出的候选。强度、取消条件、宫位背景与分盘重复都要评估之后,才能把某个候选当作起作用。"
# BUG-2421 (占星师原则,负责人 2026-11-26 转发): 原值「以下是按规则筛出的候选。强度、取消条件、宫位背景与分盘重复都要评估
# 之后,才能把某个候选当作起作用。」/ 新值见下 / 原因:没有完全形成的格局按已经对上的部分说明倾向,不整表打发成「不起作用」;
# 底线不变:部分对上不等于形成。英文同步(原值 "These are rule-screened candidates. Strength, cancellation, house
# context and divisional repetition must be assessed before treating a candidate as operative.")。
YOGA_NOTICE_ZH = (
"下表是这张盘里按规则对上的组合。状态为「条件都满足,成立」的已经形成;其余各行只对上了一部分条件,或还没有完整确认,"
"「组合条件」一列写的是已经对上的部分,可以据此看相关的倾向,但不等于格局已经形成。"
)
YOGA_NOTICE_EN = (
"These are rule-screened candidates. Strength, cancellation, house context and divisional repetition "
"must be assessed before treating a candidate as operative."
"These are the combinations whose rule conditions match this chart. Rows marked \"All conditions met; formed\" "
"are formed; the other rows meet only part of their conditions or are not fully confirmed. The Combination column "
"shows the part that is met, which points to a related tendency, but it does not make the yoga formed."
)