fix(web): count only training events for discrimination and split user-stop from validated range
Three collected events with a reserved holdout were stalling because the discriminator door counted holdout. Public selection_allowed still had snapshot fallbacks, and health only proved the image SHA. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,7 @@ from scripts.rectification.house_table import compact_house_table_from_contexts
|
||||
from scripts.rectification.horary_observation import build_horary_observation
|
||||
from scripts.rectification.refinement_packet import build_refinement_packet
|
||||
from scripts.rectification.candidate_contrast import context_time, select_signature_representatives
|
||||
from scripts.rectification.case_holdout import holdout_event_ids
|
||||
from scripts.rectification.scoring_service import precision_weight
|
||||
from scripts.rectification.sealed_holdout import holdout_passed, load_sealed_minute_holdout
|
||||
from scripts.rectification_policy import (
|
||||
@@ -424,11 +425,16 @@ def build_decision_receipt(
|
||||
diagnostics: dict[str, Any],
|
||||
) -> dict[str, Any]:
|
||||
scoreable_events = [event for event in request["events"] if is_primary_scoreable_event(event)]
|
||||
domains = sorted({event["domain"] for event in scoreable_events})
|
||||
holdout = holdout_event_ids(request["events"])
|
||||
training_events = [
|
||||
event for event in scoreable_events
|
||||
if str(event.get("id") or "") not in holdout
|
||||
]
|
||||
domains = sorted({event["domain"] for event in training_events})
|
||||
candidate_presence = _gate(bool(candidate_decisions), candidate_count=len(candidate_decisions))
|
||||
event_quality = _gate(
|
||||
len(scoreable_events) >= MIN_ACCEPTANCE_EVENTS,
|
||||
scoreable_event_count=len(scoreable_events),
|
||||
len(training_events) >= MIN_ACCEPTANCE_EVENTS,
|
||||
scoreable_event_count=len(training_events),
|
||||
minimum=MIN_ACCEPTANCE_EVENTS,
|
||||
)
|
||||
domain_diversity = _gate(
|
||||
@@ -437,7 +443,7 @@ def build_decision_receipt(
|
||||
minimum=MIN_ACCEPTANCE_DOMAINS,
|
||||
domains=domains,
|
||||
)
|
||||
date_quality = _date_quality(scoreable_events)
|
||||
date_quality = _date_quality(training_events)
|
||||
top_tied_count = candidate_decisions[0]["tied_minute_count"] if candidate_decisions else 0
|
||||
unique_top = _gate(top_tied_count == 1, tied_minute_count=top_tied_count)
|
||||
diagnostic_quality = _diagnostic_quality(diagnostics)
|
||||
|
||||
Reference in New Issue
Block a user