fix(rectification): route follow-ups by method layer and rescore when evidence changes
Independent Staging Quality Gate / validate (push) Successful in 9m12s
Independent Staging Quality Gate / publish (push) Successful in 7m28s

Web was round-robinning missing domains and waiting to score until the user said they had no more events. Server follow-up now uses the eight-method plan, rescored snapshots stay candidates, and D9/D10 observations never become user labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-19 09:56:54 +08:00
parent f708edf365
commit 233c728176
27 changed files with 1516 additions and 80 deletions
@@ -68,6 +68,34 @@ 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():
@@ -137,4 +165,5 @@ def run_diagnostics(request: RectificationRequest, rows: list[CandidateScoreRow]
"candidate_splits": candidate_splits,
"leave_one_event_out": event_runs,
"leave_one_domain_out": domain_runs,
"window_scan": window_scan(built),
}