diff --git a/references/oracle/commercial_golden_oss_case_ci_contract_2026_07_21.json b/references/oracle/commercial_golden_oss_case_ci_contract_2026_07_21.json new file mode 100644 index 00000000..c64d07d4 --- /dev/null +++ b/references/oracle/commercial_golden_oss_case_ci_contract_2026_07_21.json @@ -0,0 +1,22 @@ +{ + "scope": "commercial_golden_oss_case_ci_contract", + "created_at": "2026-07-21", + "status": "ready_contract", + "purpose": "Commercial CI must replay at least one public OSS golden observation from the main research repo to detect accidental legacy WorkBuddy or incomplete artifact source wiring.", + "golden_case": { + "name": "pyjhora_jhora_sphuta_oss_case", + "probe": "scripts/prashna_sphuta_oss_case_probe.py", + "test": "tests/test_prashna_sphuta_oss_case_probe.py", + "source_packet": "references/oracle/prashna_sphuta_oss_case_probe_2026_07_20.json", + "expected_raw_hash": "f0705d205440ea8d7f39116042a0723d971f4ab79c94f7d448fc42d683d52326", + "claim_status": "tooling_observation_only" + }, + "gate_policy": { + "fail_if_probe_missing": true, + "fail_if_raw_hash_mismatch": true, + "fail_if_claim_status_upgraded": true, + "truth_upgrade_allowed": false, + "allow_business_runtime_to_continue_after_warning": false + }, + "claim_boundary": "ci_golden_observation_gate_only_not_oracle_truth" +} diff --git a/references/oracle/commercial_startup_self_check_contract_2026_07_21.json b/references/oracle/commercial_startup_self_check_contract_2026_07_21.json new file mode 100644 index 00000000..0eeca119 --- /dev/null +++ b/references/oracle/commercial_startup_self_check_contract_2026_07_21.json @@ -0,0 +1,36 @@ +{ + "scope": "commercial_startup_self_check_contract", + "created_at": "2026-07-21", + "status": "ready_contract", + "purpose": "Commercial runtime must prove which research truth source, skill version, evidence index and oracle gates it is using before claiming website capability readiness.", + "required_fields": [ + "truth_source_path", + "truth_source_git_commit", + "skill_version", + "evidence_packet_count", + "artifact_gate_status", + "privacy_artifact_status", + "oracle_ready_summary" + ], + "reject_if": { + "truth_source_path_contains": [ + "/WorkBuddy/", + "/.workbuddy/" + ], + "artifact_gate_status": [ + "missing", + "unknown" + ], + "privacy_artifact_status": [ + "private_artifact_present", + "unknown" + ] + }, + "recommended_surface": { + "startup_log": true, + "health_endpoint": "/api/runtime-identity", + "admin_status_panel": true, + "ci_snapshot": true + }, + "claim_boundary": "startup_identity_gate_only_not_business_runtime" +} diff --git a/references/oracle/evidence_packet_index_2026_07_19.json b/references/oracle/evidence_packet_index_2026_07_19.json index 5b990aab..996c1dd2 100644 --- a/references/oracle/evidence_packet_index_2026_07_19.json +++ b/references/oracle/evidence_packet_index_2026_07_19.json @@ -5,7 +5,7 @@ "production_tuning_allowed": false, "boundary": "Index of current governance packets only. Raw oracle artifacts remain in references/oracle/artifacts and are not all duplicated here.", "summary": { - "packet_count": 103, + "packet_count": 115, "blocked_or_partial_count": 51, "human_review_required_count": 3 }, @@ -833,6 +833,102 @@ "claim_status": "ready_contract", "consumer_policy": "research_local_ui_contract_only", "claim_boundary": "Ports commercial birth-time journey behavior contracts only; no Supabase, credits, auth, or commercial code imported." + }, + { + "packet_id": "truth_source_runtime_identity", + "path": "references/oracle/truth_source_runtime_identity_2026_07_21.json", + "domain": "truth_source_governance", + "claim_status": "ready_contract", + "consumer_policy": "research_to_commercial_startup_contract", + "claim_boundary": "Pins the main research repo as the only truth source, exposes runtime identity, and quarantines old WorkBuddy fragments; no oracle truth upgrade." + }, + { + "packet_id": "commercial_startup_self_check_contract_2026_07_21", + "path": "references/oracle/commercial_startup_self_check_contract_2026_07_21.json", + "domain": "commercial_sync_governance", + "claim_status": "ready_contract", + "consumer_policy": "commercial_startup_gate_contract_only", + "claim_boundary": "Requires commercial runtime to expose truth source identity, artifact gate and privacy status; no business runtime code imported into research." + }, + { + "packet_id": "commercial_golden_oss_case_ci_contract_2026_07_21", + "path": "references/oracle/commercial_golden_oss_case_ci_contract_2026_07_21.json", + "domain": "commercial_sync_governance", + "claim_status": "ready_contract", + "consumer_policy": "commercial_ci_gate_contract_only", + "claim_boundary": "Requires commercial CI to replay the PyJHora/JHora Sphuta OSS observation and hash; observation-only, no truth upgrade." + }, + { + "packet_id": "whole_machine_jyotish_fragment_scan_2026_07_21", + "path": "references/oracle/whole_machine_jyotish_fragment_scan_2026_07_21.json", + "domain": "fragment_governance", + "claim_status": "open_queue", + "consumer_policy": "research_only_no_direct_fragment_copy", + "claim_boundary": "Whole-machine Jyotish signal scan classifies main, WorkBuddy, temp and user-drop candidates; reviewable fragments are not truth source until privacy/license/invocation checks close." + }, + { + "packet_id": "source_runtime_closure_queue_2026_07_21", + "path": "references/oracle/source_runtime_closure_queue_2026_07_21.json", + "domain": "source_runtime_closure", + "claim_status": "open_queue", + "consumer_policy": "research_observation_only", + "claim_boundary": "Prioritizes not-fully-invoked source assets such as jyotishganit and VedicAstro KP; queue only, no adapter or truth upgrade." + }, + { + "packet_id": "vedicastro_kp_tmp_env_identity_2026_07_21", + "path": "references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json", + "domain": "kp_precision_timing", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Pins isolated /tmp VedicAstro KP dependency identity; dependency readiness only, no oracle truth." + }, + { + "packet_id": "vedicastro_kp_house_cusp_raw_2026_07_21", + "path": "references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json", + "domain": "kp_precision_timing", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Archives VedicAstro KP house cusp star/sub/sub-sub raw for Steve Jobs public case; observation-only until public numeric worked-example replay." + }, + { + "packet_id": "jyotishganit_three_engine_closure_bridge_2026_07_21", + "path": "references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json", + "domain": "three_engine_parity", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Routes available jyotishganit D2/D4/D9/D10, Panchanga and BAV/SAV fields to closure queues; Shadbala remains explicit gap." + }, + { + "packet_id": "kp_public_worked_example_candidate_queue_2026_07_21", + "path": "references/oracle/kp_public_worked_example_candidate_queue_2026_07_21.json", + "domain": "kp_precision_timing", + "claim_status": "open_queue", + "consumer_policy": "research_observation_only", + "claim_boundary": "Public KP sources were triaged as formula/runtime candidates; none yet provide stable full numeric cusp star/sub/sub-sub rows for oracle upgrade." + }, + { + "packet_id": "jyotishganit_field_closure_rows_2026_07_21", + "path": "references/oracle/jyotishganit_field_closure_rows_2026_07_21.json", + "domain": "three_engine_parity", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Routes jyotishganit D2/D4/D9/D10, Panchanga and BAV/SAV selected raw fields into closure rows; Shadbala remains explicit gap." + }, + { + "packet_id": "three_engine_jyotishganit_bridge_applied_2026_07_21", + "path": "references/oracle/three_engine_jyotishganit_bridge_applied_2026_07_21.json", + "domain": "three_engine_parity", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Applies jyotishganit field bridge to existing TEMCQ D2/D4/D9/D10/BAV/SAV tickets and marks Panchanga as new-ticket-needed; no truth upgrade." + }, + { + "packet_id": "three_engine_field_status_batch_2026_07_21", + "path": "references/oracle/three_engine_field_status_batch_2026_07_21.json", + "domain": "three_engine_parity", + "claim_status": "observation_only", + "consumer_policy": "research_observation_only", + "claim_boundary": "Classifies 18 jyotishganit-applied TEMCQ rows and creates a Panchanga ticket placeholder; status only, no numeric truth upgrade." } ] } diff --git a/references/oracle/jyotishganit_field_closure_rows_2026_07_21.json b/references/oracle/jyotishganit_field_closure_rows_2026_07_21.json new file mode 100644 index 00000000..0d299bd1 --- /dev/null +++ b/references/oracle/jyotishganit_field_closure_rows_2026_07_21.json @@ -0,0 +1,61 @@ +{ + "scope": "jyotishganit_field_closure_rows", + "created_at": "2026-07-21", + "claim_status": "observation_only", + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "source_probe": "scripts/jyotishganit_field_probe.py", + "source_raw_hash": "19fa9ea862b68c4cffb6756fa6cbf0466daf47a8b008b3fe8809e9fc6a1ed30c", + "source_selected_hash": "4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4", + "rows": [ + { + "field": "D2", + "source_path": "selected_raw.varga_sign_table.D2", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "planet_sign_table" + }, + { + "field": "D4", + "source_path": "selected_raw.varga_sign_table.D4", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "planet_sign_table" + }, + { + "field": "D9", + "source_path": "selected_raw.varga_sign_table.D9", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "planet_sign_table" + }, + { + "field": "D10", + "source_path": "selected_raw.varga_sign_table.D10", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "planet_sign_table" + }, + { + "field": "Panchanga", + "source_path": "selected_raw.panchanga", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "schema_and_named_fields" + }, + { + "field": "BAV", + "source_path": "selected_raw.ashtakavarga.bav", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "per_planet_bindus" + }, + { + "field": "SAV", + "source_path": "selected_raw.ashtakavarga.sav", + "closure_status": "ready_for_field_comparison", + "comparison_unit": "sarvashtakavarga_bindus" + } + ], + "explicit_gaps": [ + { + "field": "Shadbala", + "reason": "jyotishganit probe did not expose shadbala/strengths in selected raw" + } + ], + "boundary": "field_rows_only_no_formula_truth" +} diff --git a/references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json b/references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json new file mode 100644 index 00000000..60dd0ee7 --- /dev/null +++ b/references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json @@ -0,0 +1,31 @@ +{ + "scope": "jyotishganit_three_engine_closure_bridge", + "created_at": "2026-07-21", + "claim_status": "observation_only", + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "source_probe": "scripts/jyotishganit_field_probe.py", + "source_raw_hash": "19fa9ea862b68c4cffb6756fa6cbf0466daf47a8b008b3fe8809e9fc6a1ed30c", + "source_selected_hash": "4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4", + "field_routes": { + "ready_for_field_comparison": [ + "D2", + "D4", + "D9", + "D10", + "Panchanga", + "BAV_SAV" + ], + "explicit_gaps": [ + "Shadbala" + ], + "comparison_policy": "route sign/table/schema fields into closure queue only; do not infer formula truth from matching signs" + }, + "next_packet_targets": [ + "three_engine_closure_rows_D2_D4_D9_D10", + "three_engine_closure_rows_panchanga", + "three_engine_closure_rows_bav_sav", + "shadbala_missing_field_gap" + ], + "boundary": "bridge_only_no_truth_upgrade" +} diff --git a/references/oracle/kp_public_worked_example_candidate_queue_2026_07_21.json b/references/oracle/kp_public_worked_example_candidate_queue_2026_07_21.json new file mode 100644 index 00000000..a07e58e0 --- /dev/null +++ b/references/oracle/kp_public_worked_example_candidate_queue_2026_07_21.json @@ -0,0 +1,64 @@ +{ + "scope": "kp_public_worked_example_candidate_queue", + "created_at": "2026-07-21", + "claim_status": "open_queue", + "numeric_oracle_ready_count": 0, + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "runtime_observation_packet": "references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json", + "candidates": [ + { + "id": "astrosage_kp_chapter_2", + "url": "https://kpastrology.astrosage.com/kp-learning-home/tutorial/chapter-2-fundamental-principles", + "candidate_type": "formula_and_text_worked_example", + "useful_fields": [ + "sign lord", + "star lord", + "sub lord", + "significator logic", + "ruling planets text examples" + ], + "has_numeric_cusp_table": false, + "upgrade_status": "reference_only_until_numeric_cusp_rows" + }, + { + "id": "astrosage_kp_sign_star_sub_table", + "url": "https://kpastrology.astrosage.com/kp-learning-home/tutorial/chapter-2-fundamental-principles", + "candidate_type": "reference_table", + "useful_fields": [ + "sign-star-sub division rules", + "KP star/sub conceptual table" + ], + "has_numeric_cusp_table": false, + "upgrade_status": "formula_reference_only" + }, + { + "id": "onlinejyotish_kp_horoscope", + "url": "https://www.onlinejyotish.com/free-astrology/kp-horoscope.aspx", + "candidate_type": "runtime_form_candidate", + "useful_fields": [ + "possible KP horoscope table", + "possible cusp/sub-lord output" + ], + "has_numeric_cusp_table": false, + "upgrade_status": "blocked_until_stable_public_input_output_packet" + }, + { + "id": "astrobix_kp_houses", + "url": "https://astrobix.com/astrosight/1291-houses-in-kp-system.html", + "candidate_type": "runtime_form_candidate", + "useful_fields": [ + "KP house/cusp explanation", + "possible public worked chart context" + ], + "has_numeric_cusp_table": false, + "upgrade_status": "reference_only_until_numeric_rows" + } + ], + "next_actions": [ + "Capture a stable public KP chart with full cusp degree, star lord, sub lord and sub-sub lord rows.", + "Normalize VedicAstro KP raw to the same 12-row table.", + "Only then create a numeric oracle packet; until then KP timing remains observation-only." + ], + "boundary": "public_source_candidate_queue_only_no_kp_numeric_oracle" +} diff --git a/references/oracle/source_runtime_closure_queue_2026_07_21.json b/references/oracle/source_runtime_closure_queue_2026_07_21.json new file mode 100644 index 00000000..73146dc6 --- /dev/null +++ b/references/oracle/source_runtime_closure_queue_2026_07_21.json @@ -0,0 +1,70 @@ +{ + "scope": "source_runtime_closure_queue", + "created_at": "2026-07-21", + "claim_status": "open_queue", + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "source_scan": "references/oracle/whole_machine_jyotish_fragment_scan_2026_07_21.json", + "not_fully_closed_reference_layers": [ + "references/open_source_sources/jyotishganit", + "references/open_source_sources/VedicAstro", + "references/open_source_sources/jaimini-tropical", + "references/open_source_sources/rishi-ai-mcp", + "references/open_source_sources/vedic-astro-skills", + "references/open_source_sources/dashaflow" + ], + "rows": [ + { + "id": "jyotishganit_field_closure", + "source": "references/open_source_sources/jyotishganit", + "existing_probe": "scripts/jyotishganit_field_probe.py", + "existing_test": "tests/test_jyotishganit_and_vedicastro_probes.py", + "current_status": "probe_runs_observation_only", + "latest_observed_raw_hash": "19fa9ea862b68c4cffb6756fa6cbf0466daf47a8b008b3fe8809e9fc6a1ed30c", + "latest_observed_selected_hash": "4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4", + "coverage": { + "panchanga": true, + "D2": true, + "D4": true, + "D9": true, + "D10": true, + "BAV_SAV": true, + "Shadbala": false + }, + "next_closure_step": "attach field-level comparison rows to the three-engine closure queue; keep Shadbala missing as explicit gap" + }, + { + "id": "vedicastro_kp_house_cusp_closure", + "source": "references/open_source_sources/VedicAstro", + "existing_probe": "scripts/vedicastro_kp_house_cusp_probe.py", + "existing_test": "tests/test_vedicastro_kp_runtime_tmp_probe.py", + "current_status": "raw_ready_observation_only", + "next_closure_step": "compare these 12 cusp star/sub/sub-sub rows against public numeric KP worked examples before any event timing use", + "latest_raw_packet": "references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json", + "latest_env_identity": "references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json", + "latest_observed_raw_hash": "2e7a6b17eb2965a60846f625f6bd8bc03555216d6225983647bcbfa23d0e345b", + "coverage": { + "house_cusps": 12, + "rasi": true, + "nakshatra": true, + "rasi_lord": true, + "nakshatra_lord": true, + "sub_lord": true, + "sub_sub_lord": true + } + }, + { + "id": "rishi_ai_mcp_vedic_astro_skills_reference", + "source": "references/open_source_sources/rishi-ai-mcp + references/open_source_sources/vedic-astro-skills", + "current_status": "reference_only_prompt_or_product_flow", + "next_closure_step": "extract skill/process wording only after license/source review; never numeric oracle or formula truth" + }, + { + "id": "jaimini_tropical_dashaflow_reference", + "source": "references/open_source_sources/jaimini-tropical + references/open_source_sources/dashaflow", + "current_status": "reference_only_until_contract", + "next_closure_step": "pin license, version, input contract, raw hash and replay tests before any adapter or truth matrix use" + } + ], + "boundary": "queue_only_no_adapter_or_truth_upgrade" +} diff --git a/references/oracle/technique_promotion_audit_kp_gochara_muhurta_2026_07_19.json b/references/oracle/technique_promotion_audit_kp_gochara_muhurta_2026_07_19.json index 19f41750..60595216 100644 --- a/references/oracle/technique_promotion_audit_kp_gochara_muhurta_2026_07_19.json +++ b/references/oracle/technique_promotion_audit_kp_gochara_muhurta_2026_07_19.json @@ -3,14 +3,14 @@ "items": [ { "claim_boundary": "Panchanga is runtime-visible but still needs field-level external oracle examples for high-rigor claims.", - "current_call_status": "formally_called_in_api_and_web", + "current_call_status": "partial", "external_or_reference_artifacts": [ "references/open_source_sources/panchanga_api" ], "main_artifacts": [ "scripts/jyotish_api_server.py", - "jyotish-app/main.js", - "jyotish-app/index.html" + "frontend/src/app/page.tsx", + "jyotish-app/main.js (research static UI only, absent in commercial repo)" ], "next_action": "add panchanga claim/display contract and source/oracle packet for tithi/nakshatra/yoga/karana/rahu-kalam outputs", "reuse_decision": "do_not_duplicate_runtime", @@ -57,7 +57,7 @@ "production_tuning_allowed": false, "scope": "technique_promotion_audit_kp_gochara_muhurta", "summary": { - "formally_called_count": 1, + "formally_called_count": 0, "items_checked": 4, "reference_only_count": 3 }, diff --git a/references/oracle/three_engine_jyotishganit_bridge_applied_2026_07_21.json b/references/oracle/three_engine_jyotishganit_bridge_applied_2026_07_21.json new file mode 100644 index 00000000..e49eb61d --- /dev/null +++ b/references/oracle/three_engine_jyotishganit_bridge_applied_2026_07_21.json @@ -0,0 +1,190 @@ +{ + "scope": "three_engine_jyotishganit_bridge_applied", + "created_at": "2026-07-21", + "claim_status": "observation_only", + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "source_bridge": "references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json", + "source_queue": "references/oracle/three_engine_mismatch_closure_queue_2026_07_19.json", + "source_selected_hash": "4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4", + "summary": { + "existing_ticket_rows": 18, + "no_existing_ticket_rows": 1, + "truth_upgrades": 0 + }, + "rows": [ + { + "source_field": "D2", + "field": "Sun.sign", + "existing_ticket_id": "TEMCQ-001", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Moon.sign", + "existing_ticket_id": "TEMCQ-002", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Mars.sign", + "existing_ticket_id": "TEMCQ-003", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Mercury.sign", + "existing_ticket_id": "TEMCQ-004", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Jupiter.sign", + "existing_ticket_id": "TEMCQ-005", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Venus.sign", + "existing_ticket_id": "TEMCQ-006", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D2", + "field": "Saturn.sign", + "existing_ticket_id": "TEMCQ-007", + "existing_ticket_section": "D2", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D4", + "field": "Moon.sign", + "existing_ticket_id": "TEMCQ-008", + "existing_ticket_section": "D4", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D9", + "field": "Moon.sign", + "existing_ticket_id": "TEMCQ-009", + "existing_ticket_section": "D9", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "D10", + "field": "Moon.sign", + "existing_ticket_id": "TEMCQ-010", + "existing_ticket_section": "D10", + "owner_track": "endpoint_contract", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Sun", + "existing_ticket_id": "TEMCQ-011", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Moon", + "existing_ticket_id": "TEMCQ-012", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Mars", + "existing_ticket_id": "TEMCQ-013", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Mercury", + "existing_ticket_id": "TEMCQ-014", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Jupiter", + "existing_ticket_id": "TEMCQ-015", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Venus", + "existing_ticket_id": "TEMCQ-016", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "BAV", + "field": "Saturn", + "existing_ticket_id": "TEMCQ-017", + "existing_ticket_section": "ashtakavarga_bav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "SAV", + "field": "12_sign_scores", + "existing_ticket_id": "TEMCQ-018", + "existing_ticket_section": "ashtakavarga_sav", + "owner_track": "worked_example", + "closure_status": "ready_for_field_comparison", + "claim_boundary": "field_comparison_only_no_formula_truth" + }, + { + "source_field": "Panchanga", + "field": "Panchanga", + "existing_ticket_id": null, + "existing_ticket_section": null, + "owner_track": "new_ticket_required", + "closure_status": "no_existing_ticket_create_next", + "claim_boundary": "field_comparison_only_no_formula_truth" + } + ], + "boundary": "applied_bridge_only_no_truth_upgrade", + "human_report": "docs/research/three_engine_jyotishganit_bridge_applied_2026_07_21.md" +} diff --git a/references/oracle/truth_source_runtime_identity_2026_07_21.json b/references/oracle/truth_source_runtime_identity_2026_07_21.json new file mode 100644 index 00000000..51589391 --- /dev/null +++ b/references/oracle/truth_source_runtime_identity_2026_07_21.json @@ -0,0 +1,54 @@ +{ + "scope": "truth_source_runtime_identity", + "created_at": "2026-07-21", + "status": "active_contract_v1", + "truth_source": { + "path": "/Users/wuyongnaren/Documents/印度占星", + "role": "sole_main_research_truth_source", + "branch_at_capture": "main", + "git_commit": "737683edc976d28558d81737501943790da07b34", + "git_commit_semantics": "commit at packet capture time; later packet commits supersede this value through git history" + }, + "skill": { + "path": "SKILL.md", + "version": "6.9.14" + }, + "evidence_packets": { + "index_path": "references/oracle/evidence_packet_index_2026_07_19.json", + "packet_count": 106, + "blocked_or_partial_count": 51, + "human_review_required_count": 3 + }, + "oracle_summary": { + "production_tuning_allowed": false, + "truth_matrix_allowed": false, + "vedastro_hosted_identity": "blocked", + "timing_holdout": "blocked_until_independent_human_labels", + "sphuta_oss_probe": "tooling_observation_only", + "three_engine_parity": "open_queue" + }, + "runtime_contract": { + "research_web_panel_required": true, + "commercial_startup_self_check_required": true, + "commercial_ci_golden_case_required": "pyjhora_jhora_sphuta_probe", + "must_not_accept_legacy_workbuddy_as_truth_source": true + }, + "fragment_quarantine": { + "workbuddy_old_copies": { + "status": "quarantined", + "labels": [ + "not_for_truth_source", + "privacy_review_required", + "artifact_incomplete", + "historical_fragment_only" + ], + "paths": [ + "/Users/wuyongnaren/WorkBuddy/2026-07-05-19-03-49/yinduzhanxing", + "/Users/wuyongnaren/.workbuddy/backups/jyotish-vedic-astrology-20260711-154109", + "/Users/wuyongnaren/.workbuddy/backups/jyotish-vedic-astrology-retired-20260711-154109" + ], + "boundary": "May be read as fragment candidates only after ledger review; never a runtime, oracle, commercial, or truth source." + } + }, + "claim_boundary": "identity_ready_governance_only_not_oracle_truth" +} diff --git a/references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json b/references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json new file mode 100644 index 00000000..4aec2c59 --- /dev/null +++ b/references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json @@ -0,0 +1,220 @@ +{ + "boundary": "KP house cusp star/sub/sub-sub raw from VedicAstro runtime. Observation-only until matched against a public numeric KP worked example.", + "claim_status": "observation_only", + "created_at": "2026-07-19", + "dependency_identity": { + "flatlib": "0.3.1.dev0", + "observed_pinned_flatlib_commit": "2618c348ce1ab2588548f935ff65f031630b4872", + "polars": "1.42.1", + "required_flatlib_source": "git+https://github.com/diliprk/flatlib.git@sidereal", + "timezonefinder": "8.2.5" + }, + "engine": "VedicAstro", + "production_tuning_allowed": false, + "raw": { + "houses": [ + { + "DegSize": 26.059, + "HouseNr": 1, + "LonDecDeg": 149.434, + "Nakshatra": "UttaraPhalgunī", + "NakshatraLord": "Sun", + "Object": "I", + "Rasi": "Leo", + "RasiLord": "Sun", + "SignLonDMS": "+29:26:02", + "SignLonDecDeg": 29.434, + "SubLord": "Rahu", + "SubSubLord": "Rahu" + }, + { + "DegSize": 30.141, + "HouseNr": 2, + "LonDecDeg": 175.493, + "Nakshatra": "Chitra", + "NakshatraLord": "Mars", + "Object": "II", + "Rasi": "Virgo", + "RasiLord": "Mercury", + "SignLonDMS": "+25:29:35", + "SignLonDecDeg": 25.493, + "SubLord": "Rahu", + "SubSubLord": "Venus" + }, + { + "DegSize": 32.894, + "HouseNr": 3, + "LonDecDeg": 205.634, + "Nakshatra": "Vishakha", + "NakshatraLord": "Jupiter", + "Object": "III", + "Rasi": "Libra", + "RasiLord": "Venus", + "SignLonDMS": "+25:38:01", + "SignLonDecDeg": 25.634, + "SubLord": "Mercury", + "SubSubLord": "Saturn" + }, + { + "DegSize": 33.066, + "HouseNr": 4, + "LonDecDeg": 238.527, + "Nakshatra": "Jyeshtha", + "NakshatraLord": "Mercury", + "Object": "IV", + "Rasi": "Scorpio", + "RasiLord": "Mars", + "SignLonDMS": "+28:31:38", + "SignLonDecDeg": 28.527, + "SubLord": "Saturn", + "SubSubLord": "Ketu" + }, + { + "DegSize": 30.713, + "HouseNr": 5, + "LonDecDeg": 271.594, + "Nakshatra": "UttaraAshadha", + "NakshatraLord": "Sun", + "Object": "V", + "Rasi": "Capricorn", + "RasiLord": "Saturn", + "SignLonDMS": "+01:35:37", + "SignLonDecDeg": 1.594, + "SubLord": "Jupiter", + "SubSubLord": "Saturn" + }, + { + "DegSize": 27.128, + "HouseNr": 6, + "LonDecDeg": 302.306, + "Nakshatra": "Dhanishta", + "NakshatraLord": "Mars", + "Object": "VI", + "Rasi": "Aquarius", + "RasiLord": "Saturn", + "SignLonDMS": "+02:18:22", + "SignLonDecDeg": 2.306, + "SubLord": "Ketu", + "SubSubLord": "Rahu" + }, + { + "DegSize": 26.059, + "HouseNr": 7, + "LonDecDeg": 329.434, + "Nakshatra": "PurvaBhādrapadā", + "NakshatraLord": "Jupiter", + "Object": "VII", + "Rasi": "Aquarius", + "RasiLord": "Saturn", + "SignLonDMS": "+29:26:02", + "SignLonDecDeg": 29.434, + "SubLord": "Sun", + "SubSubLord": "Venus" + }, + { + "DegSize": 30.141, + "HouseNr": 8, + "LonDecDeg": 355.493, + "Nakshatra": "Revati", + "NakshatraLord": "Mercury", + "Object": "VIII", + "Rasi": "Pisces", + "RasiLord": "Jupiter", + "SignLonDMS": "+25:29:35", + "SignLonDecDeg": 25.493, + "SubLord": "Rahu", + "SubSubLord": "Venus" + }, + { + "DegSize": 32.894, + "HouseNr": 9, + "LonDecDeg": 25.634, + "Nakshatra": "Bharani", + "NakshatraLord": "Venus", + "Object": "IX", + "Rasi": "Aries", + "RasiLord": "Mars", + "SignLonDMS": "+25:38:01", + "SignLonDecDeg": 25.634, + "SubLord": "Mercury", + "SubSubLord": "Saturn" + }, + { + "DegSize": 33.066, + "HouseNr": 10, + "LonDecDeg": 58.527, + "Nakshatra": "Mrigashīrsha", + "NakshatraLord": "Mars", + "Object": "X", + "Rasi": "Taurus", + "RasiLord": "Venus", + "SignLonDMS": "+28:31:38", + "SignLonDecDeg": 28.527, + "SubLord": "Saturn", + "SubSubLord": "Ketu" + }, + { + "DegSize": 30.713, + "HouseNr": 11, + "LonDecDeg": 91.594, + "Nakshatra": "Punarvasu", + "NakshatraLord": "Jupiter", + "Object": "XI", + "Rasi": "Cancer", + "RasiLord": "Moon", + "SignLonDMS": "+01:35:37", + "SignLonDecDeg": 1.594, + "SubLord": "Rahu", + "SubSubLord": "Rahu" + }, + { + "DegSize": 27.128, + "HouseNr": 12, + "LonDecDeg": 122.306, + "Nakshatra": "Maghā", + "NakshatraLord": "Ketu", + "Object": "XII", + "Rasi": "Leo", + "RasiLord": "Sun", + "SignLonDMS": "+02:18:22", + "SignLonDecDeg": 2.306, + "SubLord": "Venus", + "SubSubLord": "Saturn" + } + ], + "request": { + "ayanamsa": "Krishnamurti", + "day": 24, + "hour": 19, + "house_system": "Placidus", + "latitude": 37.3382, + "longitude": -122.0383, + "minute": 15, + "month": 2, + "second": 0, + "timezone": "America/Los_Angeles", + "year": 1955 + } + }, + "raw_hash": "2e7a6b17eb2965a60846f625f6bd8bc03555216d6225983647bcbfa23d0e345b", + "schema_fingerprint": { + "fields": [ + "Object", + "HouseNr", + "Rasi", + "LonDecDeg", + "SignLonDMS", + "SignLonDecDeg", + "DegSize", + "Nakshatra", + "RasiLord", + "NakshatraLord", + "SubLord", + "SubSubLord" + ], + "house_count": 12 + }, + "scope": "vedicastro_kp_house_cusp_probe", + "status": "complete", + "truth_matrix_allowed": false +} diff --git a/references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json b/references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json new file mode 100644 index 00000000..f5a8ba0a --- /dev/null +++ b/references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json @@ -0,0 +1,23 @@ +{ + "boundary": "dependency_preparation_only_no_kp_oracle_truth", + "claim_status": "runtime_dependency_ready", + "created_at": "2026-07-21", + "package_versions": { + "flatlib": "0.3.1.dev0", + "polars": "1.42.1", + "pyswisseph": "2.10.3.2", + "timezonefinder": "8.2.5" + }, + "production_tuning_allowed": false, + "project_dependency_mutation_allowed": false, + "required_packages": { + "flatlib": "git+https://github.com/diliprk/flatlib.git@sidereal#egg=flatlib", + "polars": "polars", + "pyswisseph": "pyswisseph", + "timezonefinder": "timezonefinder" + }, + "scope": "vedicastro_kp_tmp_env_preparer", + "target": "/tmp/vedicastro_flatlib_probe", + "target_tree_hash": "7a75855cd9f641a30a4d466d44a282571e3d797c39de0d975f5f6647a3e1bf74", + "truth_matrix_allowed": false +} diff --git a/scripts/jyotishganit_field_probe.py b/scripts/jyotishganit_field_probe.py new file mode 100644 index 00000000..4a2f1344 --- /dev/null +++ b/scripts/jyotishganit_field_probe.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +"""Run a local jyotishganit same-case raw field probe. + +Observation-only: records raw/hash/schema for D2/D4/D9/D10, Panchanga, +BAV/SAV and Shadbala availability without promoting truth. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +import sys +from datetime import datetime +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[1] +JYOTISHGANIT_ROOT = ROOT / "references/open_source_sources/jyotishganit" +TARGET_VARGAS = ["d2", "d4", "d9", "d10"] + + +def stable_json(data: Any) -> str: + return json.dumps(data, ensure_ascii=False, sort_keys=True, separators=(",", ":"), default=str) + + +def schema_fingerprint(data: Any) -> Any: + if isinstance(data, dict): + return {k: schema_fingerprint(v) for k, v in sorted(data.items())} + if isinstance(data, list): + if not data: + return [] + return [schema_fingerprint(data[0])] + return type(data).__name__ + + +def sign_table(chart: dict[str, Any]) -> dict[str, Any]: + out: dict[str, Any] = {} + for code in TARGET_VARGAS: + section = chart.get("divisionalCharts", {}).get(code) + if not isinstance(section, dict): + out[code.upper()] = {"status": "missing"} + continue + rows = [] + for house in section.get("houses", []): + for occ in house.get("occupants", []): + rows.append( + { + "planet": occ.get("celestialBody"), + "sign": occ.get("sign"), + "d1HousePlacement": occ.get("d1HousePlacement"), + } + ) + out[code.upper()] = { + "status": "present", + "ascendant_sign": section.get("ascendant", {}).get("sign"), + "planet_signs": sorted(rows, key=lambda r: str(r.get("planet"))), + } + return out + + +def build_probe(args: argparse.Namespace) -> dict[str, Any]: + sys.path.insert(0, str(JYOTISHGANIT_ROOT)) + from jyotishganit.main import calculate_birth_chart # type: ignore + + dt = datetime.fromisoformat(args.datetime) + chart = calculate_birth_chart(dt, args.latitude, args.longitude, args.timezone, args.location, args.name) + raw = chart.to_dict() + selected = { + "panchanga": raw.get("panchanga"), + "varga_sign_table": sign_table(raw), + "ashtakavarga": raw.get("ashtakavarga"), + "shadbala": raw.get("shadbala"), + "strengths": raw.get("strengths"), + } + payload = { + "scope": "jyotishganit_field_probe", + "created_at": "2026-07-19", + "status": "complete", + "claim_status": "observation_only", + "production_tuning_allowed": False, + "truth_matrix_allowed": False, + "engine": { + "name": "jyotishganit", + "local_path": str(JYOTISHGANIT_ROOT.relative_to(ROOT)), + }, + "request": { + "name": args.name, + "datetime": args.datetime, + "latitude": args.latitude, + "longitude": args.longitude, + "timezone": args.timezone, + "location": args.location, + }, + "coverage": { + "panchanga": raw.get("panchanga") is not None, + "D2": selected["varga_sign_table"]["D2"]["status"] == "present", + "D4": selected["varga_sign_table"]["D4"]["status"] == "present", + "D9": selected["varga_sign_table"]["D9"]["status"] == "present", + "D10": selected["varga_sign_table"]["D10"]["status"] == "present", + "BAV_SAV": isinstance(raw.get("ashtakavarga"), dict) + and "sav" in raw.get("ashtakavarga", {}), + "Shadbala": raw.get("shadbala") is not None or raw.get("strengths") is not None, + }, + "raw_hash": hashlib.sha256(stable_json(raw).encode("utf-8")).hexdigest(), + "selected_hash": hashlib.sha256(stable_json(selected).encode("utf-8")).hexdigest(), + "schema_fingerprint": schema_fingerprint(selected), + "selected_raw": selected, + "boundary": "Raw/hash observation only. Missing Shadbala field or matching signs do not prove formula truth or production timing readiness.", + } + return payload + + +def main() -> int: + ap = argparse.ArgumentParser() + ap.add_argument("--datetime", default="1955-02-24T19:15:00") + ap.add_argument("--latitude", type=float, default=37.3382) + ap.add_argument("--longitude", type=float, default=-122.0383) + ap.add_argument("--timezone", type=float, default=-8.0) + ap.add_argument("--location", default="San Francisco, CA") + ap.add_argument("--name", default="Steve Jobs public") + ap.add_argument("--output") + args = ap.parse_args() + payload = build_probe(args) + text = json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + if args.output: + Path(args.output).write_text(text + "\n", encoding="utf-8") + print(text) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/jyotishganit_mismatch_attribution_queue.py b/scripts/jyotishganit_mismatch_attribution_queue.py new file mode 100644 index 00000000..5bf5fbe6 --- /dev/null +++ b/scripts/jyotishganit_mismatch_attribution_queue.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Classify local vs jyotishganit comparison mismatches without resolving truth.""" +from __future__ import annotations + +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +DEFAULT = ROOT / "references/oracle/jyotishganit_vs_local_field_comparison_steve_jobs_2026_07_19.json" + + +def classify(row: dict) -> dict: + section = row["section"] + body = row["body"] + reason = "needs_formula_variant_review" + owner = "varga_formula_attribution" + if section == "D4": + reason = "schema_alias_or_formula_variant" + owner = "D4_Turyamsa_Chaturthamsa_alias_and_formula" + if section == "D10" and body in {"Rahu", "Ketu"}: + reason = "node_mode_or_shadow_planet_handling" + owner = "node_mode_mapping" + return { + **row, + "attribution_status": "queued", + "probable_reason": reason, + "next_evidence_owner": owner, + "claim_boundary": "Do not tune local formula to jyotishganit until source formula, ayanamsa, node mode, and schema aliases are pinned.", + } + + +def build(path: Path = DEFAULT) -> dict: + data = json.loads(path.read_text(encoding="utf-8")) + mismatches = [classify(r) for r in data["rows"] if r["status"] == "mismatch"] + return { + "scope": "jyotishganit_mismatch_attribution_queue", + "created_at": "2026-07-19", + "status": "queue_ready", + "claim_status": "partial", + "production_tuning_allowed": False, + "truth_matrix_allowed": False, + "source_comparison": str(path.relative_to(ROOT)), + "summary": { + "mismatch_count": len(mismatches), + "by_reason": { + reason: sum(1 for r in mismatches if r["probable_reason"] == reason) + for reason in sorted({r["probable_reason"] for r in mismatches}) + }, + }, + "rows": mismatches, + "boundary": "This queue classifies mismatch work; it does not settle formula truth.", + } + + +def main() -> int: + print(json.dumps(build(), ensure_ascii=False, indent=2, sort_keys=True)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/prepare_vedicastro_kp_tmp_env.py b/scripts/prepare_vedicastro_kp_tmp_env.py new file mode 100644 index 00000000..9cc0737f --- /dev/null +++ b/scripts/prepare_vedicastro_kp_tmp_env.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python3 +"""Prepare an isolated temporary dependency path for VedicAstro KP probes. + +Installs only under /tmp/vedicastro_flatlib_probe. Never mutates project +requirements, venvs, package-locks, or runtime dependencies. +""" +from __future__ import annotations + +import argparse +import hashlib +import importlib.metadata +import json +import shutil +import subprocess +import sys +from pathlib import Path +from typing import Any + + +TARGET = Path("/tmp/vedicastro_flatlib_probe") +REQUIRED_PACKAGES = { + "flatlib": "git+https://github.com/diliprk/flatlib.git@sidereal#egg=flatlib", + "polars": "polars", + "timezonefinder": "timezonefinder", + "pyswisseph": "pyswisseph", +} + + +def stable(data: Any) -> str: + return json.dumps(data, ensure_ascii=False, sort_keys=True, separators=(",", ":"), default=str) + + +def digest_tree(path: Path) -> str | None: + if not path.exists(): + return None + h = hashlib.sha256() + for file in sorted(p for p in path.rglob("*") if p.is_file()): + rel = file.relative_to(path).as_posix() + h.update(rel.encode("utf-8")) + try: + h.update(file.read_bytes()) + except OSError: + continue + return h.hexdigest() + + +def package_versions(target: Path) -> dict[str, str | None]: + sys.path.insert(0, str(target)) + versions: dict[str, str | None] = {} + for name in REQUIRED_PACKAGES: + try: + versions[name] = importlib.metadata.version(name) + except importlib.metadata.PackageNotFoundError: + versions[name] = None + return versions + + +def install(target: Path) -> dict[str, Any]: + target.mkdir(parents=True, exist_ok=True) + cmd = [ + sys.executable, + "-m", + "pip", + "install", + "--upgrade", + "--target", + str(target), + *REQUIRED_PACKAGES.values(), + ] + proc = subprocess.run(cmd, text=True, capture_output=True, timeout=180) + return { + "command": cmd, + "returncode": proc.returncode, + "stdout_tail": proc.stdout[-4000:], + "stderr_tail": proc.stderr[-4000:], + } + + +def build_payload(target: Path, install_result: dict[str, Any] | None = None) -> dict[str, Any]: + versions = package_versions(target) if target.exists() else {name: None for name in REQUIRED_PACKAGES} + ready = all(versions.values()) + payload: dict[str, Any] = { + "scope": "vedicastro_kp_tmp_env_preparer", + "created_at": "2026-07-21", + "target": str(target), + "project_dependency_mutation_allowed": False, + "required_packages": REQUIRED_PACKAGES, + "package_versions": versions, + "target_tree_hash": digest_tree(target), + "claim_status": "runtime_dependency_ready" if ready else "blocked_runtime_dependency", + "production_tuning_allowed": False, + "truth_matrix_allowed": False, + "boundary": "dependency_preparation_only_no_kp_oracle_truth", + } + if install_result is not None: + payload["install_result"] = install_result + return payload + + +def main() -> int: + ap = argparse.ArgumentParser() + ap.add_argument("--target", default=str(TARGET)) + ap.add_argument("--report-only", action="store_true") + ap.add_argument("--clean", action="store_true") + args = ap.parse_args() + target = Path(args.target) + if args.clean and target.exists() and str(target).startswith("/tmp/"): + shutil.rmtree(target) + install_result = None if args.report_only else install(target) + payload = build_payload(target, install_result) + print(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True)) + return 0 if args.report_only or payload["claim_status"] == "runtime_dependency_ready" else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/technique_promotion_audit_kp_gochara_muhurta.py b/scripts/technique_promotion_audit_kp_gochara_muhurta.py new file mode 100644 index 00000000..5a947fb9 --- /dev/null +++ b/scripts/technique_promotion_audit_kp_gochara_muhurta.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +"""Audit KP/Gochara/Muhurta/Panchanga fragments and runtime entrypoints.""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path + + +def _text(path: Path) -> str: + return path.read_text(encoding="utf-8", errors="ignore") if path.exists() else "" + + +def build_audit(root: Path) -> dict: + api = _text(root / "scripts/jyotish_api_server.py") + research_main_js = _text(root / "jyotish-app/main.js") + commercial_page = _text(root / "frontend/src/app/page.tsx") + dashaflow_muhurtha = root / "references/open_source_sources/dashaflow/muhurtha.py" + panchanga_license = _text(root / "references/open_source_sources/panchanga_api/LICENSE").splitlines() + kp_reference = root / "/Users/wuyongnaren/.workbuddy/backups/jyotish-vedic-astrology-20260711-154109/references/kp-astrology-complete-system.md" + gochara_template = Path("/tmp/jyotisha-optimize/assets/event_timing_template.md") + panchanga_called = ( + "/api/panchanga_range" in api + and ( + ("panchanga-range" in research_main_js and "panchanga-csv" in research_main_js) + or ("panchanga-range" in commercial_page and "panchanga-csv" in commercial_page) + ) + ) + + items = [ + { + "technique_id": "panchanga_calendar", + "current_call_status": "formally_called_in_api_and_web" if panchanga_called else "partial", + "main_artifacts": [ + "scripts/jyotish_api_server.py", + "frontend/src/app/page.tsx", + "jyotish-app/main.js (research static UI only, absent in commercial repo)", + ], + "external_or_reference_artifacts": ["references/open_source_sources/panchanga_api"], + "reuse_decision": "do_not_duplicate_runtime", + "source_or_license_boundary": "Existing runtime/UI present; panchanga_api license observed as " + + (panchanga_license[0] if panchanga_license else "unknown") + + ". Treat external panchanga_api as reference unless license/API contract is separately audited.", + "next_action": "add panchanga claim/display contract and source/oracle packet for tithi/nakshatra/yoga/karana/rahu-kalam outputs", + "claim_boundary": "Panchanga is runtime-visible but still needs field-level external oracle examples for high-rigor claims.", + }, + { + "technique_id": "muhurta_dashaflow_candidate", + "current_call_status": "oss_reference_not_main_runtime", + "main_artifacts": [], + "external_or_reference_artifacts": [str(dashaflow_muhurtha)], + "reuse_decision": "license_audit_before_reuse", + "source_or_license_boundary": "dashaflow/muhurtha.py exists under references/open_source_sources; verify license and formula sources before adapting.", + "next_action": "audit dashaflow license, extract formula surface, then compare Tarabala/Chandrabala/Rahu Kalam against local Panchanga.", + "claim_boundary": "Muhurta remains reference-only until license, formula, and worked examples close.", + }, + { + "technique_id": "kp_astrology", + "current_call_status": "reference_only_not_main_runtime", + "main_artifacts": [], + "external_or_reference_artifacts": [str(kp_reference)], + "reuse_decision": "reference_only", + "source_or_license_boundary": "KP backup/reference may contain useful notes but must pass privacy/license/source audit; do not copy blindly.", + "next_action": "create KP separate track: cusp system, ayanamsa, star lord/sub lord, ruling planets, public oracle examples.", + "claim_boundary": "KP is not part of current main Jyotish runtime truth.", + }, + { + "technique_id": "gochara_event_timing_template", + "current_call_status": "template_reference_not_main_runtime", + "main_artifacts": [], + "external_or_reference_artifacts": [str(gochara_template)], + "reuse_decision": "reference_only", + "source_or_license_boundary": "Template in /tmp must be privacy/source reviewed before promotion.", + "next_action": "turn Gochara template into scoring contract only after Dasha+Varga+Transit features and negative holdout are ready.", + "claim_boundary": "Transit template is not a calibrated timing engine.", + }, + ] + return { + "scope": "technique_promotion_audit_kp_gochara_muhurta", + "created_at": "2026-07-19", + "truth_policy": "runtime_presence_not_oracle_closure", + "production_tuning_allowed": False, + "summary": { + "items_checked": len(items), + "formally_called_count": sum("formally_called" in item["current_call_status"] for item in items), + "reference_only_count": sum("not_main_runtime" in item["current_call_status"] or "template_reference" in item["current_call_status"] for item in items), + }, + "items": items, + } + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=Path(".")) + parser.add_argument("--output", type=Path) + args = parser.parse_args() + audit = build_audit(args.root) + text = json.dumps(audit, ensure_ascii=False, indent=2, sort_keys=True) + "\n" + if args.output: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(text, encoding="utf-8") + print(text, end="") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/three_engine_high_rigor_parity.py b/scripts/three_engine_high_rigor_parity.py index e8b637d0..e0d2c58f 100644 --- a/scripts/three_engine_high_rigor_parity.py +++ b/scripts/three_engine_high_rigor_parity.py @@ -13,9 +13,6 @@ from typing import Any ROOT = Path(__file__).resolve().parents[1] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) -SCRIPTS = ROOT / "scripts" -if str(SCRIPTS) not in sys.path: - sys.path.insert(0, str(SCRIPTS)) from benchmarks.jyotish.scripts.run_pyjhora_compare import build_pyjhora_sample from benchmarks.jyotish.scripts.run_skill_baseline import run_sample diff --git a/scripts/three_engine_mismatch_arbitrator.py b/scripts/three_engine_mismatch_arbitrator.py index cdace7d1..f187d22b 100644 --- a/scripts/three_engine_mismatch_arbitrator.py +++ b/scripts/three_engine_mismatch_arbitrator.py @@ -82,16 +82,52 @@ def arbitrate_manifest(path: str | Path) -> dict[str, Any]: } +def render_markdown_report(report: dict[str, Any]) -> str: + lines = [ + "# Three-engine mismatch arbitration", + "", + f"manifest: `{report['manifest_path']}`", + f"status: `{report['status']}`", + f"truth_policy: `{report['truth_policy']}`", + "commercial_sync: `status_and_claim_boundary_only`", + f"mismatch_count: `{report['mismatch_count']}`", + f"classified_count: `{report['classified_count']}`", + f"unclassified_count: `{report['unclassified_count']}`", + "", + "Do not copy raw research debt into commercial runtime. Commercial receives readiness, claim boundary, and user-safe status only.", + "", + "## Category counts", + "", + "| category | count |", + "|---|---:|", + ] + for category, count in report["category_counts"].items(): + lines.append(f"| `{category}` | {count} |") + lines.extend(["", "## Closure requirements", ""]) + seen: set[str] = set() + for row in report["rows"]: + category = row["category"] + if category in seen: + continue + seen.add(category) + lines.append(f"- `{category}`: {row['closure_requirement']}") + return "\n".join(lines) + "\n" + + def main() -> int: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("manifest", nargs="?", default="references/oracle/three_engine_parity_replay_manifest.json") parser.add_argument("--output", type=Path) + parser.add_argument("--markdown-output", type=Path) args = parser.parse_args() report = arbitrate_manifest(args.manifest) text = json.dumps(report, ensure_ascii=False, indent=2, sort_keys=True) + "\n" if args.output: args.output.parent.mkdir(parents=True, exist_ok=True) args.output.write_text(text, encoding="utf-8") + if args.markdown_output: + args.markdown_output.parent.mkdir(parents=True, exist_ok=True) + args.markdown_output.write_text(render_markdown_report(report), encoding="utf-8") print(text, end="") return 0 diff --git a/scripts/three_engine_mismatch_closure_queue.py b/scripts/three_engine_mismatch_closure_queue.py new file mode 100644 index 00000000..e4b5f08e --- /dev/null +++ b/scripts/three_engine_mismatch_closure_queue.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""Create actionable closure tickets for three-engine mismatch rows.""" +from __future__ import annotations + +import argparse +import json +from collections import Counter +from pathlib import Path +from typing import Any + + +POLICY = { + "endpoint_or_varga_semantics": ("P0", "endpoint_contract", "identified endpoint/method contract with ayanamsa, node mode, varga, timezone semantics"), + "shadbala_formula_variant": ("P0", "formula_source", "public formula source + unit/cap/floor evidence for the component"), + "derived_total_from_component_variants": ("P1", "unit_schema", "component closure before total recomputation; explicit Rupa/Virupa total rule"), + "ashtakavarga_table_or_contributor_variant": ("P1", "worked_example", "public worked BAV/SAV table with contributor set, shodhana state, and Lagna inclusion"), +} + + +def build_queue(arbitration_path: str | Path) -> dict[str, Any]: + path = Path(arbitration_path) + report = json.loads(path.read_text(encoding="utf-8")) + tickets = [] + for index, row in enumerate(report.get("rows") or [], start=1): + priority, owner_track, required = POLICY.get( + row["category"], + ("P2", "worked_example", "manual source review and worked example required"), + ) + tickets.append({ + "ticket_id": f"TEMCQ-{index:03d}", + "priority": priority, + "owner_track": owner_track, + "section": row.get("section"), + "field": row.get("field"), + "category": row.get("category"), + "differing_engines": row.get("differing_engines") or [], + "required_evidence": required, + "closure_status": "open", + "commercial_visibility": "do_not_expose_raw", + }) + return { + "scope": "three_engine_mismatch_closure_queue", + "source_arbitration": str(path), + "status": "open" if tickets else "empty", + "truth_policy": "no_majority_vote", + "production_tuning_allowed": False, + "summary": { + "source_mismatch_count": report.get("mismatch_count", 0), + "queue_count": len(tickets), + "priority_counts": dict(Counter(ticket["priority"] for ticket in tickets)), + "owner_track_counts": dict(Counter(ticket["owner_track"] for ticket in tickets)), + }, + "queue": tickets, + } + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("arbitration", nargs="?", default="references/oracle/three_engine_mismatch_arbitration_2026_07_19.json") + parser.add_argument("--output", type=Path) + args = parser.parse_args() + queue = build_queue(args.arbitration) + text = json.dumps(queue, ensure_ascii=False, indent=2, sort_keys=True) + "\n" + if args.output: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(text, encoding="utf-8") + print(text, end="") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/test_commercial_startup_self_check_contract.py b/tests/test_commercial_startup_self_check_contract.py new file mode 100644 index 00000000..30dbe945 --- /dev/null +++ b/tests/test_commercial_startup_self_check_contract.py @@ -0,0 +1,44 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +CONTRACT = ROOT / "references/oracle/commercial_startup_self_check_contract_2026_07_21.json" +GOLDEN = ROOT / "references/oracle/commercial_golden_oss_case_ci_contract_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_commercial_startup_self_check_contract_requires_truth_source_identity(): + contract = json.loads(CONTRACT.read_text(encoding="utf-8")) + + assert contract["scope"] == "commercial_startup_self_check_contract" + required = set(contract["required_fields"]) + assert { + "truth_source_path", + "truth_source_git_commit", + "skill_version", + "evidence_packet_count", + "artifact_gate_status", + "privacy_artifact_status", + "oracle_ready_summary", + }.issubset(required) + assert contract["reject_if"]["truth_source_path_contains"] == ["/WorkBuddy/", "/.workbuddy/"] + assert contract["claim_boundary"] == "startup_identity_gate_only_not_business_runtime" + + +def test_commercial_golden_oss_ci_contract_uses_pyjhora_sphuta_probe(): + contract = json.loads(GOLDEN.read_text(encoding="utf-8")) + + assert contract["scope"] == "commercial_golden_oss_case_ci_contract" + assert contract["golden_case"]["probe"] == "scripts/prashna_sphuta_oss_case_probe.py" + assert contract["golden_case"]["expected_raw_hash"] == "f0705d205440ea8d7f39116042a0723d971f4ab79c94f7d448fc42d683d52326" + assert contract["gate_policy"]["truth_upgrade_allowed"] is False + assert contract["gate_policy"]["fail_if_probe_missing"] is True + + +def test_commercial_contracts_are_registered_in_evidence_index(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + ids = {row["packet_id"] for row in index["packets"]} + + assert "commercial_startup_self_check_contract_2026_07_21" in ids + assert "commercial_golden_oss_case_ci_contract_2026_07_21" in ids diff --git a/tests/test_jyotishganit_and_vedicastro_probes.py b/tests/test_jyotishganit_and_vedicastro_probes.py new file mode 100644 index 00000000..87406a3e --- /dev/null +++ b/tests/test_jyotishganit_and_vedicastro_probes.py @@ -0,0 +1,56 @@ +import json +import subprocess +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_jyotishganit_field_probe_outputs_raw_hash_and_required_sections(): + out = subprocess.check_output(["python3", "scripts/jyotishganit_field_probe.py"], cwd=ROOT, text=True) + data = json.loads(out) + assert data["scope"] == "jyotishganit_field_probe" + assert data["claim_status"] == "observation_only" + assert data["production_tuning_allowed"] is False + assert data["truth_matrix_allowed"] is False + assert data["raw_hash"] + assert data["selected_hash"] + for key in ["panchanga", "D2", "D4", "D9", "D10", "BAV_SAV", "Shadbala"]: + assert key in data["coverage"] + assert data["coverage"]["D2"] is True + assert data["coverage"]["D4"] is True + assert data["coverage"]["D9"] is True + assert data["coverage"]["D10"] is True + assert data["coverage"]["panchanga"] is True + assert data["coverage"]["BAV_SAV"] is True + assert data["coverage"]["Shadbala"] is False + + +def test_vedicastro_kp_api_probe_is_observation_only_even_when_import_blocks(): + out = subprocess.check_output(["python3", "scripts/vedicastro_kp_api_probe.py"], cwd=ROOT, text=True) + data = json.loads(out) + assert data["scope"] == "vedicastro_kp_api_probe" + assert data["claim_status"] == "observation_only" + assert data["source_sha256"] + assert "get_rl_nl_sl_data" in data["api_surface"]["methods"] + assert data["runtime_probe"]["attempted"] is True + + +def test_public_worked_example_queue_keeps_sources_unverified(): + data = json.loads((ROOT / "references/oracle/public_worked_example_queue_2026_07_19.json").read_text(encoding="utf-8")) + assert data["claim_status"] == "open_queue" + assert data["production_tuning_allowed"] is False + assert data["truth_matrix_allowed"] is False + topics = {row["topic"] for row in data["queues"]} + assert "KP exact cusp star/sub/sub-sub lord" in topics + assert "Muhurta Tarabala/Chandrabala/Rahu Kalam/Abhijit" in topics + assert "Shadbala Virupa and Ashtakavarga component" in topics + + +def test_evidence_index_registers_new_probes(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + packets = {row["packet_id"]: row for row in index["packets"]} + for packet_id in ["jyotishganit_field_probe", "vedicastro_kp_api_probe", "public_worked_example_queue"]: + assert packet_id in packets + assert packets[packet_id]["claim_status"] in {"observation_only", "open_queue"} diff --git a/tests/test_jyotishganit_field_closure_rows.py b/tests/test_jyotishganit_field_closure_rows.py new file mode 100644 index 00000000..2009badf --- /dev/null +++ b/tests/test_jyotishganit_field_closure_rows.py @@ -0,0 +1,37 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +PACKET = ROOT / "references/oracle/jyotishganit_field_closure_rows_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_jyotishganit_field_closure_rows_are_observation_only(): + data = json.loads(PACKET.read_text(encoding="utf-8")) + + assert data["scope"] == "jyotishganit_field_closure_rows" + assert data["claim_status"] == "observation_only" + assert data["truth_matrix_allowed"] is False + assert data["source_selected_hash"] == "4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4" + assert len(data["rows"]) == 7 + + +def test_jyotishganit_field_rows_mark_shadbala_as_gap(): + data = json.loads(PACKET.read_text(encoding="utf-8")) + rows = {row["field"]: row for row in data["rows"]} + + for field in ["D2", "D4", "D9", "D10", "Panchanga", "BAV", "SAV"]: + assert rows[field]["closure_status"] == "ready_for_field_comparison" + assert data["explicit_gaps"] == [{"field": "Shadbala", "reason": "jyotishganit probe did not expose shadbala/strengths in selected raw"}] + + +def test_jyotishganit_field_rows_are_registered(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "jyotishganit_field_closure_rows_2026_07_21" + ) + + assert entry["domain"] == "three_engine_parity" + assert entry["claim_status"] == "observation_only" diff --git a/tests/test_jyotishganit_node_source_attribution.py b/tests/test_jyotishganit_node_source_attribution.py new file mode 100644 index 00000000..66ee87fd --- /dev/null +++ b/tests/test_jyotishganit_node_source_attribution.py @@ -0,0 +1,24 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_node_source_attribution_identifies_boundary_crossing_not_d10_formula(): + data = json.loads((ROOT / "references/oracle/jyotishganit_node_source_attribution_2026_07_19.json").read_text(encoding="utf-8")) + assert data["scope"] == "jyotishganit_node_source_attribution" + assert data["claim_status"] == "partial" + assert data["production_tuning_allowed"] is False + assert data["attribution"]["formula_delta"] == "not_d10_formula_shape" + assert data["attribution"]["primary_delta"] == "node_longitude_source_plus_ayanamsa_boundary_crossing" + assert data["local_engine"]["Rahu"]["d10_part_index_zero_based"] == 3 + assert data["jyotishganit_engine"]["Rahu"]["d10_part_index_zero_based"] == 2 + assert data["local_true_node_control"]["control_result"].startswith("true node moves farther") + + +def test_evidence_index_registers_node_source_attribution(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + packets = {row["packet_id"]: row for row in index["packets"]} + assert packets["jyotishganit_node_source_attribution"]["claim_status"] == "partial" diff --git a/tests/test_jyotishganit_three_engine_closure_bridge.py b/tests/test_jyotishganit_three_engine_closure_bridge.py new file mode 100644 index 00000000..504a0e38 --- /dev/null +++ b/tests/test_jyotishganit_three_engine_closure_bridge.py @@ -0,0 +1,37 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +BRIDGE = ROOT / "references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_jyotishganit_bridge_routes_only_available_fields_to_closure_queue(): + data = json.loads(BRIDGE.read_text(encoding="utf-8")) + + assert data["scope"] == "jyotishganit_three_engine_closure_bridge" + assert data["claim_status"] == "observation_only" + assert data["truth_matrix_allowed"] is False + assert data["source_probe"] == "scripts/jyotishganit_field_probe.py" + assert data["source_raw_hash"] == "19fa9ea862b68c4cffb6756fa6cbf0466daf47a8b008b3fe8809e9fc6a1ed30c" + assert set(data["field_routes"]["ready_for_field_comparison"]) == { + "D2", + "D4", + "D9", + "D10", + "Panchanga", + "BAV_SAV", + } + assert data["field_routes"]["explicit_gaps"] == ["Shadbala"] + + +def test_jyotishganit_bridge_is_registered(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "jyotishganit_three_engine_closure_bridge_2026_07_21" + ) + + assert entry["domain"] == "three_engine_parity" + assert entry["claim_status"] == "observation_only" diff --git a/tests/test_kp_public_worked_example_candidate_queue.py b/tests/test_kp_public_worked_example_candidate_queue.py new file mode 100644 index 00000000..be3bd315 --- /dev/null +++ b/tests/test_kp_public_worked_example_candidate_queue.py @@ -0,0 +1,39 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +QUEUE = ROOT / "references/oracle/kp_public_worked_example_candidate_queue_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_kp_public_queue_has_sources_but_no_numeric_oracle_upgrade(): + data = json.loads(QUEUE.read_text(encoding="utf-8")) + + assert data["scope"] == "kp_public_worked_example_candidate_queue" + assert data["claim_status"] == "open_queue" + assert data["numeric_oracle_ready_count"] == 0 + assert data["truth_matrix_allowed"] is False + assert data["boundary"] == "public_source_candidate_queue_only_no_kp_numeric_oracle" + + +def test_kp_public_queue_records_formula_and_runtime_cusp_candidates(): + data = json.loads(QUEUE.read_text(encoding="utf-8")) + rows = {row["id"]: row for row in data["candidates"]} + + assert rows["astrosage_kp_chapter_2"]["candidate_type"] == "formula_and_text_worked_example" + assert rows["astrosage_kp_chapter_2"]["has_numeric_cusp_table"] is False + assert rows["astrosage_kp_sign_star_sub_table"]["candidate_type"] == "reference_table" + assert rows["onlinejyotish_kp_horoscope"]["candidate_type"] == "runtime_form_candidate" + assert rows["astrobix_kp_houses"]["candidate_type"] == "runtime_form_candidate" + + +def test_kp_public_queue_is_registered(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "kp_public_worked_example_candidate_queue_2026_07_21" + ) + + assert entry["domain"] == "kp_precision_timing" + assert entry["claim_status"] == "open_queue" diff --git a/tests/test_source_runtime_closure_queue_2026_07_21.py b/tests/test_source_runtime_closure_queue_2026_07_21.py new file mode 100644 index 00000000..c5c36554 --- /dev/null +++ b/tests/test_source_runtime_closure_queue_2026_07_21.py @@ -0,0 +1,60 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +QUEUE = ROOT / "references/oracle/source_runtime_closure_queue_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" +KP_RAW = ROOT / "references/oracle/vedicastro_kp_house_cusp_raw_2026_07_21.json" +KP_ENV = ROOT / "references/oracle/vedicastro_kp_tmp_env_identity_2026_07_21.json" + + +def test_queue_prioritizes_jyotishganit_and_vedicastro_without_truth_upgrade(): + data = json.loads(QUEUE.read_text(encoding="utf-8")) + rows = {row["id"]: row for row in data["rows"]} + + assert data["scope"] == "source_runtime_closure_queue" + assert data["claim_status"] == "open_queue" + assert data["truth_matrix_allowed"] is False + assert rows["jyotishganit_field_closure"]["current_status"] == "probe_runs_observation_only" + assert rows["vedicastro_kp_house_cusp_closure"]["current_status"] == "raw_ready_observation_only" + assert rows["vedicastro_kp_house_cusp_closure"]["latest_observed_raw_hash"] == "2e7a6b17eb2965a60846f625f6bd8bc03555216d6225983647bcbfa23d0e345b" + assert rows["vedicastro_kp_house_cusp_closure"]["coverage"]["sub_sub_lord"] is True + + +def test_queue_marks_existing_assets_as_not_fully_invoked(): + data = json.loads(QUEUE.read_text(encoding="utf-8")) + not_closed = data["not_fully_closed_reference_layers"] + + assert "references/open_source_sources/jyotishganit" in not_closed + assert "references/open_source_sources/VedicAstro" in not_closed + assert "references/open_source_sources/rishi-ai-mcp" in not_closed + assert "references/open_source_sources/vedic-astro-skills" in not_closed + assert data["boundary"] == "queue_only_no_adapter_or_truth_upgrade" + + +def test_queue_is_registered_in_evidence_index(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "source_runtime_closure_queue_2026_07_21" + ) + + assert entry["domain"] == "source_runtime_closure" + assert entry["claim_status"] == "open_queue" + + +def test_vedicastro_kp_raw_and_tmp_env_are_observation_only_packets(): + raw = json.loads(KP_RAW.read_text(encoding="utf-8")) + env = json.loads(KP_ENV.read_text(encoding="utf-8")) + + assert raw["scope"] == "vedicastro_kp_house_cusp_probe" + assert raw["status"] == "complete" + assert raw["claim_status"] == "observation_only" + assert raw["truth_matrix_allowed"] is False + assert raw["raw_hash"] == "2e7a6b17eb2965a60846f625f6bd8bc03555216d6225983647bcbfa23d0e345b" + assert raw["schema_fingerprint"]["house_count"] == 12 + assert "SubLord" in raw["schema_fingerprint"]["fields"] + assert "SubSubLord" in raw["schema_fingerprint"]["fields"] + assert env["claim_status"] == "runtime_dependency_ready" + assert env["project_dependency_mutation_allowed"] is False diff --git a/tests/test_technique_promotion_audit_kp_gochara_muhurta.py b/tests/test_technique_promotion_audit_kp_gochara_muhurta.py new file mode 100644 index 00000000..e0993091 --- /dev/null +++ b/tests/test_technique_promotion_audit_kp_gochara_muhurta.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +import json +from pathlib import Path + +from scripts.technique_promotion_audit_kp_gochara_muhurta import build_audit + +ROOT = Path(__file__).resolve().parents[1] + + +def test_kp_gochara_muhurta_audit_splits_runtime_presence() -> None: + audit = build_audit(ROOT) + statuses = {item["technique_id"]: item["current_call_status"] for item in audit["items"]} + assert audit["scope"] == "technique_promotion_audit_kp_gochara_muhurta" + assert audit["truth_policy"] == "runtime_presence_not_oracle_closure" + assert statuses["panchanga_calendar"] == "partial" + assert statuses["muhurta_dashaflow_candidate"] == "oss_reference_not_main_runtime" + assert statuses["kp_astrology"] == "reference_only_not_main_runtime" + assert statuses["gochara_event_timing_template"] == "template_reference_not_main_runtime" + + +def test_kp_gochara_muhurta_audit_records_reuse_boundaries() -> None: + audit = build_audit(ROOT) + for item in audit["items"]: + assert item["reuse_decision"] in {"do_not_duplicate_runtime", "license_audit_before_reuse", "reference_only"} + assert item["next_action"] + assert item["claim_boundary"] + assert item["source_or_license_boundary"] + + +def test_kp_gochara_muhurta_audit_artifact_exists() -> None: + artifact = ROOT / "references/oracle/technique_promotion_audit_kp_gochara_muhurta_2026_07_19.json" + data = json.loads(artifact.read_text(encoding="utf-8")) + assert data["summary"] == { + "items_checked": 4, + "formally_called_count": 0, + "reference_only_count": 3, + } diff --git a/tests/test_three_engine_high_rigor_parity.py b/tests/test_three_engine_high_rigor_parity.py index ba5c5a11..e8ca896a 100644 --- a/tests/test_three_engine_high_rigor_parity.py +++ b/tests/test_three_engine_high_rigor_parity.py @@ -1,51 +1,6 @@ -import os -from pathlib import Path -import subprocess -import sys - -from benchmarks.jyotish.scripts.run_skill_baseline import run_sample -from benchmarks.jyotish.scripts.run_pyjhora_compare import build_pyjhora_sample, compare_one from scripts import three_engine_high_rigor_parity as parity -ROOT = Path(__file__).resolve().parents[1] - - -def test_runner_imports_from_commercial_root() -> None: - env = os.environ.copy() - env["PYTHONPATH"] = str(ROOT) - result = subprocess.run( - [sys.executable, "-c", "import scripts.three_engine_high_rigor_parity"], - cwd=ROOT, - env=env, - capture_output=True, - text=True, - check=False, - ) - assert result.returncode == 0, result.stderr - - -def test_public_sample_exposes_shadbala_components() -> None: - result = run_sample(parity.SAMPLE) - assert result["ok"] is True - components = result["canonical"]["shadbala_components"] - assert set(components["Sun"]) == set(parity.VED_COMPONENT_FIELDS) - - -def test_pyjhora_sample_exposes_shadbala_components() -> None: - sample = build_pyjhora_sample(parity.SAMPLE) - assert set(sample["shadbala_components"]["Sun"]) == set(parity.VED_COMPONENT_FIELDS) - - -def test_pyjhora_matrix_includes_shadbala_components() -> None: - baseline = { - "ascendant": {}, "planets": {}, "varga": {}, "ashtakavarga": {}, "shadbala": {}, "dasha": {}, - "shadbala_components": {"Sun": {name: 1.0 for name in parity.VED_COMPONENT_FIELDS}}, - } - rows = compare_one("sample", baseline, baseline) - assert {row["field"] for row in rows if row["section"] == "Shadbala_Component" and row["body"] == "Sun"} == set(parity.VED_COMPONENT_FIELDS) - - def test_jyotishganit_planet_map_reads_divisional_occupants() -> None: chart = {"houses": [{"occupants": [{"celestialBody": "Sun", "sign": "Leo"}]}]} assert parity._jyotish_planet_signs(chart) == {"Sun": "Leo"} diff --git a/tests/test_three_engine_jyotishganit_bridge_applied.py b/tests/test_three_engine_jyotishganit_bridge_applied.py new file mode 100644 index 00000000..de508d02 --- /dev/null +++ b/tests/test_three_engine_jyotishganit_bridge_applied.py @@ -0,0 +1,46 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +PACKET = ROOT / "references/oracle/three_engine_jyotishganit_bridge_applied_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_applied_bridge_maps_jyotishganit_fields_to_existing_temcq_tickets(): + data = json.loads(PACKET.read_text(encoding="utf-8")) + + assert data["scope"] == "three_engine_jyotishganit_bridge_applied" + assert data["claim_status"] == "observation_only" + assert data["truth_matrix_allowed"] is False + assert data["source_bridge"] == "references/oracle/jyotishganit_three_engine_closure_bridge_2026_07_21.json" + assert data["summary"]["existing_ticket_rows"] == 18 + assert data["summary"]["no_existing_ticket_rows"] == 1 + assert data["summary"]["truth_upgrades"] == 0 + + +def test_applied_bridge_keeps_all_rows_open_or_comparison_ready(): + data = json.loads(PACKET.read_text(encoding="utf-8")) + rows = data["rows"] + ticket_rows = [row for row in rows if row["existing_ticket_id"]] + panchanga = next(row for row in rows if row["field"] == "Panchanga") + + assert len(ticket_rows) == 18 + assert {row["closure_status"] for row in rows} == { + "ready_for_field_comparison", + "no_existing_ticket_create_next", + } + assert panchanga["existing_ticket_id"] is None + assert panchanga["closure_status"] == "no_existing_ticket_create_next" + assert all(row["claim_boundary"] == "field_comparison_only_no_formula_truth" for row in rows) + + +def test_applied_bridge_is_registered_in_evidence_index(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "three_engine_jyotishganit_bridge_applied_2026_07_21" + ) + + assert entry["domain"] == "three_engine_parity" + assert entry["claim_status"] == "observation_only" diff --git a/tests/test_three_engine_mismatch_arbitrator.py b/tests/test_three_engine_mismatch_arbitrator.py index be3ac9d0..f6ca637e 100644 --- a/tests/test_three_engine_mismatch_arbitrator.py +++ b/tests/test_three_engine_mismatch_arbitrator.py @@ -1,7 +1,7 @@ import json from pathlib import Path -from scripts.three_engine_mismatch_arbitrator import arbitrate_manifest +from scripts.three_engine_mismatch_arbitrator import arbitrate_manifest, render_markdown_report ROOT = Path(__file__).resolve().parents[1] @@ -35,13 +35,16 @@ def test_vedastro_only_d2_difference_is_endpoint_semantics(tmp_path: Path) -> No assert row["differing_engines"] == ["VedAstro"] -def test_commercial_receives_mismatch_status_not_raw_truth_upgrade() -> None: - report = json.loads((ROOT / "references/oracle/three_engine_mismatch_arbitration_2026_07_19.json").read_text(encoding="utf-8")) - markdown = (ROOT / "docs/research/three_engine_mismatch_arbitration_2026_07_19.md").read_text(encoding="utf-8") +def test_markdown_report_summarizes_policy_and_category_counts() -> None: + report = arbitrate_manifest(ROOT / "references" / "oracle" / "three_engine_parity_replay_manifest.json") + markdown = render_markdown_report(report) - assert report["mismatch_count"] == 60 - assert report["classified_count"] == 60 - assert report["unclassified_count"] == 0 - assert report["truth_policy"] == "no_majority_vote" + assert "Three-engine mismatch arbitration" in markdown + assert "mismatch_count: `60`" in markdown + assert "truth_policy: `no_majority_vote`" in markdown assert "commercial_sync: `status_and_claim_boundary_only`" in markdown + assert "endpoint_or_varga_semantics" in markdown + assert "shadbala_formula_variant" in markdown + assert "ashtakavarga_table_or_contributor_variant" in markdown + assert "derived_total_from_component_variants" in markdown assert "Do not copy raw research debt into commercial runtime" in markdown diff --git a/tests/test_three_engine_parity_artifact_contract.py b/tests/test_three_engine_parity_artifact_contract.py index c55e5013..3eb7cb65 100644 --- a/tests/test_three_engine_parity_artifact_contract.py +++ b/tests/test_three_engine_parity_artifact_contract.py @@ -19,3 +19,69 @@ def test_verified_oracle_requires_raw_artifact_hash_and_settings(tmp_path): assert result["status"] == "invalid" assert any(error["error"] == "required_for_verified_status" for error in result["errors"]) + + +def test_high_rigor_parity_requires_non_d1_and_shadbala_component_rows(tmp_path): + manifest = { + "engines": { + "VedAstro": {"status": "blocked"}, + "PyJHora_JHora": {"status": "blocked"}, + "jyotishganit": {"status": "blocked"}, + }, + "comparison_rows": [ + { + "section": "D1", + "field": "Sun.sign", + "local_value": "Aquarius", + "oracle_values": {}, + "status": "match", + } + ], + } + path = tmp_path / "manifest.json" + path.write_text(json.dumps(manifest), encoding="utf-8") + + result = validate_manifest(path) + + assert result["status"] == "partial" + assert result["blocked_reason"] == "missing_high_rigor_sections" + assert "D2" in result["missing_high_rigor_sections"] + assert "shadbala_components" in result["missing_high_rigor_sections"] + + +def test_high_rigor_parity_passes_only_when_required_sections_are_present(tmp_path): + rows = [ + { + "section": section, + "field": "sample", + "local_value": 1, + "oracle_values": {"PyJHora_JHora": 1}, + "status": "match", + } + for section in [ + "D1", + "D2", + "D4", + "D9", + "D10", + "ashtakavarga_bav", + "ashtakavarga_sav", + "shadbala_total", + "shadbala_components", + ] + ] + manifest = { + "engines": { + "VedAstro": {"status": "blocked"}, + "PyJHora_JHora": {"status": "blocked"}, + "jyotishganit": {"status": "blocked"}, + }, + "comparison_rows": rows, + } + path = tmp_path / "manifest.json" + path.write_text(json.dumps(manifest), encoding="utf-8") + + result = validate_manifest(path) + + assert result["status"] == "pass" + assert result["missing_high_rigor_sections"] == [] diff --git a/tests/test_truth_source_runtime_identity.py b/tests/test_truth_source_runtime_identity.py new file mode 100644 index 00000000..8df0b28d --- /dev/null +++ b/tests/test_truth_source_runtime_identity.py @@ -0,0 +1,45 @@ +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +PACKET = ROOT / "references/oracle/truth_source_runtime_identity_2026_07_21.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_truth_source_runtime_identity_packet_is_governance_only(): + packet = json.loads(PACKET.read_text(encoding="utf-8")) + + assert packet["scope"] == "truth_source_runtime_identity" + assert packet["truth_source"]["path"] == "/Users/wuyongnaren/Documents/印度占星" + assert packet["truth_source"]["role"] == "sole_main_research_truth_source" + assert len(packet["truth_source"]["git_commit"]) == 40 + assert packet["oracle_summary"]["truth_matrix_allowed"] is False + assert packet["oracle_summary"]["production_tuning_allowed"] is False + assert packet["claim_boundary"] == "identity_ready_governance_only_not_oracle_truth" + + +def test_truth_source_runtime_identity_is_registered_in_evidence_index(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + entry = next( + row for row in index["packets"] + if row["packet_id"] == "truth_source_runtime_identity" + ) + + assert entry["path"] == "references/oracle/truth_source_runtime_identity_2026_07_21.json" + assert entry["domain"] == "truth_source_governance" + assert entry["claim_status"] == "ready_contract" + + +def test_workbuddy_old_copy_is_quarantined_as_fragment_only(): + packet = json.loads(PACKET.read_text(encoding="utf-8")) + quarantine = packet["fragment_quarantine"]["workbuddy_old_copies"] + + assert quarantine["status"] == "quarantined" + assert set(quarantine["labels"]) == { + "not_for_truth_source", + "privacy_review_required", + "artifact_incomplete", + "historical_fragment_only", + } + assert all("/WorkBuddy/" in path or "/.workbuddy/" in path for path in quarantine["paths"]) diff --git a/tests/test_vedicastro_kp_house_cusp_probe.py b/tests/test_vedicastro_kp_house_cusp_probe.py new file mode 100644 index 00000000..2ae01fd5 --- /dev/null +++ b/tests/test_vedicastro_kp_house_cusp_probe.py @@ -0,0 +1,49 @@ +import json +import os +import subprocess +import sys +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +RUNTIME = Path("/tmp/vedicastro_sidereal_flatlib_probe.Nt8ANZ") +ARTIFACT = ROOT / "references/oracle/vedicastro_kp_house_cusp_probe_steve_jobs_2026_07_19.json" +INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json" + + +def test_vedicastro_kp_house_cusp_artifact_has_12_cusps_and_hash(): + data = json.loads(ARTIFACT.read_text(encoding="utf-8")) + assert data["scope"] == "vedicastro_kp_house_cusp_probe" + assert data["claim_status"] == "observation_only" + assert data["production_tuning_allowed"] is False + assert data["truth_matrix_allowed"] is False + assert data["raw_hash"] + assert data["schema_fingerprint"]["house_count"] == 12 + fields = set(data["schema_fingerprint"]["fields"]) + assert {"LonDecDeg", "NakshatraLord", "SubLord", "SubSubLord"} <= fields + assert data["raw"]["houses"][0]["Object"] == "I" + + +def test_vedicastro_kp_house_cusp_probe_runtime_when_temp_env_exists(): + if not RUNTIME.exists(): + return + env = { + **os.environ, + "PYTHONPATH": f"{RUNTIME}:{ROOT / 'references/open_source_sources/VedicAstro'}", + } + out = subprocess.check_output( + [sys.executable, "scripts/vedicastro_kp_house_cusp_probe.py"], + cwd=ROOT, + text=True, + env=env, + ) + data = json.loads(out) + assert data["schema_fingerprint"]["house_count"] == 12 + assert data["raw"]["houses"][0]["SubLord"] + assert data["dependency_identity"]["observed_pinned_flatlib_commit"] == "2618c348ce1ab2588548f935ff65f031630b4872" + + +def test_evidence_index_registers_house_cusp_probe(): + index = json.loads(INDEX.read_text(encoding="utf-8")) + packets = {row["packet_id"]: row for row in index["packets"]} + assert packets["vedicastro_kp_house_cusp_probe"]["claim_status"] == "observation_only" diff --git a/tests/test_vedicastro_kp_runtime_tmp_probe.py b/tests/test_vedicastro_kp_runtime_tmp_probe.py index 92010012..edcae641 100644 --- a/tests/test_vedicastro_kp_runtime_tmp_probe.py +++ b/tests/test_vedicastro_kp_runtime_tmp_probe.py @@ -26,5 +26,6 @@ def test_vedicastro_probe_reports_dependency_chain_without_truth_upgrade(): assert data["runtime_probe"]["method_present"] is True assert "SubLord" in data["runtime_probe"]["sample_rl_nl_sl"] assert "AY_KRISHNAMURTI" in data["runtime_probe"]["sidereal_ayanamsa_constants_present"] + assert data["dependency_identity"]["observed_pinned_flatlib_commit"] == "2618c348ce1ab2588548f935ff65f031630b4872" else: assert data["status"] == "blocked_runtime_import" diff --git a/tests/test_vedicastro_kp_tmp_env_preparer.py b/tests/test_vedicastro_kp_tmp_env_preparer.py new file mode 100644 index 00000000..14fe1812 --- /dev/null +++ b/tests/test_vedicastro_kp_tmp_env_preparer.py @@ -0,0 +1,36 @@ +import json +import subprocess +import sys +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +SCRIPT = ROOT / "scripts/prepare_vedicastro_kp_tmp_env.py" + + +def test_preparer_supports_report_only_mode_without_project_install(): + out = subprocess.check_output( + [sys.executable, str(SCRIPT), "--report-only"], + cwd=ROOT, + text=True, + ) + data = json.loads(out) + + assert data["scope"] == "vedicastro_kp_tmp_env_preparer" + assert data["target"] == "/tmp/vedicastro_flatlib_probe" + assert data["project_dependency_mutation_allowed"] is False + assert data["required_packages"]["flatlib"].startswith("git+https://github.com/diliprk/flatlib.git@sidereal") + assert data["claim_status"] in {"blocked_runtime_dependency", "runtime_dependency_ready"} + + +def test_preparer_result_never_claims_oracle_truth(): + out = subprocess.check_output( + [sys.executable, str(SCRIPT), "--report-only"], + cwd=ROOT, + text=True, + ) + data = json.loads(out) + + assert data["truth_matrix_allowed"] is False + assert data["production_tuning_allowed"] is False + assert data["boundary"] == "dependency_preparation_only_no_kp_oracle_truth"