GridFPV-native minimum lap time (D26): the floor lives in the system of record#369
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Timers are dumb emitters; GridFPV owns lap semantics. The trigger: a start-line double-detection gave every pilot a phantom 0.004s 'lap 1' — and RotorHazard HAD MinLapSec=10 set, but its default behavior records-and-highlights rather than discards, so the sub-min lap reached us with no invalid marker. Enforcement now lives in the system of record: - RoundDef.min_lap_secs (optional; the form seeds 5s for new rounds; 0/absent = off so pre-existing rounds keep bit-identical results; >600s rejected as a typo; FROZEN once the round has raced — it re-scores official heats, D24). - The corrected-passes fold auto-suppresses a RAW pass that would close an under-floor lap (keep-first per burst) — applied identically in the lap list, the live view, and every scoring path via corrected_passes_with_floor / lap_list_marshaled_with_floor / live_state_over_with_floor, so the score and the lap list can never disagree about an echo. The log keeps every raw pass: suppression is a view-fold rule, never data destruction. - The removal record grows a reason (VoidReason::Marshal | UnderMinLap): auto- removed crossings render 'under min lap, auto-removed' beside marshal voids, and Restore branches — a marshal void restores via void-the-void; a floor suppression restores via an AdjustLap re-asserting the raw instant (an explicit ruling always outranks the floor, so inserted/split/re-timed passes are exempt by construction; a whoop track's genuine 2s laps stay scoreable). - The pilot ws view (whole-log, cross-round) stays unfloored by design — rounds carry different floors; the per-heat views are the authoritative surfaces. - Rides along: the gridfpv_mock plugin lands node RSSI back at BASELINE after each injected pass — parked-at-peak nodes read as 'sitting on the gate' at the NEXT race start, which is what fired the phantom double in the first place. Docs: decisions.html D26 + marshaling.html note. Tests: 5 fold suppression cases, the scoring seam (a 4ms echo can no longer be a best lap), freeze + normalization + bounds, console removal-row label + Restore command, rounds-form round-trip. 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 free
to 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.
Per the decision that timers are dumb emitters and GridFPV owns the primary work: a per-round min lap time enforced in the corrected-passes fold, beneath every projection.
min_lap_secs— new rounds seed 5s in the form, 0/absent = off (pre-existing rounds bit-identical), >600s rejected, frozen once raced (D24).AdjustLapre-asserting the raw instant; explicit rulings (inserts, splits, re-times) always outrank the floor.Verification: 419 server + 74 projection + full workspace green; 623 rd-console + 95 contract tests; both svelte-checks clean; fmt/lint/prettier clean.
🤖 Generated with Claude Code