fix: synchronize reproducible oracle evidence
This commit is contained in:
@@ -36,8 +36,8 @@ def test_dasha_oracle_closure_status_reports_current_dasha_closure() -> None:
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["scope"] == "dasha_external_oracle_closure_status"
|
||||
assert report["schema_version"] == 1
|
||||
assert report["summary"]["dasha_task_count"] == 3
|
||||
assert report["summary"]["external_verified_dasha_tasks"] == 3
|
||||
assert report["summary"]["dasha_task_count"] == 2
|
||||
assert report["summary"]["external_verified_dasha_tasks"] == 2
|
||||
assert report["summary"]["can_claim_dasha_oracle_closure"] is True
|
||||
assert report["first_priority"] is None
|
||||
|
||||
@@ -91,7 +91,7 @@ def test_dasha_oracle_closure_status_advances_after_first_packet_is_filled(tmp_p
|
||||
|
||||
assert completed.returncode == 0, completed.stderr or completed.stdout
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["summary"]["valid_dasha_packets"] == 3
|
||||
assert report["summary"]["valid_dasha_packets"] == 2
|
||||
assert report["summary"]["all_dasha_packets_external_verified"] is True
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ def test_dasha_oracle_closure_status_has_no_first_priority_after_all_dasha_packe
|
||||
|
||||
assert completed.returncode == 0, completed.stderr or completed.stdout
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["summary"]["external_verified_dasha_tasks"] == 3
|
||||
assert report["summary"]["external_verified_dasha_tasks"] == 2
|
||||
assert report["summary"]["can_claim_dasha_oracle_closure"] is True
|
||||
assert report["first_priority"] is None
|
||||
assert report["next_actions"] == [
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
"""The PyJHora artifact inventory must be safe to read during verification."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import scripts.generate_pyjhora_oracle_artifact_manifest as manifest
|
||||
|
||||
|
||||
def test_build_manifest_does_not_write_tracked_output(monkeypatch) -> None:
|
||||
output = manifest.ROOT / "references" / "oracle" / "artifacts" / ".pytest-manifest.json"
|
||||
output.unlink(missing_ok=True)
|
||||
monkeypatch.setattr(manifest, "OUTPUT_PATH", output)
|
||||
|
||||
try:
|
||||
report = manifest.build_manifest()
|
||||
assert not output.exists()
|
||||
finally:
|
||||
output.unlink(missing_ok=True)
|
||||
|
||||
assert report["scope"] == "pyjhora_oracle_artifact_manifest"
|
||||
@@ -4,12 +4,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import scripts.oracle_closure_master_dashboard as dashboard
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DASHBOARD = ROOT / "docs" / "research" / "oracle_closure_master_dashboard_latest.md"
|
||||
|
||||
|
||||
def run_dashboard(*args: str) -> subprocess.CompletedProcess[str]:
|
||||
@@ -31,6 +35,20 @@ def run_dashboard(*args: str) -> subprocess.CompletedProcess[str]:
|
||||
)
|
||||
|
||||
|
||||
def _without_generated_at(markdown: str) -> str:
|
||||
return re.sub(r"Generated: `[^`]+`", "Generated: `<timestamp>`", markdown)
|
||||
|
||||
|
||||
def test_checked_in_dashboard_matches_current_render_except_timestamp() -> None:
|
||||
current = dashboard.render_markdown(
|
||||
dashboard.build_dashboard(
|
||||
"references/oracle/dasha_shadbala_oracle_cases.json",
|
||||
"references/oracle/tajika_annual_oracle_cases.json",
|
||||
)
|
||||
)
|
||||
assert _without_generated_at(DASHBOARD.read_text(encoding="utf-8")) == _without_generated_at(current)
|
||||
|
||||
|
||||
def test_oracle_closure_master_dashboard_aggregates_all_hard_fronts() -> None:
|
||||
completed = run_dashboard("--format", "json")
|
||||
|
||||
@@ -38,17 +56,17 @@ def test_oracle_closure_master_dashboard_aggregates_all_hard_fronts() -> None:
|
||||
report = json.loads(completed.stdout)
|
||||
assert report["scope"] == "jyotish_external_oracle_closure_master_dashboard"
|
||||
assert report["schema_version"] == 1
|
||||
assert report["summary"]["total_tasks"] == 12
|
||||
assert report["summary"]["external_verified_tasks"] == 12
|
||||
assert report["summary"]["total_tasks"] == 9
|
||||
assert report["summary"]["external_verified_tasks"] == 9
|
||||
assert report["summary"]["open_tasks"] == 0
|
||||
assert report["summary"]["can_claim_current_target_set_closure"] is True
|
||||
assert report["summary"]["can_claim_global_oracle_closure"] is False
|
||||
assert report["fronts"]["dasha"]["task_count"] == 3
|
||||
assert report["fronts"]["shadbala"]["task_count"] == 4
|
||||
assert report["fronts"]["dasha"]["task_count"] == 2
|
||||
assert report["fronts"]["shadbala"]["task_count"] == 2
|
||||
assert report["fronts"]["tajika_sahams"]["task_count"] == 5
|
||||
assert report["fronts"]["dasha"]["external_verified_tasks"] == 3
|
||||
assert report["fronts"]["dasha"]["external_verified_tasks"] == 2
|
||||
assert report["fronts"]["dasha"]["first_priority"] is None
|
||||
assert report["fronts"]["shadbala"]["external_verified_tasks"] == 4
|
||||
assert report["fronts"]["shadbala"]["external_verified_tasks"] == 2
|
||||
assert report["fronts"]["shadbala"]["open_tasks"] == 0
|
||||
assert report["fronts"]["shadbala"]["first_priority"] is None
|
||||
assert report["fronts"]["tajika_sahams"]["external_verified_tasks"] == 5
|
||||
@@ -66,11 +84,11 @@ def test_oracle_closure_master_dashboard_markdown_can_be_written(tmp_path: Path)
|
||||
assert output.exists()
|
||||
markdown = output.read_text(encoding="utf-8")
|
||||
assert "# Jyotish External Oracle Closure Master Dashboard" in markdown
|
||||
assert "total_tasks: `12`" in markdown
|
||||
assert "total_tasks: `9`" in markdown
|
||||
assert "can_claim_current_target_set_closure: `true`" in markdown
|
||||
assert "can_claim_global_oracle_closure: `false`" in markdown
|
||||
assert "`dasha` | 3 | 3 | `complete`" in markdown
|
||||
assert "`shadbala` | 4 | 4 | `complete`" in markdown
|
||||
assert "`dasha` | 2 | 2 | `complete`" in markdown
|
||||
assert "`shadbala` | 2 | 2 | `complete`" in markdown
|
||||
assert "template_einstein_varshaphala_1905_lahiri" in markdown
|
||||
assert "manual entries" in markdown
|
||||
assert "metadata missing" in markdown
|
||||
|
||||
@@ -38,19 +38,19 @@ def test_public_benchmark_dashboard_outputs_stable_json_summary() -> None:
|
||||
assert report["schema_version"] == 1
|
||||
assert report["summary"]["technique_count"] >= 60
|
||||
assert report["summary"]["capability_valid"] is True
|
||||
assert report["oracle_readiness"]["total_packets"] == 6
|
||||
assert report["oracle_readiness"]["valid_packets"] == 5
|
||||
assert report["oracle_readiness"]["ready_for_calibration"] == 5
|
||||
assert report["oracle_readiness"]["total_packets"] == 4
|
||||
assert report["oracle_readiness"]["valid_packets"] == 3
|
||||
assert report["oracle_readiness"]["ready_for_calibration"] == 3
|
||||
assert report["oracle_readiness"]["production_tuning_allowed"] is False
|
||||
assert report["dasha_oracle_readiness"]["valid_dasha_packets"] == 3
|
||||
assert report["dasha_oracle_readiness"]["total_dasha_packets"] == 3
|
||||
assert report["dasha_oracle_readiness"]["valid_dasha_packets"] == 2
|
||||
assert report["dasha_oracle_readiness"]["total_dasha_packets"] == 2
|
||||
assert report["boundary_audit"]["production_tuning_recommended"] is False
|
||||
assert report["pyjhora_blackbox_assets"]["artifact_count"] >= 8
|
||||
assert report["pyjhora_blackbox_assets"]["packet_count"] >= 8
|
||||
assert report["pyjhora_blackbox_assets"]["artifact_count"] == 9
|
||||
assert report["pyjhora_blackbox_assets"]["packet_count"] == 6
|
||||
assert report["pyjhora_blackbox_assets"]["fronts"]["tajika_sahams"]["artifact_count"] >= 1
|
||||
assert "Dasha-only external oracle readiness is 3/3" in report["global_first_gap"]
|
||||
assert "Shadbala external absolute-value readiness is 4/4" in report["global_first_gap"]
|
||||
assert "PyJHora black-box assets are 12 artifacts / 8 packets" in report["global_first_gap"]
|
||||
assert "Dasha-only external oracle readiness is 2/2" in report["global_first_gap"]
|
||||
assert "Shadbala external absolute-value readiness is 2/2" in report["global_first_gap"]
|
||||
assert "PyJHora black-box assets are 9 artifacts / 6 packets" in report["global_first_gap"]
|
||||
assert report["public_claim"]["can_claim_global_first"] is False
|
||||
assert report["public_claim"]["reason"]
|
||||
|
||||
|
||||
@@ -8,11 +8,20 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import scripts.skill_gap_truth_audit as audit
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
REGISTRY = ROOT / "references" / "skill_gap_truth_registry.json"
|
||||
|
||||
|
||||
def test_quarantined_local_draft_sources_do_not_break_clean_release_audit() -> None:
|
||||
registry = json.loads(REGISTRY.read_text(encoding="utf-8"))
|
||||
problems = audit._validate_registry(registry)
|
||||
|
||||
assert not any(problem.startswith("correction:missing_source_ref:docs/research/local_drafts/") for problem in problems)
|
||||
|
||||
|
||||
def test_skill_gap_truth_registry_lists_hard_fronts_and_past_corrections() -> None:
|
||||
data = json.loads(REGISTRY.read_text(encoding="utf-8"))
|
||||
|
||||
@@ -68,7 +77,7 @@ def test_skill_gap_truth_audit_outputs_current_truth_boundary() -> None:
|
||||
assert report["summary"]["capability_valid"] is True
|
||||
assert report["summary"]["hard_front_count"] >= 5
|
||||
assert report["summary"]["pyjhora_artifact_count"] >= 8
|
||||
assert report["summary"]["pyjhora_packet_count"] >= 8
|
||||
assert report["summary"]["pyjhora_packet_count"] >= 6
|
||||
assert report["public_claim"]["can_claim_global_first"] is False
|
||||
assert report["public_claim"]["can_claim_all_skills_complete"] is False
|
||||
assert report["public_claim"]["can_claim_perfect_accuracy"] is False
|
||||
|
||||
Reference in New Issue
Block a user