feat: sync remaining oracle evidence gaps
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.day_level_holdout_human_annotation_packet import build_packet
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
REPORT = ROOT / "references/real_case_calibration/day_level_holdout_v3_pilot_source_queue_report_2026_07_19.json"
|
||||
|
||||
|
||||
def test_human_annotation_packet_keeps_all_windows_unlabeled_and_unfrozen() -> None:
|
||||
packet = build_packet(REPORT)
|
||||
|
||||
assert packet["scope"] == "day_level_holdout_human_annotation_packet"
|
||||
assert packet["status"] == "awaiting_independent_human_adjudication"
|
||||
assert packet["ready_for_blind_eval"] is False
|
||||
assert packet["production_tuning_allowed"] is False
|
||||
assert packet["summary"] == {
|
||||
"annotation_count": 9,
|
||||
"final_label_count": 0,
|
||||
"frozen_count": 0,
|
||||
"positive_candidate_count": 3,
|
||||
"negative_candidate_count": 6,
|
||||
}
|
||||
|
||||
|
||||
def test_human_annotation_packet_has_required_blank_review_fields() -> None:
|
||||
packet = build_packet(REPORT)
|
||||
for row in packet["annotations"]:
|
||||
assert row["candidate_label"] in {"target_event", "no_target_event"}
|
||||
assert row["final_label"] is None
|
||||
assert row["independent_human_reviewed"] is False
|
||||
assert row["frozen_before_scoring"] is False
|
||||
assert row["adjudicator"] == ""
|
||||
assert row["source_quote_or_summary"] == ""
|
||||
assert row["review_decision"] == "pending"
|
||||
assert row["source_urls"]
|
||||
assert row["annotation_id"].startswith("DLH-PILOT-")
|
||||
|
||||
|
||||
def test_human_annotation_packet_artifact_matches_generator() -> None:
|
||||
artifact = ROOT / "references/real_case_calibration/day_level_holdout_v3_human_annotation_packet_2026_07_19.json"
|
||||
data = json.loads(artifact.read_text(encoding="utf-8"))
|
||||
generated = build_packet(REPORT)
|
||||
assert data["summary"] == generated["summary"]
|
||||
assert data["ready_for_blind_eval"] is False
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.vedastro_identity_evidence_audit import build_audit
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_vedastro_identity_evidence_audit_splits_runtime_and_hosted_identity() -> None:
|
||||
audit = build_audit(
|
||||
ROOT / "references/oracle/vedastro_identity_archive_2026_07_19.json",
|
||||
ROOT / "references/oracle/artifacts/vedastro_nuget_1_2_0_runtime_contract.json",
|
||||
)
|
||||
|
||||
assert audit["scope"] == "vedastro_identity_evidence_audit"
|
||||
assert audit["package"] == "VedAstro.Library"
|
||||
assert audit["version"] == "1.2.0"
|
||||
assert audit["runtime_candidate_status"] == "complete"
|
||||
assert audit["hosted_identity_status"] == "blocked"
|
||||
assert audit["truth_upgrade_allowed"] is False
|
||||
assert audit["production_tuning_allowed"] is False
|
||||
|
||||
|
||||
def test_vedastro_identity_evidence_audit_records_required_fields() -> None:
|
||||
audit = build_audit(
|
||||
ROOT / "references/oracle/vedastro_identity_archive_2026_07_19.json",
|
||||
ROOT / "references/oracle/artifacts/vedastro_nuget_1_2_0_runtime_contract.json",
|
||||
)
|
||||
|
||||
evidence = {row["field"]: row for row in audit["evidence"]}
|
||||
for field in [
|
||||
"package_sha256",
|
||||
"library_dll_sha256",
|
||||
"assembly_version",
|
||||
"assembly_informational_version",
|
||||
"public_method_contracts",
|
||||
"runtime_image_digest",
|
||||
]:
|
||||
assert evidence[field]["status"] == "complete"
|
||||
assert evidence[field]["value"]
|
||||
|
||||
assert evidence["source_commit"]["status"] == "blocked"
|
||||
assert "not present" in evidence["source_commit"]["blocker"]
|
||||
assert audit["summary"] == {
|
||||
"required_field_count": 7,
|
||||
"complete_count": 6,
|
||||
"blocked_count": 1,
|
||||
"method_contract_count": 14,
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.xalen_shadbala_av_delta_report import build_report
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_xalen_shadbala_av_delta_report_groups_component_differences() -> None:
|
||||
report = build_report(
|
||||
ROOT / "references/oracle/three_engine_parity_replay_manifest.json",
|
||||
ROOT / "references/oracle/artifacts/xalen_steve_jobs_high_rigor_raw.json",
|
||||
ROOT / "references/oracle/shadbala_av_component_provenance_registry_2026_07_19.json",
|
||||
)
|
||||
|
||||
assert report["scope"] == "xalen_shadbala_av_component_delta_report"
|
||||
assert report["truth_policy"] == "method_variant_not_majority_vote"
|
||||
assert report["production_tuning_allowed"] is False
|
||||
assert report["source_commit"] == "cc6edbec1f748ebdc4950ae6198f575c5ada73fa"
|
||||
assert report["license"] == "Apache-2.0"
|
||||
assert report["summary"]["shadbala_component_rows"] == 42
|
||||
assert report["summary"]["shadbala_component_mismatch_count"] == 35
|
||||
assert report["summary"]["ashtakavarga_rows"] == 8
|
||||
assert report["summary"]["ashtakavarga_mismatch_count"] == 4
|
||||
assert report["summary"]["shadbala_total_mismatch_count"] == 7
|
||||
|
||||
|
||||
def test_xalen_shadbala_av_delta_report_preserves_evidence_requirements() -> None:
|
||||
report = build_report(
|
||||
ROOT / "references/oracle/three_engine_parity_replay_manifest.json",
|
||||
ROOT / "references/oracle/artifacts/xalen_steve_jobs_high_rigor_raw.json",
|
||||
ROOT / "references/oracle/shadbala_av_component_provenance_registry_2026_07_19.json",
|
||||
)
|
||||
|
||||
for row in report["component_groups"]:
|
||||
assert row["closure_status"] == "open"
|
||||
assert row["required_evidence"]
|
||||
assert row["unit_contract"]
|
||||
assert row["allowed_claim"] in {
|
||||
"component_method_variant",
|
||||
"table_variant",
|
||||
"derived_total_blocked_until_components_close",
|
||||
"derived_total_only_after_components_close",
|
||||
}
|
||||
Reference in New Issue
Block a user