fix(rectification): restore classic eight methods and observe KP Placidus cusps

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-20 15:58:28 +08:00
parent a1914686e8
commit 84e6191fc2
42 changed files with 1488 additions and 185 deletions
+5 -1
View File
@@ -12,7 +12,7 @@ from scripts.active_rectification_event_engine import compute_candidate_static_c
from scripts.active_rectification_events import CandidateScoreRow
from scripts.rectification.contracts import LifeEvent, RectificationRequest, is_scoreable_event
ALGORITHM_VERSION = "rectification-v5-matrix-scoring-5"
ALGORITHM_VERSION = "rectification-v5-matrix-scoring-6"
INPUT_CONTRACT_VERSION = "rectification-calculation-spec-v4"
PRECISION_WEIGHTS = {
"day": 1.0,
@@ -53,6 +53,7 @@ _ENGINE_KIND_BY_NATIVE_KIND: dict[str, tuple[str, str]] = {
"family_event": ("family", "family_event"),
"appearance_note": ("appearance", "appearance_note"),
"birthmark_or_scar": ("appearance", "birthmark_or_scar"),
"occupation_note": ("occupation", "occupation_note"),
}
@@ -167,6 +168,7 @@ _KIND_SEMANTICS: dict[str, tuple[int, float]] = {
"family_event": (0, 1.0),
"appearance_note": (0, 0.8),
"birthmark_or_scar": (-1, 0.8),
"occupation_note": (0, 0.8),
}
@@ -195,6 +197,8 @@ def public_technique_layers(domain: str, rule_ids: Sequence[str]) -> list[str]:
layers.update({"d1-rashi", "d30-trimshamsha"})
elif domain in {"appearance", "marks"}:
layers.add("d1-rashi")
elif domain == "occupation":
layers.update({"d1-rashi", "d10-dashamsa"})
return sorted(layers)