Skip to content

GridFPV-native minimum lap time (D26): the floor lives in the system of record#369

Merged
ryan-johnson2 merged 3 commits into
develfrom
min-lap-native
Jul 4, 2026
Merged

GridFPV-native minimum lap time (D26): the floor lives in the system of record#369
ryan-johnson2 merged 3 commits into
develfrom
min-lap-native

Conversation

@ryan-johnson2

Copy link
Copy Markdown
Contributor

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.

  • Round setting: min_lap_secs — new rounds seed 5s in the form, 0/absent = off (pre-existing rounds bit-identical), >600s rejected, frozen once raced (D24).
  • Fold suppression: a raw pass closing an under-floor lap is auto-removed (keep-first per echo burst), identically in laps/live/results/rankings — the 0.004s phantom can never be a best lap again.
  • Marshal override: auto-removed crossings appear on the removal record as under min lap, auto-removed with Restore = an AdjustLap re-asserting the raw instant; explicit rulings (inserts, splits, re-times) always outrank the floor.
  • Evidence preserved: the log keeps every raw pass; suppression is a view rule.
  • Rides along: the mock-plugin RSSI-decay fix that removes the start-line double-fire at its source, plus docs (D26, marshaling note).

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

ryan-johnson2 and others added 3 commits July 4, 2026 21:52
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>
@ryan-johnson2 ryan-johnson2 merged commit 1dc8228 into devel Jul 4, 2026
3 checks passed
@ryan-johnson2 ryan-johnson2 deleted the min-lap-native branch July 4, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant