Skip to content

feat: Ride both velodromes on the island and meet other apps' riders on Herne Hill - #108

Merged
RalfLeonFasler merged 8 commits into
mainfrom
feat/shared-tracks
Nov 15, 2026
Merged

RalfLeonFasler merged 8 commits into
mainfrom
feat/shared-tracks

Conversation

@RalfLeonFasler

@RalfLeonFasler RalfLeonFasler commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Why

Both velodromes should stand on the island, with Herne Hill Velodrome (OpenBikeNet/protocol#6) shared with other apps such as VeloPopuli, so everybody sees each other: riders on the roads, on the tracks, and in other apps (#107). Lanzarote stays a world of its own.

What changed

Server:

  • Bots per route, not per world. Shared tracks never get bots, not even for events. The other routes in the same world keep theirs, so the island roads won't empty when the velodromes move there.
  • Each track's length comes from its route file. A route with openbikenet now also needs openbikenet_length, which replaces the fixed 250 m.
  • One OpenBikeNet connection for all tracks of a world. It subscribes to every shared track and sends all riders in one update. A rider who switches tracks leaves the old one before joining the new one.
  • Everybody in the world sees riders of other apps, nearest first, not only riders on the same track. Each track hands out its own range of rider ids.

Routes:

  • Herne Hill both ways round (herne-hill → herne-hill-450, herne-hill-clockwise → herne-hill-450-clockwise), 450 m, bend radius as in OpenBikeNet's GPS track. tools/track-route.mjs (was velodrome-route.mjs) writes all three tracks.
  • Both tracks on the island (map valley), on the flat strip south of the valley-west road, east and west of the river. They stay off the road network for now, but each home straight faces the road 35–50 m away at its height, so a connector road with junctions can be added later without moving them.

Client:

  • Tracks are drawn on the island: with a road network only the network's roads used to be drawn. Map routes that aren't walks over the roads are now drawn and the ground is levelled under them.
  • One Herne Hill card in the start menu, with a choice of the way round under its name (riders per direction).

Docs: ADR 0027 (amends 0020), docs/protocol.md, docs/routes.md, docs/deploy.md, .env.example, README. Spec and plan in docs/superpowers/.

The wire change only adds data, so PROTOCOL_VERSION stays the same. Breaking for self-hosters: a route file with openbikenet but no openbikenet_length no longer loads.

Not tested yet against a real OpenBikeNet server, only against the fake one in tests/openbikenet.rs. The OpenBikeNet server already knows the Herne Hill routes (OpenBikeNet/server#6); it needs make update on the host.

Screenshots

Start menu, Herne Hill picked clockwise:

Start menu

Riding Herne Hill, drone view: the valley-west road and its riders behind:

Herne Hill

Riding the 250 m velodrome:

Velodrome

Checklist

  • New behaviour started with a failing test
  • make check passes
  • PR title follows Conventional Commits (feat:, fix:, chore:, etc.) for squash merging: it becomes the release note
  • Docs updated (docs/protocol.md and PROTOCOL_VERSION for protocol changes; an ADR for structural decisions)

🤖 Generated with Claude Code

RalfLeonFasler and others added 6 commits November 15, 2026 10:36
…r apps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A world with a route shared through OpenBikeNet had no bots at all. On the
island that would empty every road, so only the shared routes go without.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A route with openbikenet now also names openbikenet_length, so a 450 m
track scales as well as the 250 m one did with the fixed constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The outbox keeps each rider's route: one update carries riders on any
route, and a rider who moves to another shared route leaves before
joining it. The link subscribes to every route it shares.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…veryone

A world can now hold several routes shared through OpenBikeNet, all on one
link. Riders of other apps are shown to every rider of the world, nearest
first, not only to those on the same track, and each track hands out its
own ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RalfLeonFasler RalfLeonFasler self-assigned this Nov 15, 2026
RalfLeonFasler and others added 2 commits November 15, 2026 14:19
…e island

Herne Hill Velodrome (450 m, OpenBikeNet herne-hill-450 and
herne-hill-450-clockwise) joins the 250 m velodrome. All three stand on the
island on the flat strip south of the valley-west road, off the road network,
their home straights facing the road so a connector can join them later.
tools/track-route.mjs writes all three. A sim test shows a track without a
walk is ridden on a map with a network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… round

On a map with a road network the client drew only the network's roads, so
the tracks would have been invisible. Map routes that aren't walks over the
roads are now drawn and levelled like them. The start menu shows Herne Hill
as one card, with a choice of the way round under its name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RalfLeonFasler added a commit that referenced this pull request Nov 15, 2026
RalfLeonFasler added a commit that referenced this pull request Nov 15, 2026
RalfLeonFasler added a commit that referenced this pull request Nov 15, 2026
@RalfLeonFasler
RalfLeonFasler marked this pull request as ready for review November 15, 2026 16:34
@ThoreKoritzius

Copy link
Copy Markdown
Contributor

Reviewed at b1b8855. No blocking findings from this review.

Checked the per-route bot exclusions (including event bots), multi-track subscriptions/outbox route changes, remote rider ID separation and placement, direction-card selection, and drawing/levelling tracks outside the road network. make check passes locally: 1621 client tests and 644 Rust tests, with ESLint, fmt and clippy clean. GitHub CI is green as well.

The remaining verification gap is already called out in the PR: the multi-track link has been exercised against the fake OpenBikeNet server, not the deployed service. A live interoperability smoke test is still needed to confirm all three subscriptions and riders appearing across apps after the OpenBikeNet deployment.

From the code review and automated checks, this looks ready for approval.

@RalfLeonFasler
RalfLeonFasler merged commit 4d96d93 into main Nov 15, 2026
9 checks passed
@RalfLeonFasler
RalfLeonFasler deleted the feat/shared-tracks branch November 15, 2026 18:08
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.

2 participants