- affliction_evidence / career_semantic_profile / career_analysis (functional roles, affliction signals, user-industry gate) - sade_sati.build_saturn_cycle_timeline with bisected ingress moments (FLG_SIDEREAL frame, BUG-1275) - Chesta profile candidates and PL9 AV cell profile as sidecars (shadbala.py / ashtakavarga.py stay frozen, ERR-110) - Raman Sahams in the annual pack; book rule packets + admission gate - consultation_native_layers: affliction_evidence, career_analysis, sade_sati_timeline, shadbala_chesta_profiles, book_rules, annual_tajika.raman_sahams Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
137 lines
5.4 KiB
Python
137 lines
5.4 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from scripts.career_semantic_profile import (
|
|
build_career_execution_audit,
|
|
build_career_semantic_profile,
|
|
load_taxonomy,
|
|
)
|
|
from scripts.career_analysis import analyze_career
|
|
|
|
|
|
def test_taxonomy_has_twelve_domains_with_six_to_fifteen_role_clusters() -> None:
|
|
taxonomy = load_taxonomy(Path("references/career_semantic_taxonomy.json"))
|
|
assert len(taxonomy["domains"]) == 12
|
|
for domain in taxonomy["domains"].values():
|
|
assert 6 <= len(domain["role_clusters"]) <= 15
|
|
creative = taxonomy["domains"]["creative_media"]["role_clusters"]
|
|
assert {
|
|
"screenwriter",
|
|
"story_development",
|
|
"ip_adaptation",
|
|
"creative_production",
|
|
"creator_economy",
|
|
} <= set(creative)
|
|
contemporary_roles = {
|
|
"technology_product_data": {"ai_product_and_agent_workflows", "data_governance"},
|
|
"commercial_operations_projects": {"platform_growth", "digital_content_strategy"},
|
|
"law_compliance_public_service": {"climate_esg"},
|
|
"entrepreneurship_independent_practice": {"remote_independent_practice", "digital_ip_operations"},
|
|
}
|
|
for domain_id, expected_roles in contemporary_roles.items():
|
|
assert expected_roles <= set(taxonomy["domains"][domain_id]["role_clusters"])
|
|
assert all(
|
|
rule["provenance"] in {"existing_source", "traditional_reference", "research_hypothesis"}
|
|
for domain in taxonomy["domains"].values()
|
|
for role in domain["role_clusters"].values()
|
|
for rule in role["signals"]
|
|
)
|
|
|
|
|
|
def test_profile_blocks_when_full_spectrum_career_evidence_is_missing() -> None:
|
|
profile = build_career_semantic_profile({}, None, {"status": "used"})
|
|
assert profile["status"] == "blocked"
|
|
assert {"D1", "D10", "A10", "western"} <= set(profile["missing_required_evidence"])
|
|
|
|
|
|
def test_profile_requires_executed_audit_not_only_present_data() -> None:
|
|
modules = {
|
|
"chart": {"ascendant": {"sign": "Leo"}},
|
|
"varga_full": {"D10_Dasamsa": {"Mercury": {"sign": "Virgo"}}},
|
|
"special_lagnas": {"A10_Karma_Pada": {"sign": "Gemini"}},
|
|
}
|
|
profile = build_career_semantic_profile(modules, {"natal": {}}, {"status": "used"})
|
|
assert profile["status"] == "blocked"
|
|
assert {"D1", "D10", "A10", "vimsopaka", "western"} <= set(profile["missing_required_evidence"])
|
|
|
|
|
|
def test_legacy_career_analysis_marks_sign_indicator_recommendations() -> None:
|
|
analysis = analyze_career({"Saturn": {"house": 10}}, asc_sign="Aries")
|
|
assert analysis["field_recommendation_mode"] == "legacy_sign_indicator"
|
|
assert analysis["fields"]
|
|
|
|
|
|
def test_career_analysis_uses_ranked_semantic_clusters_when_supplied() -> None:
|
|
semantic_profile = {
|
|
"status": "used",
|
|
"ranked_role_clusters": [
|
|
{"id": "screenwriter", "domain": "creative_media", "score": 14},
|
|
{"id": "creative_production", "domain": "creative_media", "score": 11},
|
|
],
|
|
}
|
|
analysis = analyze_career(
|
|
{"Saturn": {"house": 10}},
|
|
asc_sign="Aries",
|
|
career_semantic_profile=semantic_profile,
|
|
)
|
|
assert analysis["field_recommendation_mode"] == "evidence_ranked_clusters"
|
|
assert analysis["fields"] == semantic_profile["ranked_role_clusters"]
|
|
|
|
|
|
def test_creative_house_evidence_ranks_screenwriter_above_commercial_operations() -> None:
|
|
modules = {
|
|
"chart": {
|
|
"ascendant": {"sign": "Leo"},
|
|
"planets": {
|
|
"Venus": {"sign": "Pisces", "house": 5},
|
|
"Mercury": {"sign": "Gemini", "house": 3},
|
|
"Saturn": {"sign": "Aries", "house": 9},
|
|
},
|
|
},
|
|
"varga_full": {
|
|
"D10_Dasamsa": {
|
|
"Venus": {"sign": "Aquarius", "house": 5},
|
|
"Mercury": {"sign": "Capricorn", "house": 10},
|
|
"Saturn": {"sign": "Aries", "house": 9},
|
|
}
|
|
},
|
|
"special_lagnas": {"A10_Karma_Pada": {"sign": "Capricorn"}},
|
|
}
|
|
western = {
|
|
"natal": {
|
|
"angles": {"mc": {"sign": "Gemini", "ruler": "Mercury"}},
|
|
"planets": {
|
|
"venus": {"house": 5},
|
|
"mercury": {"house": 5},
|
|
"saturn": {"house": 9},
|
|
},
|
|
}
|
|
}
|
|
profile = build_career_semantic_profile(
|
|
modules,
|
|
western,
|
|
{"status": "used", "source_path": "modules.vimsopaka"},
|
|
build_career_execution_audit(modules, western, {"status": "used"}),
|
|
)
|
|
roles = {row["id"]: row for row in profile["ranked_role_clusters"]}
|
|
assert roles["screenwriter"]["score"] > roles["commercial_operations"]["score"]
|
|
assert {
|
|
"modules.chart.planets.Mercury.house",
|
|
"modules.chart.planets.Venus.house",
|
|
"modules.varga_full.D10_Dasamsa.Mercury.house",
|
|
"modules.varga_full.D10_Dasamsa.Venus.house",
|
|
"natal.planets.mercury.house",
|
|
"natal.angles.mc.ruler",
|
|
} <= {item["path"] for item in roles["screenwriter"]["supporting_evidence"]}
|
|
assert any(item["path"] == "modules.chart.planets.Saturn.house" for item in roles["screenwriter"]["counter_evidence"])
|
|
assert roles["screenwriter"]["assertion_label"] == "multi_system_consensus"
|
|
assert profile["source_paths"] == {
|
|
"D1": "modules.chart",
|
|
"D10": "modules.varga_full.D10_Dasamsa",
|
|
"A10": "modules.special_lagnas.A10_Karma_Pada",
|
|
"vimsopaka": "modules.vimsopaka",
|
|
"western": "western.natal",
|
|
}
|
|
assert "ascendant" not in str(profile).lower()
|