feat: add public oracle maturity audits
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_flying_star_audit_outputs_linkage_chains_and_motion_points() -> None:
|
||||
completed = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
"scripts/flying_star_audit.py",
|
||||
"--year",
|
||||
"2000",
|
||||
"--month",
|
||||
"1",
|
||||
"--day",
|
||||
"1",
|
||||
"--hour",
|
||||
"12",
|
||||
"--minute",
|
||||
"0",
|
||||
"--lat",
|
||||
"0",
|
||||
"--lon",
|
||||
"0",
|
||||
"--tz",
|
||||
"0",
|
||||
"--age",
|
||||
"30",
|
||||
"--planets",
|
||||
"Venus,Saturn",
|
||||
"--event-house",
|
||||
"7",
|
||||
],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
timeout=120,
|
||||
check=False,
|
||||
)
|
||||
|
||||
assert completed.returncode == 0, completed.stderr or completed.stdout
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["scope"] == "flying_star_audit"
|
||||
assert "D1" in report["inter_chart_linkage"]["Venus"]
|
||||
assert report["dispositor_chains"]["Venus"]
|
||||
assert report["motion_points"]["bcp"]["status"] == "available_reference"
|
||||
assert "sudarshana" in report["motion_points"]
|
||||
@@ -0,0 +1,19 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from scripts.non_standard_marriage_trigger_audit import audit_cases
|
||||
|
||||
|
||||
def test_non_standard_marriage_trigger_audit_classifies_public_cases() -> None:
|
||||
report = audit_cases()
|
||||
|
||||
assert report["scope"] == "non_standard_marriage_trigger_audit"
|
||||
assert report["case_count"] >= 5
|
||||
assert report["summary"]["non_standard_proxy_cases"] == report["case_count"]
|
||||
|
||||
top_lords = {lord for lord, _count in report["summary"]["top_non_standard_lords"]}
|
||||
assert {"Rahu", "Mercury", "Moon", "Ketu"} <= top_lords
|
||||
|
||||
links = {link for link, _count in report["summary"]["top_marriage_network_links"]}
|
||||
assert {"7L", "D9", "Jaimini"} <= links
|
||||
|
||||
assert all(row["classification"] == "non_standard_proxy" for row in report["rows"])
|
||||
@@ -0,0 +1,29 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_public_oracle_replay_quick_matrix_runs_on_public_case() -> None:
|
||||
completed = subprocess.run(
|
||||
[sys.executable, "scripts/public_oracle_replay.py", "--quick", "--timeout", "60"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
timeout=180,
|
||||
check=False,
|
||||
)
|
||||
|
||||
assert completed.returncode == 0, completed.stderr or completed.stdout
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["case_count"] == 1
|
||||
assert report["summary"]["tested"] >= 10
|
||||
assert report["oracle_summary"]
|
||||
assert any(row["engine"] == "chart_d1" and row["status"] == "tested" for row in report["rows"])
|
||||
assert any(row["provider"] == "pyjhora" for row in report["expected_oracles"])
|
||||
assert any(row["engine"] == "VedAstro official full snapshot" and row["status"] == "blocked" for row in report["blocked_or_untested"])
|
||||
@@ -0,0 +1,38 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_traditional_maturity_gap_audit_keeps_covered_not_complete_boundary() -> None:
|
||||
completed = subprocess.run(
|
||||
[sys.executable, "scripts/traditional_maturity_gap_audit.py"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
timeout=30,
|
||||
check=False,
|
||||
)
|
||||
|
||||
assert completed.returncode == 0, completed.stderr or completed.stdout
|
||||
report = json.loads(completed.stdout)
|
||||
assert "covered means" in report["boundary"]
|
||||
assert [phase["id"] for phase in report["execution_phases"]] == [
|
||||
"phase_1_truth_boundary",
|
||||
"phase_2_oracle_expansion",
|
||||
"phase_3_event_adjudication",
|
||||
"phase_4_expert_modifiers",
|
||||
]
|
||||
assert report["ordered_priorities"][0]["id"] == "p0_dasha_boundary_closure"
|
||||
assert report["ordered_priorities"][-1]["id"] == "p2_article_template_industrialization"
|
||||
assert report["summary"]["P0"] >= 3
|
||||
assert any(item["id"] == "p0_dasha_boundary_closure" for item in report["p0"])
|
||||
assert any(item["id"] == "p0_tajika_sahams_annual_templates" for item in report["p0"])
|
||||
assert any(item["id"] == "p1_kp_event_adjudication" for item in report["p1"])
|
||||
assert any(item["id"] == "p1_career_a10_karakamsha_amk_chain" for item in report["p1"])
|
||||
assert any(item["id"] == "p1_flying_star_chain" for item in report["p1"])
|
||||
Reference in New Issue
Block a user