fix(rectification): offer representative time once event-fit is enough

Keep unique-top and width on confirmation only, and stop lagna-frame follow-ups from blocking cards on an already-scored cluster.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-21 02:01:57 +08:00
parent 5fdabfae89
commit a88467ffa8
12 changed files with 180 additions and 41 deletions
+17 -10
View File
@@ -481,11 +481,13 @@ def build_decision_receipt(
reasons = [*acceptance_reasons, *confirmation_reasons]
representative = candidate_decisions[0] if candidate_decisions else None
width = indistinguishable_width_minutes(candidate_decisions)
packet = build_refinement_packet(
request,
built,
representative_time=representative["time"] if representative else None,
candidate_times=[item["time"] for item in candidate_decisions],
cluster_width_minutes=width,
)
if packet["dasha_agreement"]["status"] == "conflict":
if overall_confidence == "high":
@@ -494,7 +496,6 @@ def build_decision_receipt(
overall_confidence = "low"
reasons.append("vimshottari_narayana_conflict")
confirmation_reasons.append("vimshottari_narayana_conflict")
width = indistinguishable_width_minutes(candidate_decisions)
adjacent_passed = unique_top["passed"] and width <= MAX_CONFIRMATION_WIDTH_MINUTES
confirmation_event_quality = len(scoreable_events) >= MIN_CONFIRMATION_EVENTS
confirmation_domain_quality = len(domains) >= MIN_CONFIRMATION_DOMAINS
@@ -508,17 +509,23 @@ def build_decision_receipt(
confirmation_reasons.append("insufficient_confirmation_margin")
if not adjacent_passed:
confirmation_reasons.append("adjacent_minutes_indistinguishable")
propose_allowed = all((
acceptance_allowed,
unique_top["passed"],
diagnostic_quality["passed"],
required_layers["passed"],
confirmation_event_quality,
confirmation_domain_quality,
adjacent_passed,
))
fit_high = packet["event_fit_rate"].get("band") == "high"
propose_allowed = bool(
acceptance_allowed
and required_layers["passed"]
and (
fit_high
or all((
diagnostic_quality["passed"],
confirmation_event_quality,
confirmation_domain_quality,
))
)
)
engine_granted = all((
propose_allowed,
unique_top["passed"],
adjacent_passed,
confirmation_margin,
not dasha_conflict,
))