sync: import fragment migration registries
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"scope": "event_judgment_fragment_rule_family_registry",
|
||||
"created_at": "2026-07-21",
|
||||
"claim_status": "ready_contract",
|
||||
"source_fragment": "/Users/wuyongnaren/.workbuddy/backups/jyotish-vedic-astrology-20260711-154109/scripts/event_judgment_engine.py",
|
||||
"source_policy": "rule_family_inventory_only_no_runtime_copy",
|
||||
"production_tuning_allowed": false,
|
||||
"truth_matrix_allowed": false,
|
||||
"boundary": "Migrates WorkBuddy event_judgment_engine as a rule-family registry only. No old engine implementation is copied; current event_judgment_skeleton remains the runtime authority.",
|
||||
"route_families": [
|
||||
{
|
||||
"route": "relationship",
|
||||
"required_families": [
|
||||
{"key": "d9_navamsa", "phase": "promise", "module": "varga_full", "claim": "Marriage/relationship questions must include D9."},
|
||||
{"key": "upapada_lagna", "phase": "promise", "module": "special_lagnas", "claim": "UL must be present or explicitly blocked."},
|
||||
{"key": "darakaraka", "phase": "manifestation", "module": "jaimini", "claim": "DK layer supports manifestation reading."},
|
||||
{"key": "marriage_convergence", "phase": "activation", "module": "dasa_convergence", "claim": "Activation must not rely on static promise alone."},
|
||||
{"key": "vimshottari_current", "phase": "timing", "module": "dasha", "claim": "Timing requires Vimshottari."},
|
||||
{"key": "narayana_current", "phase": "timing", "module": "narayana_dasha", "claim": "Timing requires Narayana cross-check; conflict downgrades certainty."}
|
||||
]
|
||||
},
|
||||
{
|
||||
"route": "career",
|
||||
"required_families": [
|
||||
{"key": "d10_dasamsa", "phase": "promise", "module": "varga_full", "claim": "Career questions must include D10."},
|
||||
{"key": "a10_karma_pada", "phase": "promise", "module": "special_lagnas", "claim": "A10/Karma Pada must be present or explicitly blocked."},
|
||||
{"key": "amatyakaraka", "phase": "manifestation", "module": "jaimini", "claim": "AmK supports vocation manifestation layer."},
|
||||
{"key": "shadbala", "phase": "manifestation", "module": "shadbala", "claim": "Strength layer must be included with current partial/oracle boundary."},
|
||||
{"key": "career_convergence", "phase": "activation", "module": "dasa_convergence", "claim": "Activation must include career dasha convergence."},
|
||||
{"key": "vimshottari_current", "phase": "timing", "module": "dasha", "claim": "Timing requires Vimshottari."},
|
||||
{"key": "narayana_current", "phase": "timing", "module": "narayana_dasha", "claim": "Timing requires Narayana cross-check."}
|
||||
]
|
||||
},
|
||||
{
|
||||
"route": "wealth",
|
||||
"required_families": [
|
||||
{"key": "d2_hora", "phase": "promise", "module": "varga_full", "claim": "Wealth questions must include D2."},
|
||||
{"key": "d10_dasamsa", "phase": "promise", "module": "varga_full", "claim": "Career/status channel must be checked for wealth manifestation."},
|
||||
{"key": "ashtakavarga_house_scores", "phase": "manifestation", "module": "ashtakavarga", "claim": "House-score support must be included with current AV boundary."},
|
||||
{"key": "wealth_convergence", "phase": "activation", "module": "dasa_convergence", "claim": "Activation must include wealth/family convergence."},
|
||||
{"key": "gains_convergence", "phase": "activation", "module": "dasa_convergence", "claim": "Gains/wishes convergence is a separate activation layer."},
|
||||
{"key": "vimshottari_current", "phase": "timing", "module": "dasha", "claim": "Timing requires Vimshottari."},
|
||||
{"key": "narayana_current", "phase": "timing", "module": "narayana_dasha", "claim": "Timing requires Narayana cross-check."}
|
||||
]
|
||||
}
|
||||
],
|
||||
"global_requirements": [
|
||||
"Every route must map evidence into promise, activation, manifestation and timing phases.",
|
||||
"Missing promise/activation/manifestation/timing evidence blocks or downgrades the verdict.",
|
||||
"Timing/event claims must use Vimshottari + Narayana, not Vimshottari alone.",
|
||||
"Functional Benefic/Malefic remains mandatory from AGENTS.md even though the WorkBuddy fragment did not contain it."
|
||||
]
|
||||
}
|
||||
@@ -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": 100,
|
||||
"packet_count": 103,
|
||||
"blocked_or_partial_count": 51,
|
||||
"human_review_required_count": 3
|
||||
},
|
||||
@@ -809,6 +809,30 @@
|
||||
"claim_status": "partial",
|
||||
"consumer_policy": "research_observation_only",
|
||||
"claim_boundary": "Classifies Digbala rows as formula/unit mismatch and routes them to angular-reference formula arbitration; no absolute parity upgrade."
|
||||
},
|
||||
{
|
||||
"packet_id": "fragment_second_pass_candidate_ledger_2026_07_21",
|
||||
"path": "references/oracle/fragment_second_pass_candidate_ledger_2026_07_21.json",
|
||||
"domain": "fragment_governance",
|
||||
"claim_status": "open_queue",
|
||||
"consumer_policy": "research_only_no_direct_fragment_copy",
|
||||
"claim_boundary": "Second-pass ledger for five high-value fragments; each candidate is migrate-to-test/registry, reference-only, or forbidden/private/obsolete. No wholesale copy or truth upgrade."
|
||||
},
|
||||
{
|
||||
"packet_id": "event_judgment_fragment_rule_family_registry_2026_07_21",
|
||||
"path": "references/oracle/event_judgment_fragment_rule_family_registry_2026_07_21.json",
|
||||
"domain": "event_judgment",
|
||||
"claim_status": "ready_contract",
|
||||
"consumer_policy": "research_registry_only_no_runtime_copy",
|
||||
"claim_boundary": "Ports WorkBuddy event judgment as rule-family inventory only; no old engine code copied."
|
||||
},
|
||||
{
|
||||
"packet_id": "research_birth_time_journey_ui_contract_2026_07_21",
|
||||
"path": "references/oracle/research_birth_time_journey_ui_contract_2026_07_21.json",
|
||||
"domain": "research_web_birth_time_journey",
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"scope": "fragment_second_pass_candidate_ledger",
|
||||
"created_at": "2026-07-21",
|
||||
"claim_status": "open_queue",
|
||||
"production_tuning_allowed": false,
|
||||
"truth_matrix_allowed": false,
|
||||
"allowed_decisions": [
|
||||
"migrate_to_research_test_or_registry",
|
||||
"reference_only",
|
||||
"forbidden_private_or_obsolete"
|
||||
],
|
||||
"boundary": "Second-pass precision audit of five high-value fragment candidates only. No file is copied wholesale; reusable value must become a research test/registry, reference-only citation, or forbidden/private/obsolete marker.",
|
||||
"candidates": [
|
||||
{
|
||||
"candidate_id": "workbuddy_event_judgment_engine",
|
||||
"source_path": "/Users/wuyongnaren/.workbuddy/backups/jyotish-vedic-astrology-20260711-154109/scripts/event_judgment_engine.py",
|
||||
"sha256_prefix": "f982bfd539fb1213",
|
||||
"decision": "migrate_to_research_test_or_registry",
|
||||
"value": "Contains event-route evidence ledger pattern: promise/activation/manifestation/timing, Vimshottari+Narayana timing, D9/UL for marriage, D10/A10 for career, D2/D10/AV for wealth.",
|
||||
"migration_plan": "Do not copy old engine. Convert its route/evidence-field inventory into research registry/tests that assert current event_judgment_skeleton and strict workflow retain the same mandatory evidence families.",
|
||||
"risk": "Old WorkBuddy fork is far behind current main; risk terms include generic key/pending strings. Treat as design/reference inventory, not runtime source.",
|
||||
"next_artifact": "event_judgment_fragment_rule_family_registry"
|
||||
},
|
||||
{
|
||||
"candidate_id": "workbuddy_shadbala_handan_operator_card",
|
||||
"source_path": "/Users/wuyongnaren/WorkBuddy/2026-07-05-19-03-49/yinduzhanxing/docs/benchmark/shadbala_handan_raman_first_packet_operator_card.md",
|
||||
"decision": "forbidden_private_or_obsolete",
|
||||
"value": "Shows an oracle-packet operator workflow pattern, but the named Handan/Raman personal packet is not a reusable public numeric oracle.",
|
||||
"migration_plan": "Do not migrate content. If useful, recreate a blank operator-card template from current public-oracle packet schema without personal identifiers.",
|
||||
"risk": "Contains named personal-case context and source/consent uncertainty; cannot be used as research truth or commercial input.",
|
||||
"next_artifact": "none"
|
||||
},
|
||||
{
|
||||
"candidate_id": "workbuddy_first_shadbala_packet_assistant",
|
||||
"source_path": "/Users/wuyongnaren/WorkBuddy/2026-07-05-19-03-49/yinduzhanxing/docs/benchmark/first_shadbala_oracle_packet_assistant.json",
|
||||
"decision": "forbidden_private_or_obsolete",
|
||||
"value": "Potential packet-assistant structure is superseded by current evidence_packet_index and Shadbala component closure packets.",
|
||||
"migration_plan": "Do not migrate raw JSON. Preserve only the requirement that Shadbala packets need source, input, unit, hash and replay fields, already covered by current packet gates.",
|
||||
"risk": "Linked to first/Handan packet chain and may include non-public or insufficiently sourced case metadata.",
|
||||
"next_artifact": "none"
|
||||
},
|
||||
{
|
||||
"candidate_id": "commercial_birth_time_journey_tests",
|
||||
"source_path": "/private/tmp/jyotisha-commercial-readonly.adiUr0/frontend/tests/birth-time-journey*.test.ts",
|
||||
"decision": "migrate_to_research_test_or_registry",
|
||||
"value": "Mature UX test patterns: resume state, projected baseline action for legacy snapshot, turn persistence, mobile scroll contract, dynamic stop policy, candidate completion and user-facing error contracts.",
|
||||
"migration_plan": "Recreate research-local UI tests that assert profile mode hides chat composer, journey state resumes locally, candidate claims stay exploratory, and no Supabase/credits runtime is imported.",
|
||||
"risk": "Commercial repo is dirty and includes business runtime. Copy no code; port only behavior contracts into localStorage/research-mode tests.",
|
||||
"next_artifact": "research_birth_time_journey_ui_contract_tests"
|
||||
},
|
||||
{
|
||||
"candidate_id": "vedicastro_kp_source_table_candidate",
|
||||
"source_path": "/Users/wuyongnaren/Documents/印度占星/references/open_source_sources/VedicAstro/vedicastro/VedicAstro.py",
|
||||
"decision": "reference_only",
|
||||
"value": "Useful KP API surface reference: get_rl_nl_sl_data, houses/planets data, SubLord/SubSubLord fields.",
|
||||
"migration_plan": "Keep as pinned source/API reference only. Continue requiring legal KP_SL_Divisions.csv table hash and public worked example before exact KP cusp oracle upgrade.",
|
||||
"risk": "Runtime dependency mismatch and table fixture missing; source/API surface does not prove event timing truth.",
|
||||
"next_artifact": "kp_external_table_hash_manifest_2026_07_20"
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"candidate_count": 5,
|
||||
"migrate_to_research_test_or_registry_count": 2,
|
||||
"reference_only_count": 1,
|
||||
"forbidden_private_or_obsolete_count": 2
|
||||
},
|
||||
"next_actions": [
|
||||
"Create event_judgment_fragment_rule_family_registry from the WorkBuddy engine inventory without copying implementation.",
|
||||
"Create research-local birth-time journey UI contract tests based on commercial behavior, not commercial code.",
|
||||
"Keep Handan/first packet materials forbidden unless replaced by public, consent-safe numeric examples."
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"scope": "research_birth_time_journey_ui_contract",
|
||||
"created_at": "2026-07-21",
|
||||
"claim_status": "ready_contract",
|
||||
"source_fragment": "/private/tmp/jyotisha-commercial-readonly.adiUr0/frontend/tests/birth-time-journey*.test.ts",
|
||||
"source_policy": "behavior_contract_only_no_commercial_code",
|
||||
"production_tuning_allowed": false,
|
||||
"truth_matrix_allowed": false,
|
||||
"boundary": "Ports commercial birth-time journey maturity as research-local UI contracts only. No Supabase, credits, auth, queue, or commercial implementation is imported.",
|
||||
"contracts": [
|
||||
{
|
||||
"contract_id": "profile_mode_hides_chat_overlay",
|
||||
"source_pattern": "mobile scroll/profile journey separation",
|
||||
"research_requirement": "When user opens My Chart/profile form, bottom chat composer must disappear and the form must be centered."
|
||||
},
|
||||
{
|
||||
"contract_id": "new_chat_restores_chat_surface",
|
||||
"source_pattern": "journey resume / turn state transitions",
|
||||
"research_requirement": "New chat or starter prompt must restore chat mode and composer visibility."
|
||||
},
|
||||
{
|
||||
"contract_id": "candidate_claim_stays_exploratory",
|
||||
"source_pattern": "candidate completion / response invariants",
|
||||
"research_requirement": "Birth-time rectification result may show candidate ranges and scores, but must not claim birth-time truth."
|
||||
},
|
||||
{
|
||||
"contract_id": "local_resume_only",
|
||||
"source_pattern": "journey turn persistence",
|
||||
"research_requirement": "Research repo may persist local journey/profile state with localStorage only; no Supabase or credit dependency."
|
||||
},
|
||||
{
|
||||
"contract_id": "user_error_contract",
|
||||
"source_pattern": "dynamic question validator / user errors",
|
||||
"research_requirement": "Invalid dates, missing time/place, or unparseable choices must produce actionable local UI messages, not silent fake UI."
|
||||
}
|
||||
],
|
||||
"forbidden_imports": [
|
||||
"Supabase runtime",
|
||||
"credits/payment/subscription logic",
|
||||
"commercial auth/session business rules",
|
||||
"dirty commercial worktree code",
|
||||
"commercial user data"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
EVENT = ROOT / "references/oracle/event_judgment_fragment_rule_family_registry_2026_07_21.json"
|
||||
JOURNEY = ROOT / "references/oracle/research_birth_time_journey_ui_contract_2026_07_21.json"
|
||||
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
|
||||
|
||||
|
||||
def test_event_judgment_fragment_registry_ports_rules_not_engine():
|
||||
data = json.loads(EVENT.read_text(encoding="utf-8"))
|
||||
assert data["source_policy"] == "rule_family_inventory_only_no_runtime_copy"
|
||||
assert data["claim_status"] == "ready_contract"
|
||||
routes = {row["route"]: row for row in data["route_families"]}
|
||||
assert {"relationship", "career", "wealth"} <= set(routes)
|
||||
relationship = {row["key"] for row in routes["relationship"]["required_families"]}
|
||||
assert {"d9_navamsa", "upapada_lagna", "vimshottari_current", "narayana_current"} <= relationship
|
||||
career = {row["key"] for row in routes["career"]["required_families"]}
|
||||
assert {"d10_dasamsa", "a10_karma_pada", "shadbala"} <= career
|
||||
wealth = {row["key"] for row in routes["wealth"]["required_families"]}
|
||||
assert {"d2_hora", "ashtakavarga_house_scores", "gains_convergence"} <= wealth
|
||||
assert any("Functional Benefic/Malefic" in item for item in data["global_requirements"])
|
||||
|
||||
|
||||
def test_birth_time_journey_contract_ports_behavior_not_commercial_runtime():
|
||||
data = json.loads(JOURNEY.read_text(encoding="utf-8"))
|
||||
assert data["source_policy"] == "behavior_contract_only_no_commercial_code"
|
||||
contracts = {row["contract_id"]: row for row in data["contracts"]}
|
||||
assert {
|
||||
"profile_mode_hides_chat_overlay",
|
||||
"new_chat_restores_chat_surface",
|
||||
"candidate_claim_stays_exploratory",
|
||||
"local_resume_only",
|
||||
"user_error_contract",
|
||||
} <= set(contracts)
|
||||
assert "Supabase runtime" in data["forbidden_imports"]
|
||||
assert "credits/payment/subscription logic" in data["forbidden_imports"]
|
||||
|
||||
|
||||
def test_fragment_migration_registries_are_indexed():
|
||||
packets = {
|
||||
row["packet_id"]: row
|
||||
for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]
|
||||
}
|
||||
assert packets["event_judgment_fragment_rule_family_registry_2026_07_21"]["claim_status"] == "ready_contract"
|
||||
assert packets["research_birth_time_journey_ui_contract_2026_07_21"]["claim_status"] == "ready_contract"
|
||||
@@ -0,0 +1,46 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
LEDGER = ROOT / "references/oracle/fragment_second_pass_candidate_ledger_2026_07_21.json"
|
||||
|
||||
|
||||
def test_second_pass_fragment_ledger_has_only_allowed_decisions():
|
||||
data = json.loads(LEDGER.read_text(encoding="utf-8"))
|
||||
assert data["scope"] == "fragment_second_pass_candidate_ledger"
|
||||
assert data["claim_status"] == "open_queue"
|
||||
assert data["production_tuning_allowed"] is False
|
||||
assert data["truth_matrix_allowed"] is False
|
||||
allowed = set(data["allowed_decisions"])
|
||||
assert allowed == {
|
||||
"migrate_to_research_test_or_registry",
|
||||
"reference_only",
|
||||
"forbidden_private_or_obsolete",
|
||||
}
|
||||
assert len(data["candidates"]) == 5
|
||||
assert all(row["decision"] in allowed for row in data["candidates"])
|
||||
|
||||
|
||||
def test_private_handan_packets_are_forbidden_not_migrated():
|
||||
rows = {
|
||||
row["candidate_id"]: row
|
||||
for row in json.loads(LEDGER.read_text(encoding="utf-8"))["candidates"]
|
||||
}
|
||||
for candidate_id in [
|
||||
"workbuddy_shadbala_handan_operator_card",
|
||||
"workbuddy_first_shadbala_packet_assistant",
|
||||
]:
|
||||
assert rows[candidate_id]["decision"] == "forbidden_private_or_obsolete"
|
||||
assert "Do not migrate" in rows[candidate_id]["migration_plan"]
|
||||
|
||||
|
||||
def test_reusable_fragments_become_tests_or_registries_not_runtime_copy():
|
||||
rows = {
|
||||
row["candidate_id"]: row
|
||||
for row in json.loads(LEDGER.read_text(encoding="utf-8"))["candidates"]
|
||||
}
|
||||
assert rows["workbuddy_event_judgment_engine"]["decision"] == "migrate_to_research_test_or_registry"
|
||||
assert "Do not copy old engine" in rows["workbuddy_event_judgment_engine"]["migration_plan"]
|
||||
assert rows["commercial_birth_time_journey_tests"]["decision"] == "migrate_to_research_test_or_registry"
|
||||
assert "Copy no code" in rows["commercial_birth_time_journey_tests"]["risk"]
|
||||
assert rows["vedicastro_kp_source_table_candidate"]["decision"] == "reference_only"
|
||||
Reference in New Issue
Block a user