From 1dd620388375702622939dec5379079905289ad4 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Thu, 22 Oct 2026 22:01:33 +0800 Subject: [PATCH] fix(report): parity yoga category for ayur reads Constitution; only the boundary scan may be prose (#91 fix2) "Longevity" in the canonical yoga table broke the BUG-1210 lifespan wording test. Sections other than the dasha boundary scan must carry a table, so a fixed sentence cannot pass as packet data. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01HwMNZEzdzmrbPhuRNmZe3C --- scripts/report_render/parity_chapters.py | 2 +- tests/test_full_data_parity_chapters.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/report_render/parity_chapters.py b/scripts/report_render/parity_chapters.py index 8491f36e..b6dd667c 100644 --- a/scripts/report_render/parity_chapters.py +++ b/scripts/report_render/parity_chapters.py @@ -1317,7 +1317,7 @@ YOGA_CATEGORIES: dict[str, tuple[str, str]] = { "putra": ("Children", "子女"), "conjunction": ("Conjunction", "合相"), "health": ("Health", "健康"), - "ayur": ("Longevity", "寿元"), + "ayur": ("Constitution", "体质"), "karma": ("Career", "事业"), "moksha": ("Liberation", "解脱"), "aryama": ("Aryama", "Aryama"), diff --git a/tests/test_full_data_parity_chapters.py b/tests/test_full_data_parity_chapters.py index ef1f0bdb..fd544e62 100644 --- a/tests/test_full_data_parity_chapters.py +++ b/tests/test_full_data_parity_chapters.py @@ -167,6 +167,10 @@ _PACKET_GAPS = { } +# Only this section may be a single sentence: "no boundary within N days". +_PROSE_ONLY = {"Dasha Boundary Scan"} + + def _table_blocks(body: str) -> list[list[list[str]]]: blocks = [] current: list[str] = [] @@ -244,6 +248,9 @@ def test_every_section_has_a_real_cell_except_the_four_public_gaps(fictional_rep assert first == _GAP_LINE[language], f"{index} {heading}" continue assert _section_has_real_cell(body, _UNDETERMINED[language]), f"{index} {heading}" + if title_en not in _PROSE_ONLY: + # A fixed sentence is not packet data; every other section shows a table. + assert _table_blocks(body), f"{index} {heading}" def test_every_section_has_a_real_cell_outside_the_label_column_unit() -> None: