fix(report): use the upstream reader edition for new longform bodies
New reports request reader_main from upstream origin/main 23b9609e. KP and transit no longer copy an empty vars() dict, solar returns keep birth_asc_sign_idx, and ordinary projection deletes internal lines whole.
This commit is contained in:
@@ -17,22 +17,36 @@ from scripts.timing_precision_contract import build_timing_precision_contract
|
||||
from tests.test_report_longform_parity import BEIJING, _producer_packet
|
||||
|
||||
|
||||
def test_kp_error_pack_emits_blocked_heading_instead_of_vanishing() -> None:
|
||||
def test_kp_error_pack_omits_the_section_instead_of_printing_the_error() -> None:
|
||||
"""原值:空 KP 仍输出原始表标题和 kp_lord_sub_unavailable。
|
||||
新值:整节不输出,synthetic_kp_failure / producer failed 也不出现。
|
||||
原因:D3。BUG-561 用 blocked 标题代替消失,但标题里打印了原始 error。
|
||||
"""
|
||||
markdown = render_pl9_markdown(_producer_packet({
|
||||
"advanced_systems": {"kp": {"error": "synthetic_kp_failure", "status": "blocked"}},
|
||||
}))
|
||||
assert "### KP Lord / Sub 原始表(本地计算)" in markdown
|
||||
assert "kp_lord_sub_unavailable" in markdown
|
||||
assert "#### KP 事业结构小表" in markdown
|
||||
assert "#### KP 事业宫位核对(2 / 6 / 10 / 11 宫)" in markdown
|
||||
assert "#### KP 财务结构小表" in markdown
|
||||
assert "#### KP 关系结构小表" in markdown
|
||||
assert "### KP Lord / Sub 原始表(本地计算)" not in markdown
|
||||
assert "kp_lord_sub_unavailable" not in markdown
|
||||
assert "synthetic_kp_failure" not in markdown
|
||||
assert "producer failed" not in markdown
|
||||
assert "#### KP 事业结构小表" not in markdown
|
||||
assert "#### KP 事业宫位核对(2 / 6 / 10 / 11 宫)" not in markdown
|
||||
assert "#### KP 财务结构小表" not in markdown
|
||||
assert "#### KP 关系结构小表" not in markdown
|
||||
|
||||
|
||||
def test_planned_headings_are_present_or_blocked_on_empty_packet() -> None:
|
||||
def test_empty_packet_omits_unavailable_planned_sections() -> None:
|
||||
"""原值:PLANNED_LONGFORM_SECTION_HEADINGS 在空包里必须逐条出现。
|
||||
新值:没有数据的占位节不出现;仍有正文的审计节可以留下。
|
||||
原因:D3,数据不可用的节整节不输出,且不得带原始 error。
|
||||
"""
|
||||
markdown = render_pl9_markdown(_producer_packet({}))
|
||||
missing = [heading for heading in PLANNED_LONGFORM_SECTION_HEADINGS if heading not in markdown]
|
||||
assert missing == [], f"planned headings vanished: {missing}"
|
||||
omitted = [heading for heading in PLANNED_LONGFORM_SECTION_HEADINGS if heading not in markdown]
|
||||
assert "### KP Lord / Sub 原始表(本地计算)" in omitted
|
||||
assert "### Profile-aware Benchmark Boundary" in omitted
|
||||
assert "producer failed" not in markdown
|
||||
assert "结论等级规则" not in markdown
|
||||
assert "This reference export" not in markdown
|
||||
|
||||
|
||||
def test_module_execution_audit_survives_raw_strip() -> None:
|
||||
|
||||
Reference in New Issue
Block a user