Repository navigation
Review package 23: course elevation fixes before PR #254 merges - #277
Merged
ellmkay merged 156 commits intoNov 27, 2026
Merged
Conversation
The demo fixture now pins fixtures/okartan/okartan-demo.ocd (kind ocad, 1:15 000) instead of Puit de Laven, which stays as a test map. Controls: `showcase-controls.mjs fit` now reads the OCAD map, tries each quarter turn and slides the cloud over the map to the place with no control in a forbidden area or near the slanted map's edge and the fewest legs through water or buildings, then snaps each control onto the nearest free boulder, knoll, depression or pit (starts and finishes onto a path). Placed at x0.6 from the previous positions: all 34 placed controls stand on a feature, two legs still cross water. Showcase guard: club maps of the same forest exist, so a public run now checks the pinned document's source hash against the committed demo map instead of its bounds. Retook the showcase shots and the gallery; dashboard and courses now come from the demo, so only tracks.png still shows the club map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
…tests bite Review follow-ups: capture.ts now refuses to run unless the demo event's pinned document names the committed demo map (shared check in e2e/showcase/demo-map.ts, which also sends x-competition-id so it works with auth on). The snap and place tests now fail when spacing or the crossing score is removed; the committed-positions test checks paths, 60 m spacing and the two documented crossings. A control that lands on (0, 0) is nudged so it does not read as unplaced; removed controls no longer veto a placement. The forbidden-name scan reads OCAD's UTF-16 strings too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
… and a sheet The course lives in fixtures/showcase/showcase-course.sql, exported from a database by scripts/showcase-course.mjs (course + variants, their course_controls and sheets, the event's course objects, the controls that are not the race's) and run by load-showcase.sh after showcase.sql. showcase-controls export now leaves those controls out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
showcase-course.mjs export now writes the event's whole course setup (every control and course as an upsert over showcase.sql's rows, every course's course_controls, objects, sheets, and the seq counters past every row), so race-course edits in the editor reach the fixture too. showcase-start-finish.mts codes the starts and finishes and points the Showcase course at its own start and finish and every other course at the race's, through the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ked route) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
…demo map A public showcase run now picks the demo's Showcase course (fork, butterfly loop, corridor) for the course editor shots. The 3D shot moves into the showcase script (map3d.shot.ts): the Courses page map in 3D on the o-kartan demo map's own contour terrain, the Showcase course on it. Software WebGL draws it in seconds, so no laptop is needed. The old 3D shots (Puit de Laven, from the E2E run) are gone: map-3d.png is retaken, map-3d-track.png is dropped until the demo has GPS routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuNAoK7Vj1T7nXsnZM
…x4em57 Move the demo competition onto the o-kartan map and retake the screenshots
Queue offline card reads and results under the event in the URL, scope the persisted query cache per event, make the kiosk drain its own outbox, await queue writes, and fix duplicate detection. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
…s, keep user queries, fetch after a server answer, in-flight duplicate Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtkCKwS4ZmdC6ABW7p
…bdyw2c Fix offline and kiosk readout path (review package 1)
One guard (decideReadoutApply) for applyResult, backup push and the result.applied ingest; hand-set status/finish flags; held card rows; Finish Station replace step; latest-card guard; kiosk no longer writes finishes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZsv48nEPvxG5M31m5u
…, banner list, finish.recorded guard Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZsv48nEPvxG5M31m5u
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZsv48nEPvxG5M31m5u
…apqrcj Guard readout apply against overwriting results (review package 2)
…st (review package 3) events.push now checks each entry's competition against the request, requires the online action's capability per entry (sync secret bypasses for the venue box), keeps idempotency per event, applies each entry in one transaction and stops at the first apply failure, refuses reference rows of another event and allow-lists their fields, and returns stable refusal codes. Stations push each competition's entries under its own header, classify server errors, and show refusal texts with Retry all. runner.create is lowered to race.operate (D1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuXwAasnsnGcGfnEV9
… capability, per-competition block reason) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuXwAasnsnGcGfnEV9
Card 501438 is SI6, which the reader only detects (no punches), so the readout guard from #256 rightly holds it as stale when Malin has a stored result, and the notification turns into the Replace banner. Renumber her to an SI8-range card in those two tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuXwAasnsnGcGfnEV9
…LC hold, re-run on lock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuXwAasnsnGcGfnEV9
… pass that settles nothing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZuXwAasnsnGcGfnEV9
Harden the journal sink (review package 3)
journal gets ingest_seq (arrival order) and pushed_at (delivered mark); allocate_event_seq() now advances event_seqs past explicit seq values, with a repair of lagging counters. Snapshot import merges the exporter's counters with GREATEST instead of inserting over the trigger's rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZwULgQeS1943wQuZnh
shipEventOnce pushes and pulls entries with pushed_at NULL in ingest_seq order and marks the acked prefix, so an entry arriving late with an old HLC still ships and a pulled entry is no longer echoed. Adds events.unshipped and events.ackShipped (events.since stays as the fallback for an older peer), scopes shipAllOnce to events checked out against the peer, and seeds the node clock from the journal at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZwULgQeS1943wQuZnh
…cquire The cloud marks its existing journal delivered when it hands out the lease, and exportEventSnapshot reads every part in one REPEATABLE READ transaction, so an entry committed mid-export is pulled by the box instead of lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZwULgQeS1943wQuZnh
Checkout refuses to replace a held lease, a box-made event or unshipped entries (overridable with discardLocal), requires event.manage (or an instance admin for a new event), takes the peer lease inside the rollback scope, commits the sync-state row and local lease with the import, and keeps readout backups. Acquire and the peer's release are idempotent for the same holder; checkin tolerates a peer that already let go and refuses race writes on the box while its barrier runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZwULgQeS1943wQuZnh
…Venue panel findGraphicClashes runs right after the snapshot is exported, before any blob is fetched; the import refuses the same way unless the operator confirmed (replaceClashingGraphics). VenueLease asks for confirmation on the overridable refusals and shows the unshipped line without a lease. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZwULgQeS1943wQuZnh
…r8fpef Process stability: crash guards, import attempt limit, damaged OCAD, peer and Eventor timeouts (review package 21)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…ils the print Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…ourse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
… nearest setter map Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
… who has raced keeps her variant Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…ix notes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…e skips uncomposable jobs, stronger tests, docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…t with no parseable setter map The worker now carries the error's name, so the offline store step skips a job only for PrintGraphicMissingError (CRS-010); a worker that fails to start stays an OfflinePrepareError. layout.adoptToSetters returns nothing when no setter map of the scope parses instead of throwing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…8.6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…e main thread Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtGdeTjLNYWYdCEm87
…1b084m Review package 22: course and print correctness
…age 23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…ed contour interval, lease, includeCourse) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…er refresh; failed pairs do not block their chunk Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…recomputes climbs after a map refresh Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…case for the climb columns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…, descriptor, mutations, snapshot export Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…ap info row, club card; Eventor push course switch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
… lease note Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
…contours Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
… interval needs the uploader or an admin, background recompute queue, lease gates, searcher dead flag, shared interval rule, unconfirm control, finder interval Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
… delete keeps the confirmed interval, mayChange hides the controls, prepare failure stops the refresh Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZtsfJbSyDuCEDaGpYK
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.
Requested by Marcus · project thread
Package 23 of the November full code review (
docs/reviews/2026-11-full-review.md): the findings against the unmerged course-elevation PR #254. This PR targets #254's branch; #254 itself stays open for Marcus's review and merge.What's in it
contour_interval_monclub_mapsandmap_files(club map's value wins). The 5 m / 2.5 m scale guess is only a prefill. Until confirmed, a contour-based climb is an editor estimate (marked ≈) and is not stored, printed, exported or sent to Eventor; ground-model climbs are unaffected. Set in the map info dialog, the editor banner or the club library card; can be returned to "not confirmed". Setting a club map's value needs its uploader or an admin. A change clears and recomputes computed climbs of every live event on the map, in a background per-event queue. Contour heights are scaled to the confirmed interval (also in the route finder).clearComputedClimbsjournals what it cleared.includeCourse(default on), with a checkbox on the event page.knownFields; named test case added.climbSourceandwinnerPaceSPerKmnow travel incourse.upserted(old senders still read as typed).docs/bugfixes/course-elevation-followups.md.Migration
20261127140000_map_contour_interval: adds the two columns (CHECK 0 < x ≤ 100) and clears existing computed climbs once (only databases that ran #254 have any). Runpnpm db:migrateat bring-up. #254's own20261122*migrations keep their names (they sort before main's newer ones;migrate deployapplies them regardless, and renaming would break a database that already applied them).Docs
docs/course-elevation.md(§0 rows 43–45, §3, §4.4, §6, §7.5, §7.7, §8, Pending),map-terrain.md,map-storage.md, decision rows indecisions/slice-h.md(D7) anddecisions/general.md(D8), guidescourse-editor.md,maps.md,event-setup.md,docs/bugfixes/course-elevation-review.mdandcourse-elevation-followups.md.Verification (cloud container)
pnpm build,pnpm lint(0 errors),pnpm test(shared 2725, api 1531, web 2734): pass.Generated by Claude Code