feat(rectification): add refinement packet without unique-minute claims
Surface D9/D10 change minutes, event-dasha match copy, dual-dasha conflict, and a post-adopt consult handoff so users can keep narrowing or start a reading from a representative time. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,7 @@ from typing import Any, Sequence
|
||||
|
||||
from scripts.active_rectification_events import CandidateScoreRow
|
||||
from scripts.rectification.contracts import RectificationRequest
|
||||
from scripts.rectification.refinement_packet import window_scan
|
||||
|
||||
|
||||
def _winner(rows: Sequence[CandidateScoreRow]) -> str | None:
|
||||
@@ -68,34 +69,6 @@ def _candidate_feature_contrast(built: dict[str, Any], primary_time: str, second
|
||||
return sorted(set(layers))[:8]
|
||||
|
||||
|
||||
def window_scan(built: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Minute-window D9/D10 lagna diversity. Indices only; never sign names."""
|
||||
d9: set[int] = set()
|
||||
d10: set[int] = set()
|
||||
for context in built.get("static_contexts") or []:
|
||||
feature = context.get("feature") if isinstance(context, dict) else None
|
||||
if not isinstance(feature, dict):
|
||||
continue
|
||||
vargas = feature.get("varga_ascendants") or {}
|
||||
if not isinstance(vargas, dict):
|
||||
continue
|
||||
d9_value = vargas.get("D9")
|
||||
d10_value = vargas.get("D10")
|
||||
if isinstance(d9_value, int):
|
||||
d9.add(d9_value)
|
||||
if isinstance(d10_value, int):
|
||||
d10.add(d10_value)
|
||||
return {
|
||||
"scanned": True,
|
||||
"confirmation_allowed": False,
|
||||
"unique_minute_claim": False,
|
||||
"d9_lagna_count": len(d9),
|
||||
"d10_lagna_count": len(d10),
|
||||
"d9_candidates_differ": len(d9) > 1,
|
||||
"d10_candidates_differ": len(d10) > 1,
|
||||
}
|
||||
|
||||
|
||||
def _candidate_contrast(built: dict[str, Any], primary_time: str, secondary_time: str) -> tuple[list[str], list[str]]:
|
||||
event_deltas: list[tuple[float, str]] = []
|
||||
for event_id, candidates in built["matrix"].items():
|
||||
|
||||
Reference in New Issue
Block a user