Uh oh!
There was an error while loading. Please reload this page.
Gate data-status statistics on use_for_projections - #2237
Merged
Conversation
The data-status statistics pool drew from every split time on a course with no event scoping, so fabricated test times on a shared course corrupted the pace-factor baseline for real events. Join the begin-side subquery through efforts to events and require use_for_projections, matching the predicate Projection.sql already uses. Also discard negative segment pairs from the pool. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SimulateInProgressEventGroup now sets use_for_projections false on the events it creates, so fabricated times cannot feed projections or the data-status pool even on a shared course. DuplicateEventGroup is deliberately unchanged: UI duplicates are next year's real races, whose live times must feed the stream; a regression spec pins that. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A zero or negative pooled average previously produced an all-zero limits band, against which every real time evaluated as bad. Return empty limits for non-positive typical times on scaling limit types so statuses degrade to unknown; zero_start and in_aid types keep their intentional fixed bands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #2169 using the
use_for_projectionsflag from #2229 rather than course deep-copying. Three parts, one commit each:1.
SplitTimeQuery.typical_segment_timegains event scoping. The data-status statistics pool previously drew from every split time on a course — no event, concealment, or flag filter — which is how fabricated test times dragged a pooled segment average to ~880 days and flagged every real finisher "bad" in the incident. The begin-side subquery now joins efforts → events and requiresuse_for_projections is true, the same predicateProjection.sqluses (filtering one side of the st1/st2 pair suffices since they inner-join on effort_id). The pool also now discards negative segment pairs (st2.absolute_time >= st1.absolute_time;>=preserves legitimate zero-elapsed in-aid pass-throughs).2. Simulated groups opt out automatically.
SimulateInProgressEventGroupsetsuse_for_projections: falseon the events it creates — this also closes a live hole where simulated events (default flag true) were feedingProjection.DuplicateEventGroupis deliberately unchanged: UI duplicates are next year's real races whose live times must feed the stream, and nothing warns in the false→true direction; a regression spec pins that behavior.3. Degenerate baseline degrades to unknown, never all-bad.
SegmentTimesContainer#limitsreturns empty limits for a non-positive typical time on scaling limit types, andDataStatus.determinereturns nil for empty limits — so a garbage baseline now yields "unknown" statuses instead of flagging everything bad.zero_start(intentionally all-zero band) andin_aid(fixed 15-minute allowance keeps the band usable) are exempted, preserving current behavior.Out of scope, per review of the plan: the
TimePredictorpace-factor hardening (positive-pace guard for a latentFloatDomainErrorwhen the typical completed time is exactly 0.0, plus a clamp) — follow-up ticket to come. Also noted:SplitTimeQuery.effort_timesstill filters on concealment but is dead code (its only wrapper,SplitTime.effort_times, has no callers) — left untouched here; deleting it is a separate cleanup.Behavior changes worth knowing
:focused(similar-effort) baselines are gated too — flag-false events feed no baseline of any kind.Resolves#2169
Testing
🤖 Generated with Claude Code