Port from yinduzhanxing 5fb8379c (MIT): Naisargika, Kaala, Karaka, Tara, Lagnamsaka, Yogardha, Mandooka, Paryaaya and Padanadhamsa dashas; Sarvatobhadra, Kota and Kalanala chakras; Nakshatra Latta; Pachakadi; Raman Amsayu and Pindayu. Producers and their upstream tests are copied; scripts/upstream_technique_layers.py feeds them our natal and transit positions and attaches chart.consultation_native_layers.upstream_techniques. - dasha_registry: kaala and padanadhamsa keys (35 -> 37); the nine ported dashas are served by compute_dasha or fail closed with upstream's reason. - technique_registry.json: 16 partial entries; README badges follow. - Evidence lookup section `upstream_techniques` in the consultation tool. - Boundaries: Kalanala carries no PyJHora (AGPL) grid coordinates; Padanadhamsa/Lagnamsaka run on our Narayana engine (no Rath Table 12, PVR co-lord variants or second cycle). PyJHora observers and the Amsayu worked-example scaffold live in scripts/research (root .py budget). - PyJHora black-box cross-checks: Naisargika (lords/years) and Kaala (seed segment and fraction within 5e-4) on a public chart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
import pytest
|
|
from scripts.research.kota_chakra_external import PLANETS, build_kota_external_report
|
|
|
|
|
|
def call(**kwargs):
|
|
return build_kota_external_report(stars={p: 22 for p in PLANETS}, birth_star=22,
|
|
ayanamsa='LAHIRI', **kwargs)
|
|
|
|
|
|
def test_all_planets_placed_once_and_birth_basis_changes_anchor():
|
|
pytest.importorskip('jhora')
|
|
normal = call(birth_star_basis='nakshatra_27')
|
|
ring = call(birth_star_basis='abhijit_ring_28')
|
|
assert normal['status'] == ring['status'] == 'external_observation_only'
|
|
a, b = normal['evidence_appendix'][0], ring['evidence_appendix'][0]
|
|
assert a['effective_base_ring_index'] == 23
|
|
assert b['effective_base_ring_index'] == 22
|
|
assert len(a['rows']) == 28
|
|
assert sum(r['is_abhijit'] for r in a['rows']) == 1
|
|
assert sorted(p for r in a['rows'] for p in r['planets']) == sorted(PLANETS)
|
|
assert next(r for r in a['rows'] if r['planets'])['offset_from_birth'] == 0
|
|
assert next(r for r in b['rows'] if r['planets'])['offset_from_birth'] == 1
|
|
a['rows'].clear()
|
|
assert len(normal['exports']['ai_evidence_bundle']['rows']) == 28
|
|
assert normal['customer_export_admitted'] is False
|
|
|
|
|
|
def test_missing_basis_rejected():
|
|
with pytest.raises(ValueError):
|
|
call(birth_star_basis='guess')
|
|
|
|
|
|
def test_missing_external_dependency_blocks_without_layout(monkeypatch):
|
|
import subprocess
|
|
def fail(*args, **kwargs):
|
|
raise subprocess.TimeoutExpired('external', 1)
|
|
monkeypatch.setattr(subprocess, 'run', fail)
|
|
result = call(birth_star_basis='nakshatra_27')
|
|
assert result['status'] == 'blocked'
|
|
assert 'rows' not in result['evidence_appendix'][0]
|