From d61d75deef30ca9404faf00ae27b03a7d070af37 Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Mon, 20 Jul 2026 00:41:29 +0800 Subject: [PATCH] feat: sync closure planning queues --- ...ed_domain_resolution_queue_2026_07_20.json | 69 +++++++--- .../evidence_packet_index_2026_07_19.json | 20 ++- ...ine_owner_track_batch_plan_2026_07_20.json | 104 ++++++++++++++ ...numeric_packet_eligibility_2026_07_20.json | 129 ++++++++++++++++++ scripts/blocked_domain_resolution_queue.py | 79 +++++++++++ .../three_engine_owner_track_batch_plan.py | 77 +++++++++++ ...rked_example_numeric_packet_eligibility.py | 82 +++++++++++ tests/test_blocked_domain_resolution_queue.py | 37 +++++ ...est_three_engine_owner_track_batch_plan.py | 36 +++++ ...rked_example_numeric_packet_eligibility.py | 37 +++++ 10 files changed, 649 insertions(+), 21 deletions(-) create mode 100644 references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json create mode 100644 references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json create mode 100644 scripts/blocked_domain_resolution_queue.py create mode 100644 scripts/three_engine_owner_track_batch_plan.py create mode 100644 scripts/worked_example_numeric_packet_eligibility.py create mode 100644 tests/test_blocked_domain_resolution_queue.py create mode 100644 tests/test_three_engine_owner_track_batch_plan.py create mode 100644 tests/test_worked_example_numeric_packet_eligibility.py diff --git a/references/oracle/blocked_domain_resolution_queue_2026_07_20.json b/references/oracle/blocked_domain_resolution_queue_2026_07_20.json index 6dc917cf..f852535d 100644 --- a/references/oracle/blocked_domain_resolution_queue_2026_07_20.json +++ b/references/oracle/blocked_domain_resolution_queue_2026_07_20.json @@ -24,6 +24,16 @@ "hard_dependency": "classical_source_and_oracle", "local_next_action": "keep_research_registry_until_source_oracle" }, + { + "blocking_packets": [ + "d1_d60_public_source_candidate_queue" + ], + "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", + "code_can_progress_without_truth_upgrade": true, + "domain": "divisional_chart_source_queue", + "hard_dependency": "unknown_dependency", + "local_next_action": "triage_blocked_domain" + }, { "blocking_packets": [ "vedastro_identity_evidence_audit" @@ -34,6 +44,16 @@ "hard_dependency": "upstream_build_identity", "local_next_action": "archive_self_host_or_upstream_identity_metadata" }, + { + "blocking_packets": [ + "four_engine_comparison_queue" + ], + "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", + "code_can_progress_without_truth_upgrade": true, + "domain": "four_engine_parity", + "hard_dependency": "unknown_dependency", + "local_next_action": "triage_blocked_domain" + }, { "blocking_packets": [ "high_rigor_closure_gate_snapshot_2026_07_20" @@ -54,6 +74,16 @@ "hard_dependency": "public_numeric_worked_examples", "local_next_action": "collect_prashna_tajika_saham_gulika_sphuta_packets" }, + { + "blocking_packets": [ + "kp_muhurta_shadbala_numeric_packet_queue" + ], + "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", + "code_can_progress_without_truth_upgrade": true, + "domain": "kp_muhurta_shadbala_numeric_oracle_queue", + "hard_dependency": "unknown_dependency", + "local_next_action": "triage_blocked_domain" + }, { "blocking_packets": [ "kp_cusp_precision_contract", @@ -67,7 +97,18 @@ }, { "blocking_packets": [ - "three_engine_mismatch_closure_queue" + "muhurta_oss_factor_scoring_queue" + ], + "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", + "code_can_progress_without_truth_upgrade": true, + "domain": "muhurta_factor_scoring", + "hard_dependency": "unknown_dependency", + "local_next_action": "triage_blocked_domain" + }, + { + "blocking_packets": [ + "three_engine_mismatch_closure_queue", + "three_engine_owner_track_batch_plan_2026_07_20" ], "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", "code_can_progress_without_truth_upgrade": true, @@ -86,21 +127,11 @@ "hard_dependency": "independent_human_labels", "local_next_action": "prepare_blind_eval_after_labels" }, - { - "blocking_packets": [ - "d1_d60_public_source_candidate_queue" - ], - "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", - "code_can_progress_without_truth_upgrade": true, - "domain": "varga_mapping", - "hard_dependency": "public_varga_formula_sources", - "local_next_action": "promote_d1_d60_sources_to_verified_packets" - }, { "blocking_packets": [ "public_worked_example_queue", "public_worked_example_candidate_numeric_audit", - "kp_muhurta_shadbala_numeric_packet_queue" + "worked_example_numeric_packet_eligibility_2026_07_20" ], "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", "code_can_progress_without_truth_upgrade": true, @@ -112,16 +143,16 @@ "production_tuning_allowed": false, "scope": "blocked_domain_resolution_queue", "source_gate_report_summary": { - "allowed_count": 7, - "blocked_count": 10, - "degraded_count": 22, - "domain_count": 39, + "allowed_count": 8, + "blocked_count": 13, + "degraded_count": 21, + "domain_count": 42, "production_tuning_allowed_count": 0 }, "status": "open_queue", "summary": { - "blocked_domain_count": 10, - "cannot_be_closed_by_code_only_count": 8, - "code_can_progress_count": 5 + "blocked_domain_count": 13, + "cannot_be_closed_by_code_only_count": 11, + "code_can_progress_count": 8 } } diff --git a/references/oracle/evidence_packet_index_2026_07_19.json b/references/oracle/evidence_packet_index_2026_07_19.json index e9f825b1..e3bc8019 100644 --- a/references/oracle/evidence_packet_index_2026_07_19.json +++ b/references/oracle/evidence_packet_index_2026_07_19.json @@ -609,14 +609,30 @@ "claim_status": "open_queue", "consumer_policy": "research_to_commercial_contract_only", "claim_boundary": "Action queue for 10 blocked production-ready domains; prioritizes next evidence but does not unblock any claim." + }, + { + "packet_id": "worked_example_numeric_packet_eligibility_2026_07_20", + "path": "references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json", + "domain": "worked_example_collection", + "claim_status": "open_queue", + "consumer_policy": "research_observation_only", + "claim_boundary": "Classifies public worked-example candidates by numeric-packet eligibility; no row is oracle-ready." + }, + { + "packet_id": "three_engine_owner_track_batch_plan_2026_07_20", + "path": "references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json", + "domain": "three_engine_parity", + "claim_status": "open_queue", + "consumer_policy": "research_to_commercial_contract_only", + "claim_boundary": "Groups remaining three-engine mismatches by owner track for closure planning; no production tuning or truth upgrade." } ], "production_tuning_allowed": false, "scope": "evidence_packet_index", "status": "active_index_v1", "summary": { - "packet_count": 76, - "blocked_or_partial_count": 49, + "packet_count": 78, + "blocked_or_partial_count": 51, "human_review_required_count": 2 } } diff --git a/references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json b/references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json new file mode 100644 index 00000000..bcf1e60b --- /dev/null +++ b/references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json @@ -0,0 +1,104 @@ +{ + "batches": [ + { + "categories": [ + "endpoint_or_varga_semantics" + ], + "claim_boundary": "Batch planning only; does not close mismatches, tune production, or majority-vote truth.", + "next_evidence": [ + "identified endpoint/method contract with ayanamsa, node mode, varga, timezone semantics" + ], + "owner_track": "endpoint_contract", + "priorities": [ + "P0" + ], + "sample_ticket_ids": [ + "TEMCQ-001", + "TEMCQ-002", + "TEMCQ-003", + "TEMCQ-004", + "TEMCQ-005" + ], + "ticket_count": 10 + }, + { + "categories": [ + "shadbala_formula_variant" + ], + "claim_boundary": "Batch planning only; does not close mismatches, tune production, or majority-vote truth.", + "next_evidence": [ + "public formula source + unit/cap/floor evidence for the component" + ], + "owner_track": "formula_source", + "priorities": [ + "P0" + ], + "sample_ticket_ids": [ + "TEMCQ-020", + "TEMCQ-021", + "TEMCQ-022", + "TEMCQ-023", + "TEMCQ-024" + ], + "ticket_count": 35 + }, + { + "categories": [ + "derived_total_from_component_variants" + ], + "claim_boundary": "Batch planning only; does not close mismatches, tune production, or majority-vote truth.", + "next_evidence": [ + "component closure before total recomputation; explicit Rupa/Virupa total rule" + ], + "owner_track": "unit_schema", + "priorities": [ + "P1" + ], + "sample_ticket_ids": [ + "TEMCQ-019", + "TEMCQ-025", + "TEMCQ-031", + "TEMCQ-037", + "TEMCQ-043" + ], + "ticket_count": 7 + }, + { + "categories": [ + "ashtakavarga_table_or_contributor_variant" + ], + "claim_boundary": "Batch planning only; does not close mismatches, tune production, or majority-vote truth.", + "next_evidence": [ + "public worked BAV/SAV table with contributor set, shodhana state, and Lagna inclusion" + ], + "owner_track": "worked_example", + "priorities": [ + "P1" + ], + "sample_ticket_ids": [ + "TEMCQ-011", + "TEMCQ-012", + "TEMCQ-013", + "TEMCQ-014", + "TEMCQ-015" + ], + "ticket_count": 8 + } + ], + "boundary": "Prioritized owner-track batch plan for remaining three-engine mismatches; no claim is upgraded.", + "claim_status": "open_queue", + "created_at": "2026-07-20", + "production_tuning_allowed": false, + "scope": "three_engine_owner_track_batch_plan", + "source_progress": "references/oracle/three_engine_mismatch_progress_ledger_2026_07_19.json", + "source_queue": "references/oracle/three_engine_mismatch_closure_queue_2026_07_19.json", + "status": "open_queue", + "summary": { + "already_attributed_count": 2, + "batched_source_row_count": 60, + "owner_track_count": 4, + "remaining_ticket_count": 58, + "source_queue_count": 60 + }, + "truth_matrix_allowed": false +} diff --git a/references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json b/references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json new file mode 100644 index 00000000..661b4644 --- /dev/null +++ b/references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json @@ -0,0 +1,129 @@ +{ + "boundary": "Eligibility queue only; no public numeric candidate is promoted to oracle_ready.", + "claim_status": "open_queue", + "created_at": "2026-07-20", + "production_tuning_allowed": false, + "rows": [ + { + "candidate_type": "tool_or_reference_page", + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + "eligibility_status": "runtime_only_public_oracle_missing", + "missing_for_oracle": [ + "fixed public input case", + "raw output hash", + "cusp longitude", + "star_lord", + "sub_lord", + "sub_sub_lord", + "method settings", + "birth_or_query_datetime", + "location", + "ayanamsa", + "house_system", + "cusp_longitude", + "nakshatra_lord", + "raw_capture_hash" + ], + "runtime_observation_available": true, + "topic": "KP cusp", + "url": "https://www.astrosage.com/kp/cuspal-sub-lord.asp" + }, + { + "candidate_type": "reference_table_candidate", + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + "eligibility_status": "reference_table_hash_needed", + "missing_for_oracle": [ + "captured table raw", + "table hash", + "license/copyright boundary", + "worked example link", + "table_raw_capture", + "table_hash", + "copyright_boundary", + "degree_range", + "star_lord", + "sub_lord", + "sub_sub_lord" + ], + "runtime_observation_available": false, + "topic": "KP sub-lord table", + "url": "https://www.aryabhatt.com/astrology/krishnamurti-paddhati/kp-sub-lords-table" + }, + { + "candidate_type": "worked_example_candidate", + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + "eligibility_status": "raw_capture_needed", + "missing_for_oracle": [ + "stable date/location/person input", + "captured raw hash", + "rule weights", + "expected factor table", + "date", + "location", + "birth_moon_nakshatra", + "current_moon_nakshatra", + "tarabala_result", + "chandrabala_result", + "raw_capture_hash" + ], + "runtime_observation_available": false, + "topic": "Tarabala/Chandrabala", + "url": "https://www.mypanchang.com/tarabalam.php" + }, + { + "candidate_type": "calculation_reference_candidate", + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + "eligibility_status": "fixture_and_raw_capture_needed", + "missing_for_oracle": [ + "date/location fixture", + "sunrise/sunset source", + "expected interval", + "raw capture hash", + "date", + "location", + "sunrise", + "sunset", + "weekday", + "expected_interval", + "raw_capture_hash" + ], + "runtime_observation_available": false, + "topic": "Rahu Kalam", + "url": "https://www.drikpanchang.com/muhurat/rahu-kalam.html" + }, + { + "candidate_type": "formula_reference_candidate", + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + "eligibility_status": "formula_reference_only", + "missing_for_oracle": [ + "complete birth input", + "per-component Virupa expected values", + "formula variant", + "raw capture hash", + "birth_input", + "planet", + "component_name", + "formula_variant", + "unit", + "expected_virupa", + "raw_capture_hash" + ], + "runtime_observation_available": false, + "topic": "Shadbala Virupa", + "url": "https://www.astrojyoti.com/shadbala.htm" + } + ], + "scope": "worked_example_numeric_packet_eligibility", + "sources": { + "candidate_numeric_audit": "references/oracle/public_worked_example_candidate_numeric_audit_2026_07_19.json", + "numeric_packet_queue": "references/oracle/kp_muhurta_shadbala_numeric_packet_queue_2026_07_19.json" + }, + "status": "eligibility_queue_ready", + "summary": { + "candidate_count": 5, + "oracle_ready_count": 0, + "raw_capture_needed_count": 2, + "runtime_only_count": 1 + }, + "truth_matrix_allowed": false +} diff --git a/scripts/blocked_domain_resolution_queue.py b/scripts/blocked_domain_resolution_queue.py new file mode 100644 index 00000000..aa770894 --- /dev/null +++ b/scripts/blocked_domain_resolution_queue.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Build an actionable queue for domains blocked by production-ready claim gate.""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path +from typing import Any + +from scripts.claim_audit_runtime_gate_report import build as build_gate_report + + +ROOT = Path(__file__).resolve().parents[1] +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + +RESOLUTION = { + "closure_governance": ("gate_snapshot_refresh", "blocked_subgates", False), + "high_rigor_governance": ("refresh_snapshot_after_subgate_changes", "blocked_subgates", False), + "external_oracle_identity": ("archive_self_host_or_upstream_identity_metadata", "upstream_build_identity", False), + "timing_holdout": ("prepare_blind_eval_after_labels", "independent_human_labels", False), + "three_engine_parity": ("continue_field_level_attribution", "field_source_oracle_arbitration", True), + "kp_precision_timing": ("collect_exact_cusp_numeric_packet", "public_kp_worked_example", True), + "worked_example_collection": ("promote_field_complete_candidates_to_numeric_packets", "public_numeric_worked_examples", True), + "horary_annual_sensitive_points": ("collect_prashna_tajika_saham_gulika_sphuta_packets", "public_numeric_worked_examples", True), + "varga_mapping": ("promote_d1_d60_sources_to_verified_packets", "public_varga_formula_sources", True), + "conception_chart": ("keep_research_registry_until_source_oracle", "classical_source_and_oracle", False), +} + +CODE_ONLY_CLOSABLE_DEPENDENCIES = {"blocked_subgates"} + + +def build(date: str) -> dict[str, Any]: + gate = build_gate_report(INDEX, "production_ready") + blocked = [row for row in gate["domains"] if row["decision"] == "block"] + domains = [] + for row in blocked: + local_next_action, hard_dependency, code_can_progress = RESOLUTION.get( + row["domain"], ("triage_blocked_domain", "unknown_dependency", True) + ) + domains.append( + { + "domain": row["domain"], + "blocking_packets": row["blocking_packets"], + "local_next_action": local_next_action, + "hard_dependency": hard_dependency, + "code_can_progress_without_truth_upgrade": code_can_progress, + "claim_boundary": "Do not change claim status until blocking packets close with reproducible evidence.", + } + ) + return { + "scope": "blocked_domain_resolution_queue", + "created_at": date, + "status": "open_queue", + "claim_status": "open_queue", + "production_tuning_allowed": False, + "source_gate_report_summary": gate["summary"], + "summary": { + "blocked_domain_count": len(domains), + "code_can_progress_count": sum(1 for row in domains if row["code_can_progress_without_truth_upgrade"]), + "cannot_be_closed_by_code_only_count": sum( + 1 for row in domains if row["hard_dependency"] not in CODE_ONLY_CLOSABLE_DEPENDENCIES + ), + }, + "domains": domains, + "boundary": "Resolution queue prioritizes work; it does not unblock production-ready claims.", + } + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--date", default="2026-07-20") + args = parser.parse_args() + print(json.dumps(build(args.date), ensure_ascii=False, indent=2, sort_keys=True)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/three_engine_owner_track_batch_plan.py b/scripts/three_engine_owner_track_batch_plan.py new file mode 100644 index 00000000..b296394b --- /dev/null +++ b/scripts/three_engine_owner_track_batch_plan.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Group three-engine mismatch tickets by owner track for closure planning.""" + +from __future__ import annotations + +import argparse +import json +from collections import defaultdict +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[1] +QUEUE = ROOT / "references/oracle/three_engine_mismatch_closure_queue_2026_07_19.json" +PROGRESS = ROOT / "references/oracle/three_engine_mismatch_progress_ledger_2026_07_19.json" + + +def build(date: str) -> dict[str, Any]: + queue = json.loads(QUEUE.read_text(encoding="utf-8")) + progress = json.loads(PROGRESS.read_text(encoding="utf-8")) + already = { + (row["section"], row["field"]) + for row in progress.get("attributed_rows", []) + if row.get("closure_state") == "attributed_no_tuning" + } + groups: dict[str, list[dict[str, Any]]] = defaultdict(list) + for row in queue["queue"]: + if (row["section"], row["field"].split(".")[0]) in already: + continue + groups[row["owner_track"]].append(row) + + batches = [] + for owner_track in sorted(groups): + rows = groups[owner_track] + batches.append( + { + "owner_track": owner_track, + "ticket_count": len(rows), + "priorities": sorted({row["priority"] for row in rows}), + "categories": sorted({row["category"] for row in rows}), + "sample_ticket_ids": [row["ticket_id"] for row in rows[:5]], + "next_evidence": sorted({row["required_evidence"] for row in rows}), + "claim_boundary": "Batch planning only; does not close mismatches, tune production, or majority-vote truth.", + } + ) + + return { + "scope": "three_engine_owner_track_batch_plan", + "created_at": date, + "status": "open_queue", + "claim_status": "open_queue", + "production_tuning_allowed": False, + "truth_matrix_allowed": False, + "source_queue": str(QUEUE.relative_to(ROOT)), + "source_progress": str(PROGRESS.relative_to(ROOT)), + "summary": { + "source_queue_count": len(queue["queue"]), + "already_attributed_count": len(already), + "remaining_ticket_count": max(len(queue["queue"]) - len(already), 0), + "batched_source_row_count": sum(batch["ticket_count"] for batch in batches), + "owner_track_count": len(batches), + }, + "batches": batches, + "boundary": "Prioritized owner-track batch plan for remaining three-engine mismatches; no claim is upgraded.", + } + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--date", default="2026-07-20") + args = parser.parse_args() + print(json.dumps(build(args.date), ensure_ascii=False, indent=2, sort_keys=True)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/worked_example_numeric_packet_eligibility.py b/scripts/worked_example_numeric_packet_eligibility.py new file mode 100644 index 00000000..a964b599 --- /dev/null +++ b/scripts/worked_example_numeric_packet_eligibility.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Normalize public worked-example candidates into numeric-packet eligibility rows.""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[1] +AUDIT = ROOT / "references/oracle/public_worked_example_candidate_numeric_audit_2026_07_19.json" +QUEUE = ROOT / "references/oracle/kp_muhurta_shadbala_numeric_packet_queue_2026_07_19.json" + + +def classify(status: str) -> str: + if status == "runtime_raw_available_public_oracle_missing": + return "runtime_only_public_oracle_missing" + if status == "table_hash_candidate_pending_capture": + return "reference_table_hash_needed" + if status == "worked_example_candidate_pending_raw_capture": + return "raw_capture_needed" + if status == "calculation_reference_pending_fixture": + return "fixture_and_raw_capture_needed" + return "formula_reference_only" + + +def build(date: str) -> dict[str, Any]: + audit = json.loads(AUDIT.read_text(encoding="utf-8")) + queue = json.loads(QUEUE.read_text(encoding="utf-8")) + required_by_topic = {row["topic"]: row.get("required_fields", []) for row in queue.get("packet_rows", [])} + rows = [] + for candidate in audit["candidates"]: + topic = candidate["topic"].replace("KP cusp star/sub/sub-sub", "KP cusp") + missing = list(candidate.get("missing_for_oracle", [])) + for field in required_by_topic.get(topic, []): + if field not in missing: + missing.append(field) + rows.append( + { + "topic": topic, + "url": candidate["url"], + "candidate_type": candidate["candidate_type"], + "eligibility_status": classify(candidate["numeric_packet_status"]), + "runtime_observation_available": bool(candidate.get("runtime_observation_available")), + "missing_for_oracle": missing, + "claim_boundary": "Not oracle-ready until exact public input, settings, expected values, raw/hash and replay comparison are archived.", + } + ) + return { + "scope": "worked_example_numeric_packet_eligibility", + "created_at": date, + "status": "eligibility_queue_ready", + "claim_status": "open_queue", + "production_tuning_allowed": False, + "truth_matrix_allowed": False, + "sources": { + "candidate_numeric_audit": str(AUDIT.relative_to(ROOT)), + "numeric_packet_queue": str(QUEUE.relative_to(ROOT)), + }, + "summary": { + "candidate_count": len(rows), + "oracle_ready_count": 0, + "runtime_only_count": sum(1 for row in rows if row["eligibility_status"] == "runtime_only_public_oracle_missing"), + "raw_capture_needed_count": sum(1 for row in rows if "raw_capture" in row["eligibility_status"]), + }, + "rows": rows, + "boundary": "Eligibility queue only; no public numeric candidate is promoted to oracle_ready.", + } + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--date", default="2026-07-20") + args = parser.parse_args() + print(json.dumps(build(args.date), ensure_ascii=False, indent=2, sort_keys=True)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/test_blocked_domain_resolution_queue.py b/tests/test_blocked_domain_resolution_queue.py new file mode 100644 index 00000000..73de3408 --- /dev/null +++ b/tests/test_blocked_domain_resolution_queue.py @@ -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" diff --git a/tests/test_three_engine_owner_track_batch_plan.py b/tests/test_three_engine_owner_track_batch_plan.py new file mode 100644 index 00000000..a270acdb --- /dev/null +++ b/tests/test_three_engine_owner_track_batch_plan.py @@ -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" diff --git a/tests/test_worked_example_numeric_packet_eligibility.py b/tests/test_worked_example_numeric_packet_eligibility.py new file mode 100644 index 00000000..970b72d4 --- /dev/null +++ b/tests/test_worked_example_numeric_packet_eligibility.py @@ -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"