Merge remote-tracking branch 'origin/main' into publish/birth-time-terminal-completion
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ARTIFACT = ROOT / "references/oracle/blocked_domain_resolution_queue_2026_07_20.json"
|
||||
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_blocked_domain_resolution_queue_covers_all_current_blocked_domains():
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
["python3", "scripts/blocked_domain_resolution_queue.py", "--date", "2026-07-20"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
)
|
||||
)
|
||||
assert data["scope"] == "blocked_domain_resolution_queue"
|
||||
assert data["created_at"] == "2026-07-20"
|
||||
assert data["summary"]["blocked_domain_count"] >= 10
|
||||
assert data["summary"]["cannot_be_closed_by_code_only_count"] >= 6
|
||||
assert data["production_tuning_allowed"] is False
|
||||
|
||||
|
||||
def test_blocked_domain_resolution_queue_marks_hard_external_and_human_dependencies():
|
||||
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
|
||||
by_domain = {row["domain"]: row for row in data["domains"]}
|
||||
assert by_domain["timing_holdout"]["hard_dependency"] == "independent_human_labels"
|
||||
assert by_domain["external_oracle_identity"]["hard_dependency"] == "upstream_build_identity"
|
||||
assert by_domain["three_engine_parity"]["local_next_action"] == "continue_field_level_attribution"
|
||||
assert by_domain["worked_example_collection"]["hard_dependency"] == "public_numeric_worked_examples"
|
||||
|
||||
|
||||
def test_blocked_domain_resolution_queue_is_indexed():
|
||||
packets = {row["packet_id"]: row for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]}
|
||||
assert packets["blocked_domain_resolution_queue_2026_07_20"]["claim_status"] == "open_queue"
|
||||
@@ -0,0 +1,36 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ARTIFACT = ROOT / "references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json"
|
||||
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_three_engine_owner_track_batch_plan_groups_remaining_open_rows():
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
["python3", "scripts/three_engine_owner_track_batch_plan.py", "--date", "2026-07-20"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
)
|
||||
)
|
||||
assert data["scope"] == "three_engine_owner_track_batch_plan"
|
||||
assert data["summary"]["source_queue_count"] == 60
|
||||
assert data["summary"]["already_attributed_count"] == 2
|
||||
assert data["summary"]["remaining_ticket_count"] == 58
|
||||
assert data["production_tuning_allowed"] is False
|
||||
|
||||
|
||||
def test_three_engine_owner_track_batch_plan_has_owner_batches_and_boundaries():
|
||||
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
|
||||
batches = {row["owner_track"]: row for row in data["batches"]}
|
||||
assert {"endpoint_contract", "formula_source", "unit_schema", "worked_example"} <= set(batches)
|
||||
assert batches["endpoint_contract"]["ticket_count"] >= 1
|
||||
assert all(batch["claim_boundary"].startswith("Batch planning only") for batch in data["batches"])
|
||||
|
||||
|
||||
def test_three_engine_owner_track_batch_plan_is_indexed():
|
||||
packets = {row["packet_id"]: row for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]}
|
||||
assert packets["three_engine_owner_track_batch_plan_2026_07_20"]["claim_status"] == "open_queue"
|
||||
@@ -0,0 +1,37 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ARTIFACT = ROOT / "references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json"
|
||||
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_worked_example_numeric_packet_eligibility_summarizes_candidate_rows():
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
["python3", "scripts/worked_example_numeric_packet_eligibility.py", "--date", "2026-07-20"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
)
|
||||
)
|
||||
assert data["scope"] == "worked_example_numeric_packet_eligibility"
|
||||
assert data["summary"]["candidate_count"] == 5
|
||||
assert data["summary"]["oracle_ready_count"] == 0
|
||||
assert data["summary"]["runtime_only_count"] >= 1
|
||||
assert data["production_tuning_allowed"] is False
|
||||
|
||||
|
||||
def test_worked_example_numeric_packet_eligibility_keeps_required_fields_visible():
|
||||
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
|
||||
by_topic = {row["topic"]: row for row in data["rows"]}
|
||||
assert by_topic["KP cusp"]["eligibility_status"] == "runtime_only_public_oracle_missing"
|
||||
assert "raw_capture_hash" in by_topic["KP cusp"]["missing_for_oracle"]
|
||||
assert by_topic["KP sub-lord table"]["eligibility_status"] == "reference_table_hash_needed"
|
||||
assert all(row["claim_boundary"].startswith("Not oracle-ready") for row in data["rows"])
|
||||
|
||||
|
||||
def test_worked_example_numeric_packet_eligibility_is_indexed():
|
||||
packets = {row["packet_id"]: row for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]}
|
||||
assert packets["worked_example_numeric_packet_eligibility_2026_07_20"]["claim_status"] == "open_queue"
|
||||
Reference in New Issue
Block a user