feat(skill): advance shadbala oracle evidence

This commit is contained in:
732642856
2026-06-27 01:48:47 +08:00
parent fec9f23702
commit 1d24ad0b68
11 changed files with 160 additions and 58 deletions
+4 -3
View File
@@ -27,7 +27,8 @@ LOCAL_ENGINE_MARKERS = [
SHADBALA_REQUIRED_PLANETS = ["Sun", "Moon", "Mars", "Mercury", "Jupiter", "Venus", "Saturn"]
SHADBALA_REQUIRED_COMPONENTS = ["sthana", "dig", "kala", "chesta", "naisargika", "drik"]
SHADBALA_COMPONENT_MAX_RUPA = 20.0
SHADBALA_DRIK_MIN_RUPA = -20.0
SHADBALA_NEGATIVE_ALLOWED_COMPONENTS = {"dig", "drik"}
SHADBALA_COMPONENT_MIN_RUPA = -20.0
SHADBALA_TOTAL_TOLERANCE_RUPA = 0.05
ASHTAKOOT_SCORE_RANGES = {
"target.total_score": (0.0, 36.0),
@@ -154,10 +155,10 @@ def _validate_shadbala_components(value: Any) -> list[str]:
if not isinstance(component_value, (int, float)) or isinstance(component_value, bool):
problems.append(f"invalid_shadbala_component_type:{planet}.{component}")
continue
if component == "drik" and component_value < SHADBALA_DRIK_MIN_RUPA:
if component in SHADBALA_NEGATIVE_ALLOWED_COMPONENTS and component_value < SHADBALA_COMPONENT_MIN_RUPA:
problems.append(f"invalid_shadbala_component_range:{planet}.{component}")
continue
if component != "drik" and component_value < 0:
if component not in SHADBALA_NEGATIVE_ALLOWED_COMPONENTS and component_value < 0:
problems.append(f"invalid_shadbala_component_negative:{planet}.{component}")
continue
if component_value > SHADBALA_COMPONENT_MAX_RUPA: