Repository navigation
Conversation
New chapter docs/course-elevation.md and packages/shared/src/terrain/profile: a terrain sampler over a height field, the height profile of a polyline, climb by a 1 m hysteresis threshold run once over a course with per-leg shares, and the choice of field (ground model, anchored contours, contours). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…itor One climb row in the course-info popover: a typed climb, else the climb computed from the map's height field along the course; the selected leg shows length, climb, descent and net. docs/course-elevation.md §4. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
A panel with the course's height against distance, the controls marked, the selected leg shaded; the pointer reads a place and marks it on the map, a click selects the leg. docs/course-elevation.md §5. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…view fixes The climb computed from the pinned map's stored height field is written to courses.climb_m with climb_source 'computed' after every edit of a course's geometry has committed; a typed or imported climb wins and can be cleared back on the Courses page. docs/course-elevation.md §6. Review of §1-5: the profile's height axis ends on ticks, the editor reads heights in the Course view only, the selected leg and the graph's marks come from tested helpers, the map's dot is a subscribed store, stronger browser assertions. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…s closed Review fixes for the stored climb (docs/course-elevation.md §6): - marks are scoped to the request that made them, so another request cannot take them before the edit commits - the compute locks one course per transaction - an import, a bulk move of the ends and a map change clear computed climbs - a climb applied from the journal is held as a typed one; a typed source over an empty climb is no climb Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
… editor, the climb read along the chosen one docs/course-elevation.md §7.1–7.4: table leg_routes (directed pair, interior vertices, one chosen route per pair), the legRoute router, the stored computed climb and the editor's climb, leg numbers and profile along the chosen route, and the Leg section's Routes block with a draw mode. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…arly as fast, shortest legal docs/course-elevation.md §7.5–7.8: a cost grid of the map window round a leg (cost classes by symbol code, ways, barriers, heights), Dijkstra with a swappable cost model, alternatives through cells no kept route comes near, the shortest legal route, and the editor's Find routes list with metres, climb and an estimated time, run in a web worker. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…bstacles, downhill cost, one line once, per-leg marked rule, public control ids Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…ay open, the shortest route is kept, a control's own side of a fence Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…rse's winner pace, the course along its routes Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…ce and the course along its routes Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…closes the way, searches in chunks, climbs computed whatever stops a refresh, the editor's catch-up on opening Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…re it The shard plan moved with the new specs; after course-maps the event has a map and no placed controls, and the editor never became ready. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
… command over neutral track records, a model as data per map family, the editor's note names what is measured Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…eds control pairs Review fixes for the cost-model calibration (docs/course-elevation.md §7.9): - The fit's error is in log time (Gauss-Newton), so leg-time noise no longer pulls factors down. - splitTrack no longer leaves out a leg for being slow: slow ground and a mistake look alike in one leg; the fit's robust weights handle it and the report counts the outliers. - A class is fitted only with 8 different control pairs; intervals draw runs and control pairs again; folds hold out a pair whichever way it is run. - A model holds measured numbers only; the rest stays the rule of thumb. - A map's records are read together (shared pairs share a grid); a track far outside its leg's window is left out as wandered. - The pass of a control where the runner waits is the one nearest the punch; two wild fixes in a row are dropped. - The command prints as it goes, names files by position only, and writes no report under five runs. The report carries pairs, outliers and a fixed list of rejection reasons. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…nvergence Second review of the cost-model calibration (docs/course-elevation.md §7.9): - Fitting pace and factors in turn stalled where one class is most of every leg, and the 12-round warm-started replicas hid it behind a tight interval. Class factors and slope are now solved together with each run's pace centred out; replicas run to the fit's own criterion; a fit that has not settled says so and measures nothing. - A slope number at its bound is not measured. - Held-out legs are scored as the emitted model (measured numbers only). - The five-run floor holds per map; tracksUsed counts runs with a kept leg. - The report's warnings are fixed words; a failed write names no path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Third review of the fit (docs/course-elevation.md §7.9.4): - Every interval's fit starts a random way off the point fit, so a direction the data does not pin down (maps sharing no class or runner, an ascent and a descent that always come together) stays spread instead of coming back identical and passing as settled. - An unknown whose regressor does not vary within any run is loose: held, reported unmeasured, the rest solved. - More than a twentieth of the interval's fits failing to settle measures nothing; steps are halved from the ninth round against cycling. - Tests: disjoint maps, one-leg runs, tied slopes, validation scored as the emitted model, the per-map floor, an unwritable report. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
… a map without terrain is said so Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…the fitted slope The first runs on real tracks (256 runs, two forest maps) put paths at the lowest allowed factor: a watch's fixes lie metres beside a one-cell path, so path running read as forest. On forest maps a stretch within 10 m of a road or path for 40 m or more now takes the way's class (docs/course-elevation.md §7.9.3, §0.36). A number whose interval touches a bound is not measured. The report carries the slope numbers the fit found and their intervals. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
|
E2E shard 4/6 failed on First attempt: the compare view's diff overlay reported This does not look like this PR's: Generated by Claude Code |
…red from tracks The first calibration that settled (256 runs, 2565 legs, four events on two forest maps): path 0.556, small path 0.802, marsh 1.073 against forest; all else, slope included, stays the rule of thumb. Sprint maps keep default-1. docs/course-elevation.md §7.9.7, §0.37. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj
…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
…kc9780 Review package 23: course elevation fixes before PR #254 merges
…otices kept, writes pinned to the event (review package 24) CRS-016 / D6: an undo entry stores the rows and tokens its write produced; undo and redo go through only while each row is still as this client left it, sent on that token and never rebased; otherwise skipped with a notice and the row's entries dropped. Controls: the server decides; a move undo keeps a description changed elsewhere. CRS-018 / CRS-049: structure edits on one queue, sent on the token of the structure they were built from. CRS-050: undo / redo serialised in UndoStack. CRS-053: Layout sheet and template writes through EditorWrites.writeRow. CRS-065: a success clears only a notice about its own row. MAP-8: patch writes serialised; setMapPatch drops older deliveries. MC-17 / CRS-015: editor writes through trpcClientForEvent, the page keyed on the event, the outbox drain stops once the editor left the event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…tokens of other procedures, positional edits - Undo / redo steps run alone behind a WriteGate; ordinary writes and structure edits share it, so the D6 guard sees only the step's writes. - Control undos decided field by field (an own radio toggle or restore never blocks them); an undo deleting a created control is skipped when another course visits it. - control.update answers a kind change's re-mirrored course tokens, mapTemplate.applyToCourses the sheets it moved; the editor links them and the setter procedures' sheets as its own (adoptOwn). - Every non-Field entry is guarded; checkControl queues with the control. - Positional structure edits queued behind a write are refused when the structure changed; an edit of a course no longer selected is dropped. - Layout keeps the newest gesture's snapshot until its own reply. - Redo-skipped wording, spec and Pending lines, tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…sture chain, positional edits, undo picks inside the gate - Map mode's follow-up writes and structure edits run ungated inside a gated write (track conversion undo no longer waits on itself) - UndoStack picks its entry inside the write gate - Layout writeRow sends on the own chain from the snapshot's token (a gesture behind a refused one is refused) - A control undo passed by the field rule links the chain with the bridged fields - Create variation, move to alternative, routed crossing and placement inserts are positional - control.update reads re-mirrored course seqs once - Docs: write gate, controls, Pending, bugfix note, decision row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…picks after the gesture records, Do it again deletes the placed control Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…as its course Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
… by root, own edits no exemption), autoDescribe left out with the description, Do it again keeps the control when its delete fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…do even on an own root token Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DoDZu3PSsVQPwVv4AkjBs
…57uk6t Course editor with several editors: D6 undo guard, writes in order, notices kept, writes pinned to the event (review package 24)
|
E2E shard 4/6 failed at 7aa7913 (the merge of #278 into this branch): The same suite passed at the previous head d35b2cc, and the commits that #278 brought in touch the course editor's write path and undo, not the club map library or the map import. Nothing in the course elevation work of this PR touches that page either. The likeliest cause is the import job for the Generated by Claude Code |
Requested by Marcus · project thread
What this adds
Oxygen computes a course's climb from the height data it already holds, shows it in the course editor, stores it so that exports and prints carry it, and reads it along a route per leg: the shortest legal way by default, or a route a person draws or picks from computed alternatives. Spec:
docs/course-elevation.md(new chapter; §0 is the decision record).packages/shared/src/terrain/profile/): heights along a polyline from a height field, climb with a 1 m hysteresis, one pass over the whole course.pickClimbField(ground model where the event has one, the map's contours otherwise).courses.climb_source(manual|file|computed| NULL). A typed or imported climb always wins. A computed climb is cleared in the transaction of any edit that changes the course's geometry and computed again after the commit. IOF XML export, the Courses page, prints and the Eventor-facing data read the one stored number, in whole metres.leg_routes, a route per directed control pair, drawn in the editor, one chosen per pair; the climb and the profile follow the chosen route. The course's length is unchanged.packages/shared/src/route/): a cost grid from the map document (uncrossable areas and lines, ways, vegetation, slope) and a shortest-path search in a web worker; a selected leg shows the fastest route, up to two distinct others and the shortest legal one, each with metres, climb and an estimated time, and any of them can be kept.courses.winner_pace_s_per_km); the editor shows the course along its routes and ranks alternatives relative to that pace.docs/dev/route-calibration.md): a local command,pnpm --filter @oxygen/api route:calibrate --map <map file> --tracks <records> --out <report.json>, fits the terrain factors and the slope's numbers to tracks of real runs on a map file. It needs no database and no server and sends nothing anywhere. The cost model is now data (CostModelData,COST_MODELS, one current model per map family: sprint and forest), a kept route records the model it was found under, and the editor's note names which terrain is measured. Tracks on forest maps are put on the way they follow (within 10 m for 40 m).forest-2026-1(§7.9.7, §0.37): forest maps run with measured factors for paths (0.556), small paths (0.802) and marsh (1.073), from 256 runs and 2565 legs on two maps. Everything else, the slope included, stays the rule of thumb; sprint maps stay ondefault-1.CourseperClassStart/ClassResult. Not tried against Test-Eventor: whether Eventor keeps and shows the climb is not known. A pushed length is what the next sync reads back for a course whose length is not derived in Oxygen (§8 "The way back").docs/course-editor.md§6.7; decision-log row indecisions/slice-f.md):Badds one; Add bend, Insert control and Create variation here are buttons of the Leg section. A click on empty map off a selected leg only deselects. The phone is unchanged.Privacy of the calibration
The repository holds no track, names no track provider and has no fixture with a real track or map (tests run made-up runners on made-up terrain and on
e2e/test.ocd). The command reads a neutral record shape. Its report is aggregates only (a strict schema: metres, counts, fitted numbers, errors), its output names files by position only, and it writes nothing when a map has fewer than five usable runs.Decisions worth a look
docs/course-elevation.md§0 rows 10 to 38 are defaults taken while the work ran and are open to change, except row 37 (the forest model), which was decided with the user. Rows 39 to 42 record the review rework; the leg selection (row 42) was the user's choice. The main ones: one number called climb, in whole metres; contour-only maps print a computed climb too; a typed climb is never overwritten; the official climb follows the shortest legal route, the length does not; estimated times come from a speed model that is measured only in part and are marked so.For calibration (rows 28 to 36): a terrain class counts as measured from 2000 m of track, 10 runs, 30 legs and 8 different control pairs, when its 90 % interval (over runs and control pairs drawn again, each fit started off the point fit) is within ±15 % and touches no bound; a model holds measured numbers only, the rest stays the rule of thumb; no leg is left out for being slow; the course's time stays pace × length.
Known gaps are listed under "Pending in this chapter".
Operations
climb_source:leg_routes, andleg_route_auto(leg_routes.auto_basis,courses.winner_pace_s_per_km). The calibration, the Eventor change and the editor rework add no migration.AUTO_LEG_ROUTES=offturns the automatic search off (docs/ops/deploy-gcp-cloud-run.md).Verification (cloud container, PG16 with a
uuidv7()stand-in)pnpm testat the pushed head: pass (api 1149, web 2455, shared)pnpm lint: 0 errors;pnpm build: passpnpm test:e2e(under the verify lock) at the pushed head: 510 passed, 2 skipped, 2 failed. One ismap-gl-doc.spec.ts"terrain=1", which fails in this container onmaintoo (software GL frame count). The other,course-editor-legs.spec.ts"Alt held on Add bend", failed once on a disposed response in a test helper and passed when run again on its own.pnpm test:integration(under the verify lock): 977 passed, 2 skipped, run before the calibration commits; of the later commits only the Eventor one adds an integration test (eventor-push-courses.test.ts), run on its own: pass. The editor rework changes the web package only.pnpm db:migratefirst).🤖 Generated with Claude Code
https://claude.ai/code/session_011DoDZstBH339ruJUFbFBxj