- BUG-1729 (P0): the execution receipt capped methodologySections at 12 while the loader allows 32; a wealth turn delivers 14 and every receipt failed. The cap now lives in consultation-methodology-limits.ts and both read it; a sweep of all 2509 domain combinations x 3 questions passes the receipt. - BUG-1730 (tooling): the offline model-input manifest moves to tests/helpers (scripts must not import tests, BUG-1140); the fact-checker reads the timing route's nested slow_transits. - BUG-1731: the card carries the engine's calendar_year (both Tajika years and the splitting return); runtime contract rule A-08 (her Q2). - BUG-1732: narayana_method_status names the undetermined / disputed step (seed, years, dual_lord, ad_direction) from the engine, "unknown" when it cannot; B3/B4 recorded as open; chat_use single_system_candidate / no_judgment; her Q1 sentence in the contract; B-02 rewritten. - BUG-1733: the conclusion's first sentence answers the question; the frozen time range follows it (her Q5). - Golden recaptured with TTL=0 (method_status; VedAstro offline reason is environment-dependent). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
50 lines
2.5 KiB
Python
50 lines
2.5 KiB
Python
"""BUG-1723: fact-checker subject identification and Niryaana Shoola field (tooling, not product)."""
|
|
import importlib.util
|
|
from pathlib import Path
|
|
|
|
PATH = Path(__file__).resolve().parents[1] / "frontend/scripts/research/consult-answer-factcheck.py"
|
|
spec = importlib.util.spec_from_file_location("consult_answer_factcheck", PATH)
|
|
fc = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(fc)
|
|
|
|
|
|
def test_house_in_lord_parenthetical_belongs_to_the_lord():
|
|
claim = {"subject": "A2", "attribute": "house", "value": 2, "chart": "point", "quote": "A2 水瓶(主土星,落 2 宫)"}
|
|
c = fc.canonical(claim)
|
|
assert (c["subject"], c["chart"], c["attribute"]) == ("Saturn", "D1", "house")
|
|
same = fc.canonical({**claim, "quote": "A2 水瓶(主土星,落本命 2 宫)"})
|
|
assert same["subject"] == "Saturn"
|
|
# The sign and the lord stay claims about the pada.
|
|
assert fc.canonical({**claim, "attribute": "sign", "value": "Aquarius"})["subject"] == "A2"
|
|
# A plain pada placement is not touched.
|
|
assert fc.canonical({**claim, "quote": "A2 水瓶,落 6 宫", "value": 6})["subject"] == "A2"
|
|
|
|
|
|
def test_niryaana_shoola_maps_to_its_own_system():
|
|
c = fc.canonical({"subject": "shoola.MD", "attribute": "sign", "value": "Gemini", "chart": "dasha",
|
|
"quote": "Niryaana Shoola 大运双子(10 宫)"})
|
|
assert c["subject"] == "niryaana_shoola.MD"
|
|
plain = fc.canonical({"subject": "shoola.MD", "attribute": "sign", "value": "Libra", "chart": "dasha",
|
|
"quote": "Shoola 大运天秤"})
|
|
assert plain["subject"] == "shoola.MD"
|
|
import re
|
|
names = {name for name, pat in fc.SYSTEMS if re.search(pat, "Niryaana Shoola 大运双子")}
|
|
assert names == {"niryaana_shoola"}
|
|
|
|
|
|
def _card(slow_transits):
|
|
return {"claim_cards": [
|
|
{"category": "natal_foundation", "evidence": {"ascendant": {"sign": "Aries"}}},
|
|
{"category": "domain", "evidence": {"timing": {"slow_transits": slow_transits}}},
|
|
]}
|
|
|
|
|
|
def test_bug1730_timing_route_slow_transits_shape_does_not_crash():
|
|
nested = {"current": {"Saturn": {"sign": "Pisces", "natal_house": 12, "sav": 28}},
|
|
"node_ingresses": [{"body": "Rahu", "date": "2026-12-01"}], "window": {"start": "2026-11-07"}}
|
|
facts = fc.Facts(_card(nested))
|
|
assert facts.f[("transit", "Saturn", "sign")] == "Pisces"
|
|
assert facts.f[("transit", "Saturn", "house")] == 12
|
|
flat = fc.Facts(_card({"Saturn": {"sign": "Pisces", "natal_house": 12}}))
|
|
assert flat.f[("transit", "Saturn", "house")] == 12
|