From e5f7e0ddc01a1af969fb7645c6c39a95960d68c9 Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Tue, 14 Jul 2026 18:13:39 +0800 Subject: [PATCH] expose gulika as partial prashna evidence --- docs/research/pre_work_error_ledger.md | 2 +- references/technique_registry.json | 3 ++- scripts/prashna_context.py | 16 ++++++++++++++-- tests/test_prashna_entry_contract.py | 3 ++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/research/pre_work_error_ledger.md b/docs/research/pre_work_error_ledger.md index a7e7297a..a304f239 100644 --- a/docs/research/pre_work_error_ledger.md +++ b/docs/research/pre_work_error_ledger.md @@ -89,7 +89,7 @@ For large architecture or release work, also read: | ERR-056 | A WorkBuddy checkout of the same remote diverged substantially from the active source branch and can be mistaken for a mergeable mirror. | active | Read `whole_machine_fragment_sweep_2026_07_14.md`; do not copy or merge it without explicit commit-level review on a separate branch. | | ERR-057 | The release quality profile checked untracked files but did not execute the privacy AST scan or the real Chromium report-isolation probe. | mitigated 2026-07-14 | `release_hygiene_check()` now requires `public_release_privacy_scan.py --json` and `report_renderer_isolation_poc.py --strict`; parity manifest validation also runs as a contract check. | | ERR-058 | Formula-based Sahams used the day/night operand rules but omitted the documented zodiacal-order `+30°` exception. | mitigated 2026-07-14 | `_calc_formula_saham()` applies the `references/saham_rules.json` forward-arc condition and one-sign correction; keep external numeric oracle parity as a separate `partial` requirement. | -| ERR-059 | Gulika was either an approximate fallback or falsely implied as a chart module output. | mitigated 2026-07-14 | `scripts/gulika.py` computes Prasna Marga Ghatika segment Ascendant with Swiss sunrise/sunset and Lahiri sidereal houses; registry is `partial` and exposes only the actual calculator until external numeric parity and chart integration are complete. | +| ERR-059 | Gulika was either an approximate fallback or falsely implied as a chart module output. | mitigated 2026-07-14 | `scripts/gulika.py` computes Prasna Marga Ghatika segment Ascendant with Swiss sunrise/sunset and Lahiri sidereal houses. It is exposed only as `prashna_context.supporting_indicators.gulika`, remains `partial`, and cannot unlock Sphuta or verdict layers until external numeric parity exists. | ## Fragment Sweep Command Set diff --git a/references/technique_registry.json b/references/technique_registry.json index 20138857..68058797 100644 --- a/references/technique_registry.json +++ b/references/technique_registry.json @@ -430,7 +430,8 @@ "full-reading" ], "output_paths": [ - "scripts/gulika.py:calculate_gulika" + "scripts/gulika.py:calculate_gulika", + "prashna_context.supporting_indicators.gulika" ], "audit_label": "Upagraha/Gulika/Maandi", "missing_impact": "Swiss day/night and Prasna Marga Ghatika Gulika are available as supporting evidence; Maandi, other Upagrahas and external numeric parity remain unavailable.", diff --git a/scripts/prashna_context.py b/scripts/prashna_context.py index 9ab327b1..b4b4492d 100644 --- a/scripts/prashna_context.py +++ b/scripts/prashna_context.py @@ -9,6 +9,10 @@ try: from scripts.domain_calculation_service import CalculationError, compute_chart except ModuleNotFoundError: # pragma: no cover - CLI execution path from domain_calculation_service import CalculationError, compute_chart +try: + from scripts.gulika import calculate_gulika +except ModuleNotFoundError: # pragma: no cover - CLI execution path + from gulika import calculate_gulika class PrashnaContextError(ValueError): @@ -58,6 +62,13 @@ def build_prashna_context(payload: dict[str, Any]) -> dict[str, Any]: }) except (CalculationError, ValueError, TypeError) as exc: raise PrashnaContextError(f"Swiss Prashna chart blocked: {exc}") from exc + try: + gulika = calculate_gulika(moment, lat=float(payload["lat"]), lon=float(payload["lon"]), tz=tz) + except Exception as exc: + gulika = { + "status": "blocked", + "reason": f"gulika_supporting_indicator_failed:{type(exc).__name__}", + } return { "scope": "prashna_context", "status": "computed", @@ -71,6 +82,7 @@ def build_prashna_context(payload: dict[str, Any]) -> dict[str, Any]: "planets": chart["planets"], "calculation_contract": chart["calculation_contract"], "result_hash": chart["result_hash"], - "blocked_layers": ["Gulika", "Trisphuta", "Kunda", "Prashna verdict"], - "boundary": "No client-supplied planets or ascendant are accepted. Approximate Prashna layers are blocked pending validated implementations.", + "supporting_indicators": {"gulika": gulika}, + "blocked_layers": ["Trisphuta", "Kunda", "Prashna verdict"], + "boundary": "No client-supplied planets or ascendant are accepted. Gulika is supporting-only pending external numeric parity; Sphuta and verdict layers remain blocked.", } diff --git a/tests/test_prashna_entry_contract.py b/tests/test_prashna_entry_contract.py index a498053d..21acbf22 100644 --- a/tests/test_prashna_entry_contract.py +++ b/tests/test_prashna_entry_contract.py @@ -21,7 +21,8 @@ def test_cli_prashna_uses_question_moment_swiss_context_only(): assert payload["status"] == "computed" assert payload["chart_source"] == "swiss_ephemeris_backend" - assert "Gulika" in payload["blocked_layers"] + assert payload["supporting_indicators"]["gulika"]["status"] == "partial" + assert "Trisphuta" in payload["blocked_layers"] def test_cli_prashna_blocks_legacy_approximation_modes():