Skip to content

Marshaling: current-run scoring + dual-adapter crash + topmost drag handles#350

Merged
ryan-johnson2 merged 3 commits into
develfrom
current-run-scoring
Jul 3, 2026
Merged

Marshaling: current-run scoring + dual-adapter crash + topmost drag handles#350
ryan-johnson2 merged 3 commits into
develfrom
current-run-scoring

Conversation

@ryan-johnson2

Copy link
Copy Markdown
Contributor

Three fixes from live tune-detection testing (the 'can't slide thresholds after switching pilots' report). Root-caused in a real browser against the rig's actual heat data — the report unfolded into three distinct defects:

  1. A restarted heat scored BOTH runs (serious, general): heat_window_offsets folded every pass the heat ever saw across Aborts/Restarts — the abandoned ghost run out-ranked the real one (observed live: one pilot holding positions 1 AND 2 with 39 ghost laps). The window now folds from the heat's current run (current_run_start, the exact rule the live standings adopted in June); pre-restart rulings drop with their run, post-restart rulings apply. Regression test included.
  2. Dual-adapter competitor crash (the reported symptom): one ref under two adapters (mid-heat failover, or mixed-source debris) collided bare-ref {#each} keys and hard-crashed the whole Marshaling screen (each_key_duplicate). Full-key keying + deduped picker list + the tune diff flattens a pilot's entries. Crash-repro test included.
  3. Dead drag handles on lap-dense pilots: threshold handles painted below the signal line and lap/preview markers, which ate the pointer near the knobs. Handles now paint last (topmost). Reproduced and verified fixed in a real browser (drag → switch pilot → drag → return → drag, zero page errors).

Gates: 37 Rust suites (incl. the new restart-rescore test), 526 console tests, both check passes, lint, contract 90/90.

🤖 Generated with Claude Code

ryan-johnson2 and others added 3 commits July 3, 2026 17:48
…g handles

Three fixes from live tune-detection testing (2026-07-03):

- CURRENT-RUN SCORING: heat_window_offsets now folds everything except the
  heat-loop events from the heat's current run (live_state::current_run_start
  — the latest Running / past the latest Abort/Restart, the same rule the
  live standings already used). A Restarted-and-re-raced heat scored BOTH
  runs' passes — the abandoned ghost run out-ranked the real one and the
  same pilot held two positions. Pre-restart rulings drop with their run;
  post-restart rulings apply.
- DUAL-ADAPTER CRASH: the same competitor ref can hold two lap-list entries
  (one per adapter — mid-heat source failover, or historic mixed-source
  debris). Bare-ref {#each} keys collided and crashed the whole Marshaling
  screen (svelte each_key_duplicate) — the 'can't slide anything anymore'
  report. Lap sections key by the full adapter/ref key, the competitors
  list dedups, and the tune diff flattens laps across a pilot's entries.
- TOPMOST HANDLES: the graph's threshold drag handles rendered BEFORE the
  signal line and lap/preview markers, so a lap-dense pilot's markers sat
  on top and ate the pointer — dead handles on exactly the pilots with the
  most laps. Handles now paint last (topmost); the threshold lines stay in
  the background layer.

Verified end-to-end in a real browser against the live rig's polluted heat:
drag → switch pilot → drag → return → drag all work, zero page errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ryan-johnson2 ryan-johnson2 merged commit b0891f1 into devel Jul 3, 2026
3 checks passed
@ryan-johnson2 ryan-johnson2 deleted the current-run-scoring branch July 3, 2026 17:57
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