feat: sync d1 d60 source use readiness

This commit is contained in:
732642856
2026-07-19 23:24:06 +08:00
parent c253cd37d0
commit d30263f78b
7 changed files with 1425 additions and 1 deletions
@@ -0,0 +1,41 @@
{
"boundary": "D1-D60 public/OSS sources can only improve names and use notes here. Generic-only divisions stay hidden from final claims until source, formula variant, and numeric oracle gates close.",
"claim_status": "partial",
"created_at": "2026-07-19",
"production_tuning_allowed": false,
"scope": "d1_d60_source_use_readiness",
"source_hash": "586215412fa87afed77fdc5844ce64d32ef0c39599722890e634b7732342da8e",
"source_queue": "references/oracle/d1_d60_public_source_candidate_queue_2026_07_19.json",
"source_registry": "references/oracle/d1_d60_varga_mapping_registry_2026_07_19.json",
"sources": [
{
"allowed_update": "names_and_use_notes_only",
"blocked_update": "numeric_formula_or_truth_without_variant_review",
"candidate_use": "D1-D60 names/use cross-check",
"readiness": "source_text_candidate_not_numeric_oracle",
"url": "https://www.barbarapijan.com/bpa/Varga/varga.html"
},
{
"allowed_update": "names_and_use_notes_only",
"blocked_update": "numeric_formula_or_truth_without_variant_review",
"candidate_use": "common varga names/use",
"readiness": "source_text_candidate_not_numeric_oracle",
"url": "https://www.astrosage.com/astrology/divisional-charts.asp"
},
{
"allowed_update": "names_and_use_notes_only",
"blocked_update": "numeric_formula_or_truth_without_variant_review",
"candidate_use": "permissive OSS varga implementation cross-check",
"readiness": "implementation_observation_only",
"url": "https://github.com/northtara/jyotishganit"
}
],
"status": "source_use_readiness_ready",
"summary": {
"allowed_scope": "names_and_use_notes_only",
"candidate_source_count": 3,
"generic_only_count": 0,
"numeric_oracle_ready_count": 0
},
"truth_matrix_allowed": false
}
File diff suppressed because it is too large Load Diff
@@ -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": 65,
"packet_count": 66,
"blocked_or_partial_count": 40,
"human_review_required_count": 1
},
@@ -529,6 +529,14 @@
"claim_status": "partial",
"consumer_policy": "research_to_commercial_contract_only",
"claim_boundary": "Classifies Muhurta factors as supporting-context only; no scored verdict readiness until formulas, weights, public examples, and replay hashes close."
},
{
"packet_id": "d1_d60_source_use_readiness",
"path": "references/oracle/d1_d60_source_use_readiness_2026_07_19.json",
"domain": "varga_mapping",
"claim_status": "partial",
"consumer_policy": "research_to_commercial_contract_only",
"claim_boundary": "Classifies D1-D60 sources for names/use notes only; generic-only Dn remains hidden until formula/source/oracle gates close."
}
]
}
+76
View File
@@ -0,0 +1,76 @@
#!/usr/bin/env python3
"""Classify D1-D60 source candidates for name/use readiness."""
from __future__ import annotations
import hashlib
import json
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[1]
QUEUE = ROOT / "references/oracle/d1_d60_public_source_candidate_queue_2026_07_19.json"
REGISTRY = ROOT / "references/oracle/d1_d60_varga_mapping_registry_2026_07_19.json"
def stable_json(data: Any) -> str:
return json.dumps(data, ensure_ascii=False, sort_keys=True, separators=(",", ":"), default=str)
def source_readiness(source: dict[str, Any]) -> str:
if source["oracle_status"] == "observation_only":
return "implementation_observation_only"
return "source_text_candidate_not_numeric_oracle"
def build() -> dict[str, Any]:
queue = json.loads(QUEUE.read_text(encoding="utf-8"))
registry = json.loads(REGISTRY.read_text(encoding="utf-8"))
sources = [
{
"url": source["url"],
"candidate_use": source["candidate_use"],
"readiness": source_readiness(source),
"allowed_update": "names_and_use_notes_only",
"blocked_update": "numeric_formula_or_truth_without_variant_review",
}
for source in queue["candidate_sources"]
]
generic_only = [
row
for row in registry.get("rows", [])
if row.get("status") == "generic_only"
]
summary = {
"candidate_source_count": len(sources),
"generic_only_count": len(generic_only),
"numeric_oracle_ready_count": 0,
"allowed_scope": "names_and_use_notes_only",
}
return {
"scope": "d1_d60_source_use_readiness",
"created_at": "2026-07-19",
"status": "source_use_readiness_ready",
"claim_status": "partial",
"production_tuning_allowed": False,
"truth_matrix_allowed": False,
"source_queue": str(QUEUE.relative_to(ROOT)),
"source_registry": str(REGISTRY.relative_to(ROOT)),
"summary": summary,
"source_hash": hashlib.sha256(stable_json(sources).encode("utf-8")).hexdigest(),
"sources": sources,
"boundary": (
"D1-D60 public/OSS sources can only improve names and use notes here. "
"Generic-only divisions stay hidden from final claims until source, "
"formula variant, and numeric oracle gates close."
),
}
def main() -> int:
print(json.dumps(build(), ensure_ascii=False, indent=2, sort_keys=True))
return 0
if __name__ == "__main__":
raise SystemExit(main())
+109
View File
@@ -0,0 +1,109 @@
#!/usr/bin/env python3
"""Generate D1-D60 varga mapping coverage registry."""
from __future__ import annotations
import json
FORMAL = {
1: ("Rashi", "本命盘/身体/整体命运", False),
2: ("Hora", "财富/资源", True),
3: ("Drekkana", "兄弟姐妹/勇气", True),
4: ("Chaturthamsa", "房产/基础/运气", True),
5: ("Panchamsa", "权力/名声", True),
6: ("Shashthamsa", "疾病/敌人", True),
7: ("Saptamsa", "子女/创造", True),
8: ("Ashtamsa", "突发/寿元风险", True),
9: ("Navamsa", "婚姻/法/内在成熟", True),
10: ("Dasamsa", "事业/行动/地位", True),
11: ("Rudramsa", "破坏/转化", True),
12: ("Dwadasamsa", "父母/祖系", True),
16: ("Shodasamsa", "车辆/舒适/享受", True),
20: ("Vimsamsa", "灵性修行", True),
24: ("Chaturvimsamsa", "教育/学习", True),
27: ("Bhamsa/Saptavimsamsa", "力量/弱点", True),
30: ("Trimsamsa", "不幸/困难/过失", True),
40: ("Khavedamsa", "吉凶效果/母系", True),
45: ("Akshavedamsa", "总体品格/父系", True),
60: ("Shashtiamsa", "业力/深层因果", True),
}
JYOTISHGANIT = {1, 2, 3, 4, 7, 9, 10, 12, 16, 20, 24, 27, 30, 40, 45, 60}
SKILL_USED = {1, 2, 4, 9, 10, 11, 24, 30, 60}
API_USED = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 20, 24, 27, 30, 40, 45, 60}
UI_USED = {1, 9, 10, 24, 30, 60}
ORACLE_PARTIAL = {1, 2, 4, 9, 10, 30, 60}
CORE = {1, 2, 4, 9, 10, 24, 30, 60}
def row(n: int) -> dict:
formal = n in FORMAL
name, use, special = FORMAL.get(n, (None, None, False))
if formal:
local_basis = "formal_branch_or_explicit_enum"
else:
local_basis = "generic_fallback_only_unvalidated"
if n == 1:
local_basis = "natal_chart_core"
claim = (
"ready_or_partial_core"
if n in CORE
else "partial_formal_not_core"
if formal
else "low_rigor_generic_only"
)
boundary = (
"Commonly used varga with local/API coverage; still requires oracle parity for high-rigor claims."
if n in CORE
else "Formal named varga exists locally but is not consistently invoked by skill/UI and lacks complete oracle parity."
if formal
else "Only generic Dn fallback can compute a sign; no formal name/use/special formula/oracle is registered, so do not present as completed traditional varga."
)
return {
"division": f"D{n}",
"number": n,
"local_computable": True,
"local_basis": local_basis,
"formal_name_present": formal,
"formal_name": name,
"traditional_use_present": use is not None,
"traditional_use": use,
"special_formula_present": special,
"skill_invoked": n in SKILL_USED,
"api_entry": n in API_USED,
"ui_entry": n in UI_USED,
"jyotishganit_external_observation": n in JYOTISHGANIT,
"external_oracle_status": "partial_or_smoke" if n in ORACLE_PARTIAL else "missing",
"claim_status": claim,
"claim_boundary": boundary,
}
def build() -> dict:
rows = [row(n) for n in range(1, 61)]
return {
"scope": "d1_d60_varga_mapping_registry",
"created_at": "2026-07-19",
"status": "complete_registry",
"claim_status": "partial",
"production_tuning_allowed": False,
"truth_matrix_allowed": False,
"summary": {
"total_rows": 60,
"formal_name_count": sum(1 for r in rows if r["formal_name_present"]),
"generic_only_count": sum(1 for r in rows if r["claim_status"] == "low_rigor_generic_only"),
"skill_invoked_count": sum(1 for r in rows if r["skill_invoked"]),
"ui_entry_count": sum(1 for r in rows if r["ui_entry"]),
"oracle_partial_or_smoke_count": sum(1 for r in rows if r["external_oracle_status"] != "missing"),
},
"boundary": "D1-D60 rows are enumerated. Generic fallback rows are not formal traditional varga completion and must not be advertised as verified D1-D60 support.",
"rows": rows,
}
def main() -> int:
print(json.dumps(build(), ensure_ascii=False, indent=2, sort_keys=True))
return 0
if __name__ == "__main__":
raise SystemExit(main())
+39
View File
@@ -0,0 +1,39 @@
import json
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
ARTIFACT = ROOT / "references/oracle/d1_d60_source_use_readiness_2026_07_19.json"
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
def test_d1_d60_source_readiness_script_keeps_scope_narrow():
data = json.loads(
subprocess.check_output(
["python3", "scripts/d1_d60_source_use_readiness.py"],
cwd=ROOT,
text=True,
)
)
assert data["scope"] == "d1_d60_source_use_readiness"
assert data["claim_status"] == "partial"
assert data["truth_matrix_allowed"] is False
assert data["summary"]["candidate_source_count"] >= 3
assert data["summary"]["numeric_oracle_ready_count"] == 0
def test_d1_d60_source_readiness_allows_only_names_and_use_notes():
data = json.loads(ARTIFACT.read_text(encoding="utf-8"))
assert data["summary"]["allowed_scope"] == "names_and_use_notes_only"
assert all(row["allowed_update"] == "names_and_use_notes_only" for row in data["sources"])
assert all("numeric_formula" in row["blocked_update"] for row in data["sources"])
assert "Generic-only divisions stay hidden" in data["boundary"]
def test_evidence_index_registers_d1_d60_source_readiness():
packets = {
row["packet_id"]: row
for row in json.loads(INDEX.read_text(encoding="utf-8"))["packets"]
}
assert packets["d1_d60_source_use_readiness"]["claim_status"] == "partial"
@@ -0,0 +1,52 @@
import json
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
REGISTRY = ROOT / "references/oracle/d1_d60_varga_mapping_registry_2026_07_19.json"
INDEX = ROOT / "references/oracle/evidence_packet_index_2026_07_19.json"
def test_generator_outputs_all_d1_to_d60_rows():
data = json.loads(
subprocess.check_output(["python3", "scripts/d1_d60_varga_mapping_registry.py"], cwd=ROOT, text=True)
)
assert data["scope"] == "d1_d60_varga_mapping_registry"
assert data["summary"]["total_rows"] == 60
assert [row["number"] for row in data["rows"]] == list(range(1, 61))
assert data["production_tuning_allowed"] is False
assert data["truth_matrix_allowed"] is False
def test_registry_marks_formal_vs_generic_rows():
data = json.loads(REGISTRY.read_text(encoding="utf-8"))
rows = {row["number"]: row for row in data["rows"]}
assert rows[1]["formal_name"] == "Rashi"
assert rows[9]["formal_name"] == "Navamsa"
assert rows[10]["skill_invoked"] is True
assert rows[60]["formal_name"] == "Shashtiamsa"
assert rows[13]["formal_name_present"] is False
assert rows[13]["local_basis"] == "generic_fallback_only_unvalidated"
assert rows[13]["claim_status"] == "low_rigor_generic_only"
assert "must not be advertised" in data["boundary"]
def test_registry_tracks_api_ui_skill_oracle_boundaries():
data = json.loads(REGISTRY.read_text(encoding="utf-8"))
rows = {row["number"]: row for row in data["rows"]}
assert rows[24]["api_entry"] is True
assert rows[24]["ui_entry"] is True
assert rows[27]["api_entry"] is True
assert rows[27]["ui_entry"] is False
assert rows[27]["external_oracle_status"] == "missing"
assert data["summary"]["formal_name_count"] == 20
assert data["summary"]["generic_only_count"] == 40
def test_evidence_index_registers_d1_d60_registry():
index = json.loads(INDEX.read_text(encoding="utf-8"))
packets = {row["packet_id"]: row for row in index["packets"]}
packet = packets["d1_d60_varga_mapping_registry"]
assert packet["path"] == "references/oracle/d1_d60_varga_mapping_registry_2026_07_19.json"
assert packet["claim_status"] == "partial"