feat: sync worked example closure bridge
This commit is contained in:
@@ -641,14 +641,30 @@
|
||||
"claim_status": "partial",
|
||||
"consumer_policy": "research_to_commercial_contract_only",
|
||||
"claim_boundary": "Basic compatibility layers are callable with boundaries; full synastry, relationship AV overlays, Planet/Lagna Kuta, and deterministic relationship timing remain blocked until oracle packets close."
|
||||
},
|
||||
{
|
||||
"packet_id": "three_engine_worked_example_bridge_2026_07_20",
|
||||
"path": "references/oracle/three_engine_worked_example_bridge_2026_07_20.json",
|
||||
"domain": "three_engine_parity",
|
||||
"claim_status": "open_queue",
|
||||
"consumer_policy": "research_to_commercial_contract_only",
|
||||
"claim_boundary": "Links three-engine owner tracks to worked-example intake domains; no mismatch row is closed without replay or method-variant attribution."
|
||||
},
|
||||
{
|
||||
"packet_id": "worked_example_packet_intake_plan_2026_07_20",
|
||||
"path": "references/oracle/worked_example_packet_intake_plan_2026_07_20.json",
|
||||
"domain": "worked_example_collection",
|
||||
"claim_status": "open_queue",
|
||||
"consumer_policy": "research_to_commercial_contract_only",
|
||||
"claim_boundary": "Groups KP, Muhurta, and Shadbala worked-example candidates into intake queues; no candidate is upgraded until numeric expected values, raw/hash, and replay comparison are archived."
|
||||
}
|
||||
],
|
||||
"production_tuning_allowed": false,
|
||||
"scope": "evidence_packet_index",
|
||||
"status": "active_index_v1",
|
||||
"summary": {
|
||||
"packet_count": 80,
|
||||
"blocked_or_partial_count": 53,
|
||||
"packet_count": 82,
|
||||
"blocked_or_partial_count": 55,
|
||||
"human_review_required_count": 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"boundary": "Bridge converts owner tracks into evidence asks; all mismatch rows remain open until replay/attribution artifacts close them.",
|
||||
"claim_status": "open_queue",
|
||||
"created_at": "2026-07-20",
|
||||
"owner_track_links": [
|
||||
{
|
||||
"categories": [
|
||||
"endpoint_or_varga_semantics"
|
||||
],
|
||||
"claim_boundary": "Bridge only; does not close mismatches, tune production, or majority-vote truth.",
|
||||
"closure_condition": "Close only by field-level replay against a numeric packet or by explicit method-variant attribution.",
|
||||
"linked_blocking_fields": [],
|
||||
"linked_candidate_count": 0,
|
||||
"linked_intake_domains": [],
|
||||
"next_non_numeric_evidence": [
|
||||
"identified endpoint/method contract with ayanamsa, node mode, varga, timezone semantics"
|
||||
],
|
||||
"owner_track": "endpoint_contract",
|
||||
"ticket_count": 10
|
||||
},
|
||||
{
|
||||
"categories": [
|
||||
"shadbala_formula_variant"
|
||||
],
|
||||
"claim_boundary": "Bridge only; does not close mismatches, tune production, or majority-vote truth.",
|
||||
"closure_condition": "Close only by field-level replay against a numeric packet or by explicit method-variant attribution.",
|
||||
"linked_blocking_fields": [
|
||||
"birth_input",
|
||||
"complete birth input",
|
||||
"component_name",
|
||||
"expected_virupa",
|
||||
"formula_variant",
|
||||
"method_variant",
|
||||
"planet",
|
||||
"public_numeric_expected_values",
|
||||
"raw_capture_hash",
|
||||
"unit"
|
||||
],
|
||||
"linked_candidate_count": 1,
|
||||
"linked_intake_domains": [
|
||||
"shadbala_component_closure"
|
||||
],
|
||||
"next_non_numeric_evidence": [],
|
||||
"owner_track": "formula_source",
|
||||
"ticket_count": 35
|
||||
},
|
||||
{
|
||||
"categories": [
|
||||
"derived_total_from_component_variants"
|
||||
],
|
||||
"claim_boundary": "Bridge only; does not close mismatches, tune production, or majority-vote truth.",
|
||||
"closure_condition": "Close only by field-level replay against a numeric packet or by explicit method-variant attribution.",
|
||||
"linked_blocking_fields": [],
|
||||
"linked_candidate_count": 0,
|
||||
"linked_intake_domains": [],
|
||||
"next_non_numeric_evidence": [
|
||||
"component closure before total recomputation; explicit Rupa/Virupa total rule"
|
||||
],
|
||||
"owner_track": "unit_schema",
|
||||
"ticket_count": 7
|
||||
},
|
||||
{
|
||||
"categories": [
|
||||
"ashtakavarga_table_or_contributor_variant"
|
||||
],
|
||||
"claim_boundary": "Bridge only; does not close mismatches, tune production, or majority-vote truth.",
|
||||
"closure_condition": "Close only by field-level replay against a numeric packet or by explicit method-variant attribution.",
|
||||
"linked_blocking_fields": [],
|
||||
"linked_candidate_count": 0,
|
||||
"linked_intake_domains": [],
|
||||
"next_non_numeric_evidence": [
|
||||
"public worked BAV/SAV table with contributor set, shodhana state, and Lagna inclusion"
|
||||
],
|
||||
"owner_track": "worked_example",
|
||||
"ticket_count": 8
|
||||
}
|
||||
],
|
||||
"production_tuning_allowed": false,
|
||||
"scope": "three_engine_worked_example_bridge",
|
||||
"sources": {
|
||||
"owner_track_batch_plan": "references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json",
|
||||
"worked_example_packet_intake_plan": "references/oracle/worked_example_packet_intake_plan_2026_07_20.json"
|
||||
},
|
||||
"status": "bridge_ready",
|
||||
"summary": {
|
||||
"closed_mismatch_count": 0,
|
||||
"linked_candidate_count": 1,
|
||||
"linked_owner_track_count": 1,
|
||||
"owner_track_count": 4
|
||||
},
|
||||
"truth_matrix_allowed": false
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"boundary": "Intake plan only; public examples remain observation-only until numeric packets are captured and replayed.",
|
||||
"claim_status": "open_queue",
|
||||
"created_at": "2026-07-20",
|
||||
"domain_queues": [
|
||||
{
|
||||
"blocking_fields": [
|
||||
"public_numeric_expected_values",
|
||||
"raw_capture_hash",
|
||||
"cusp longitude",
|
||||
"star_lord",
|
||||
"sub_lord",
|
||||
"sub_sub_lord",
|
||||
"method_settings",
|
||||
"birth_or_query_datetime",
|
||||
"location",
|
||||
"cusp_longitude",
|
||||
"nakshatra_lord",
|
||||
"source_table_raw",
|
||||
"source_table_hash",
|
||||
"license_boundary",
|
||||
"table_raw_capture",
|
||||
"table_hash",
|
||||
"copyright_boundary",
|
||||
"degree_range"
|
||||
],
|
||||
"candidate_count": 2,
|
||||
"closure_condition": "Promote only after exact public input, method settings, expected numeric values, raw capture, raw hash, and replay comparison are archived.",
|
||||
"domain": "kp_precision_timing",
|
||||
"highest_status": "runtime_only_public_oracle_missing",
|
||||
"items": [
|
||||
{
|
||||
"blocking_fields": [
|
||||
"public_numeric_expected_values",
|
||||
"raw_capture_hash",
|
||||
"cusp longitude",
|
||||
"star_lord",
|
||||
"sub_lord",
|
||||
"sub_sub_lord",
|
||||
"method_settings",
|
||||
"birth_or_query_datetime",
|
||||
"location",
|
||||
"cusp_longitude",
|
||||
"nakshatra_lord"
|
||||
],
|
||||
"candidate_type": "tool_or_reference_page",
|
||||
"eligibility_status": "runtime_only_public_oracle_missing",
|
||||
"next_capture_artifact": "references/oracle/artifacts/kp_cusp_worked_example_packet.json",
|
||||
"runtime_observation_available": true,
|
||||
"topic": "KP cusp",
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"url": "https://www.astrosage.com/kp/cuspal-sub-lord.asp"
|
||||
},
|
||||
{
|
||||
"blocking_fields": [
|
||||
"source_table_raw",
|
||||
"source_table_hash",
|
||||
"license_boundary",
|
||||
"public_numeric_expected_values",
|
||||
"table_raw_capture",
|
||||
"table_hash",
|
||||
"copyright_boundary",
|
||||
"degree_range",
|
||||
"star_lord",
|
||||
"sub_lord",
|
||||
"sub_sub_lord"
|
||||
],
|
||||
"candidate_type": "reference_table_candidate",
|
||||
"eligibility_status": "reference_table_hash_needed",
|
||||
"next_capture_artifact": "references/oracle/artifacts/kp_sub-lord_table_worked_example_packet.json",
|
||||
"runtime_observation_available": false,
|
||||
"topic": "KP sub-lord table",
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"url": "https://www.aryabhatt.com/astrology/krishnamurti-paddhati/kp-sub-lords-table"
|
||||
}
|
||||
],
|
||||
"next_action_owner": "oracle_intake"
|
||||
},
|
||||
{
|
||||
"blocking_fields": [
|
||||
"stable date/location/person input",
|
||||
"raw_capture_hash",
|
||||
"rule weights",
|
||||
"public_numeric_expected_values",
|
||||
"date",
|
||||
"location",
|
||||
"birth_moon_nakshatra",
|
||||
"current_moon_nakshatra",
|
||||
"tarabala_result",
|
||||
"chandrabala_result",
|
||||
"date/location fixture",
|
||||
"sunrise/sunset source",
|
||||
"sunrise",
|
||||
"sunset",
|
||||
"weekday",
|
||||
"expected_interval"
|
||||
],
|
||||
"candidate_count": 2,
|
||||
"closure_condition": "Promote only after exact public input, method settings, expected numeric values, raw capture, raw hash, and replay comparison are archived.",
|
||||
"domain": "muhurta_factor_scoring",
|
||||
"highest_status": "raw_capture_needed",
|
||||
"items": [
|
||||
{
|
||||
"blocking_fields": [
|
||||
"stable date/location/person input",
|
||||
"raw_capture_hash",
|
||||
"rule weights",
|
||||
"public_numeric_expected_values",
|
||||
"date",
|
||||
"location",
|
||||
"birth_moon_nakshatra",
|
||||
"current_moon_nakshatra",
|
||||
"tarabala_result",
|
||||
"chandrabala_result"
|
||||
],
|
||||
"candidate_type": "worked_example_candidate",
|
||||
"eligibility_status": "raw_capture_needed",
|
||||
"next_capture_artifact": "references/oracle/artifacts/tarabala_chandrabala_worked_example_packet.json",
|
||||
"runtime_observation_available": false,
|
||||
"topic": "Tarabala/Chandrabala",
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"url": "https://www.mypanchang.com/tarabalam.php"
|
||||
},
|
||||
{
|
||||
"blocking_fields": [
|
||||
"date/location fixture",
|
||||
"sunrise/sunset source",
|
||||
"public_numeric_expected_values",
|
||||
"raw_capture_hash",
|
||||
"date",
|
||||
"location",
|
||||
"sunrise",
|
||||
"sunset",
|
||||
"weekday",
|
||||
"expected_interval"
|
||||
],
|
||||
"candidate_type": "calculation_reference_candidate",
|
||||
"eligibility_status": "fixture_and_raw_capture_needed",
|
||||
"next_capture_artifact": "references/oracle/artifacts/rahu_kalam_worked_example_packet.json",
|
||||
"runtime_observation_available": false,
|
||||
"topic": "Rahu Kalam",
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"url": "https://www.drikpanchang.com/muhurat/rahu-kalam.html"
|
||||
}
|
||||
],
|
||||
"next_action_owner": "oracle_intake"
|
||||
},
|
||||
{
|
||||
"blocking_fields": [
|
||||
"complete birth input",
|
||||
"public_numeric_expected_values",
|
||||
"method_variant",
|
||||
"raw_capture_hash",
|
||||
"birth_input",
|
||||
"planet",
|
||||
"component_name",
|
||||
"formula_variant",
|
||||
"unit",
|
||||
"expected_virupa"
|
||||
],
|
||||
"candidate_count": 1,
|
||||
"closure_condition": "Promote only after exact public input, method settings, expected numeric values, raw capture, raw hash, and replay comparison are archived.",
|
||||
"domain": "shadbala_component_closure",
|
||||
"highest_status": "formula_reference_only",
|
||||
"items": [
|
||||
{
|
||||
"blocking_fields": [
|
||||
"complete birth input",
|
||||
"public_numeric_expected_values",
|
||||
"method_variant",
|
||||
"raw_capture_hash",
|
||||
"birth_input",
|
||||
"planet",
|
||||
"component_name",
|
||||
"formula_variant",
|
||||
"unit",
|
||||
"expected_virupa"
|
||||
],
|
||||
"candidate_type": "formula_reference_candidate",
|
||||
"eligibility_status": "formula_reference_only",
|
||||
"next_capture_artifact": "references/oracle/artifacts/shadbala_virupa_worked_example_packet.json",
|
||||
"runtime_observation_available": false,
|
||||
"topic": "Shadbala Virupa",
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"url": "https://www.astrojyoti.com/shadbala.htm"
|
||||
}
|
||||
],
|
||||
"next_action_owner": "oracle_intake"
|
||||
}
|
||||
],
|
||||
"production_tuning_allowed": false,
|
||||
"scope": "worked_example_packet_intake_plan",
|
||||
"sources": {
|
||||
"eligibility": "references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json"
|
||||
},
|
||||
"status": "intake_plan_ready",
|
||||
"summary": {
|
||||
"candidate_count": 5,
|
||||
"domain_count": 3,
|
||||
"domains_with_runtime_observation": 1,
|
||||
"oracle_ready_count": 0
|
||||
},
|
||||
"truth_matrix_allowed": false
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Link three-engine mismatch owner tracks to worked-example intake domains."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
PLAN = ROOT / "references/oracle/three_engine_owner_track_batch_plan_2026_07_20.json"
|
||||
INTAKE = ROOT / "references/oracle/worked_example_packet_intake_plan_2026_07_20.json"
|
||||
|
||||
TRACK_TO_INTAKE = {
|
||||
"formula_source": ["shadbala_component_closure"],
|
||||
"derived_total": ["shadbala_component_closure"],
|
||||
}
|
||||
|
||||
|
||||
def build(date: str) -> dict[str, Any]:
|
||||
plan = json.loads(PLAN.read_text(encoding="utf-8"))
|
||||
intake = json.loads(INTAKE.read_text(encoding="utf-8"))
|
||||
intake_by_domain = {row["domain"]: row for row in intake["domain_queues"]}
|
||||
links = []
|
||||
for batch in plan["batches"]:
|
||||
domains = TRACK_TO_INTAKE.get(batch["owner_track"], [])
|
||||
linked = [intake_by_domain[d] for d in domains if d in intake_by_domain]
|
||||
links.append(
|
||||
{
|
||||
"owner_track": batch["owner_track"],
|
||||
"ticket_count": batch["ticket_count"],
|
||||
"categories": batch["categories"],
|
||||
"linked_intake_domains": domains,
|
||||
"linked_candidate_count": sum(row["candidate_count"] for row in linked),
|
||||
"linked_blocking_fields": sorted({field for row in linked for field in row["blocking_fields"]}),
|
||||
"next_non_numeric_evidence": batch["next_evidence"] if not domains else [],
|
||||
"closure_condition": "Close only by field-level replay against a numeric packet or by explicit method-variant attribution.",
|
||||
"claim_boundary": "Bridge only; does not close mismatches, tune production, or majority-vote truth.",
|
||||
}
|
||||
)
|
||||
return {
|
||||
"scope": "three_engine_worked_example_bridge",
|
||||
"created_at": date,
|
||||
"status": "bridge_ready",
|
||||
"claim_status": "open_queue",
|
||||
"production_tuning_allowed": False,
|
||||
"truth_matrix_allowed": False,
|
||||
"sources": {
|
||||
"owner_track_batch_plan": str(PLAN.relative_to(ROOT)),
|
||||
"worked_example_packet_intake_plan": str(INTAKE.relative_to(ROOT)),
|
||||
},
|
||||
"summary": {
|
||||
"owner_track_count": len(links),
|
||||
"linked_owner_track_count": sum(1 for row in links if row["linked_intake_domains"]),
|
||||
"linked_candidate_count": sum(row["linked_candidate_count"] for row in links),
|
||||
"closed_mismatch_count": 0,
|
||||
},
|
||||
"owner_track_links": links,
|
||||
"boundary": "Bridge converts owner tracks into evidence asks; all mismatch rows remain open until replay/attribution artifacts close them.",
|
||||
}
|
||||
|
||||
|
||||
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())
|
||||
@@ -0,0 +1,132 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build a domain intake plan from numeric worked-example eligibility rows."""
|
||||
|
||||
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]
|
||||
ELIGIBILITY = ROOT / "references/oracle/worked_example_numeric_packet_eligibility_2026_07_20.json"
|
||||
OUT = ROOT / "references/oracle/worked_example_packet_intake_plan_2026_07_20.json"
|
||||
|
||||
DOMAIN_BY_TOPIC = {
|
||||
"KP cusp": "kp_precision_timing",
|
||||
"KP sub-lord table": "kp_precision_timing",
|
||||
"Tarabala/Chandrabala": "muhurta_factor_scoring",
|
||||
"Rahu Kalam": "muhurta_factor_scoring",
|
||||
"Shadbala Virupa": "shadbala_component_closure",
|
||||
}
|
||||
|
||||
STATUS_RANK = {
|
||||
"runtime_only_public_oracle_missing": 4,
|
||||
"reference_table_hash_needed": 3,
|
||||
"raw_capture_needed": 2,
|
||||
"fixture_and_raw_capture_needed": 2,
|
||||
"formula_reference_only": 1,
|
||||
}
|
||||
|
||||
CANONICAL_BLOCKERS = {
|
||||
"fixed public input case": "public_numeric_expected_values",
|
||||
"per-component Virupa expected values": "public_numeric_expected_values",
|
||||
"expected factor table": "public_numeric_expected_values",
|
||||
"expected interval": "public_numeric_expected_values",
|
||||
"worked example link": "public_numeric_expected_values",
|
||||
"raw output hash": "raw_capture_hash",
|
||||
"captured raw hash": "raw_capture_hash",
|
||||
"raw capture hash": "raw_capture_hash",
|
||||
"table hash": "source_table_hash",
|
||||
"captured table raw": "source_table_raw",
|
||||
"license/copyright boundary": "license_boundary",
|
||||
"formula variant": "method_variant",
|
||||
"method settings": "method_settings",
|
||||
"ayanamsa": "method_settings",
|
||||
"house_system": "method_settings",
|
||||
}
|
||||
|
||||
|
||||
def canonicalize(fields: list[str]) -> list[str]:
|
||||
out = []
|
||||
for field in fields:
|
||||
key = CANONICAL_BLOCKERS.get(field, field)
|
||||
if key not in out:
|
||||
out.append(key)
|
||||
return out
|
||||
|
||||
|
||||
def topic_domain(topic: str) -> str:
|
||||
return DOMAIN_BY_TOPIC.get(topic, "worked_example_collection")
|
||||
|
||||
|
||||
def build(date: str) -> dict[str, Any]:
|
||||
source = json.loads(ELIGIBILITY.read_text(encoding="utf-8"))
|
||||
grouped: dict[str, list[dict[str, Any]]] = defaultdict(list)
|
||||
for row in source["rows"]:
|
||||
item = {
|
||||
"topic": row["topic"],
|
||||
"url": row["url"],
|
||||
"candidate_type": row["candidate_type"],
|
||||
"eligibility_status": row["eligibility_status"],
|
||||
"runtime_observation_available": row["runtime_observation_available"],
|
||||
"blocking_fields": canonicalize(row["missing_for_oracle"]),
|
||||
"upgrade_policy": "observation_only_until_numeric_packet",
|
||||
"next_capture_artifact": f"references/oracle/artifacts/{row['topic'].lower().replace('/', '_').replace(' ', '_')}_worked_example_packet.json",
|
||||
}
|
||||
grouped[topic_domain(row["topic"])].append(item)
|
||||
|
||||
domain_queues = []
|
||||
for domain in sorted(grouped):
|
||||
items = grouped[domain]
|
||||
statuses = [item["eligibility_status"] for item in items]
|
||||
blockers = []
|
||||
for item in items:
|
||||
for field in item["blocking_fields"]:
|
||||
if field not in blockers:
|
||||
blockers.append(field)
|
||||
domain_queues.append(
|
||||
{
|
||||
"domain": domain,
|
||||
"candidate_count": len(items),
|
||||
"highest_status": max(statuses, key=lambda x: STATUS_RANK.get(x, 0)),
|
||||
"blocking_fields": blockers,
|
||||
"next_action_owner": "oracle_intake",
|
||||
"closure_condition": "Promote only after exact public input, method settings, expected numeric values, raw capture, raw hash, and replay comparison are archived.",
|
||||
"items": items,
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
"scope": "worked_example_packet_intake_plan",
|
||||
"created_at": date,
|
||||
"status": "intake_plan_ready",
|
||||
"claim_status": "open_queue",
|
||||
"production_tuning_allowed": False,
|
||||
"truth_matrix_allowed": False,
|
||||
"sources": {"eligibility": str(ELIGIBILITY.relative_to(ROOT))},
|
||||
"summary": {
|
||||
"domain_count": len(domain_queues),
|
||||
"candidate_count": sum(row["candidate_count"] for row in domain_queues),
|
||||
"oracle_ready_count": 0,
|
||||
"domains_with_runtime_observation": sum(
|
||||
1 for row in domain_queues if any(item["runtime_observation_available"] for item in row["items"])
|
||||
),
|
||||
},
|
||||
"domain_queues": domain_queues,
|
||||
"boundary": "Intake plan only; public examples remain observation-only until numeric packets are captured and replayed.",
|
||||
}
|
||||
|
||||
|
||||
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())
|
||||
@@ -0,0 +1,42 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ARTIFACT = ROOT / "references" / "oracle" / "three_engine_worked_example_bridge_2026_07_20.json"
|
||||
INDEX = ROOT / "references" / "oracle" / "evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_three_engine_worked_example_bridge_links_owner_tracks_to_intake_domains():
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
["python3", "scripts/three_engine_worked_example_bridge.py", "--date", "2026-07-20"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
)
|
||||
)
|
||||
assert data["scope"] == "three_engine_worked_example_bridge"
|
||||
assert data["claim_status"] == "open_queue"
|
||||
assert data["production_tuning_allowed"] is False
|
||||
tracks = {row["owner_track"]: row for row in data["owner_track_links"]}
|
||||
assert "formula_source" in tracks
|
||||
assert tracks["formula_source"]["linked_intake_domains"] == ["shadbala_component_closure"]
|
||||
assert tracks["formula_source"]["ticket_count"] >= 30
|
||||
assert tracks["formula_source"]["claim_boundary"].startswith("Bridge only")
|
||||
|
||||
|
||||
def test_three_engine_worked_example_bridge_identifies_unlinked_tracks():
|
||||
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
|
||||
tracks = {row["owner_track"]: row for row in data["owner_track_links"]}
|
||||
assert tracks["endpoint_contract"]["linked_intake_domains"] == []
|
||||
assert "method contract" in tracks["endpoint_contract"]["next_non_numeric_evidence"][0]
|
||||
assert data["summary"]["linked_owner_track_count"] >= 1
|
||||
assert data["summary"]["closed_mismatch_count"] == 0
|
||||
|
||||
|
||||
def test_three_engine_worked_example_bridge_is_indexed():
|
||||
packets = {row["packet_id"]: row for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]}
|
||||
packet = packets["three_engine_worked_example_bridge_2026_07_20"]
|
||||
assert packet["domain"] == "three_engine_parity"
|
||||
assert packet["claim_status"] == "open_queue"
|
||||
@@ -0,0 +1,43 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ARTIFACT = ROOT / "references" / "oracle" / "worked_example_packet_intake_plan_2026_07_20.json"
|
||||
INDEX = ROOT / "references" / "oracle" / "evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_worked_example_packet_intake_plan_groups_candidates_by_domain():
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
["python3", "scripts/worked_example_packet_intake_plan.py", "--date", "2026-07-20"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
)
|
||||
)
|
||||
assert data["scope"] == "worked_example_packet_intake_plan"
|
||||
assert data["claim_status"] == "open_queue"
|
||||
assert data["production_tuning_allowed"] is False
|
||||
assert data["truth_matrix_allowed"] is False
|
||||
assert data["summary"]["candidate_count"] >= 5
|
||||
assert data["summary"]["oracle_ready_count"] == 0
|
||||
domains = {row["domain"] for row in data["domain_queues"]}
|
||||
assert {"kp_precision_timing", "shadbala_component_closure", "muhurta_factor_scoring"}.issubset(domains)
|
||||
|
||||
|
||||
def test_worked_example_packet_intake_plan_preserves_blockers_and_next_actions():
|
||||
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
|
||||
rows = {row["domain"]: row for row in data["domain_queues"]}
|
||||
kp = rows["kp_precision_timing"]
|
||||
assert kp["highest_status"] in {"runtime_only_public_oracle_missing", "reference_table_hash_needed"}
|
||||
assert "public_numeric_expected_values" in kp["blocking_fields"]
|
||||
assert kp["next_action_owner"] == "oracle_intake"
|
||||
assert all(item["upgrade_policy"] == "observation_only_until_numeric_packet" for row in data["domain_queues"] for item in row["items"])
|
||||
|
||||
|
||||
def test_worked_example_packet_intake_plan_is_indexed():
|
||||
packets = {row["packet_id"]: row for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]}
|
||||
packet = packets["worked_example_packet_intake_plan_2026_07_20"]
|
||||
assert packet["domain"] == "worked_example_collection"
|
||||
assert packet["claim_status"] == "open_queue"
|
||||
Reference in New Issue
Block a user