Skip to content

feat(sync): add RoutesV2 with isLoop and order gameday directions pregame first - #13

Merged
bwees merged 1 commit into
mainfrom
feat/gameday-direction-order
Nov 14, 2026
Merged

bwees merged 1 commit into
mainfrom
feat/gameday-direction-order

Conversation

@bwees

@bwees bwees commented Nov 14, 2026

Copy link
Copy Markdown
Member

Changes

  • The requester always gives a route's Pregame direction sequence 0 and Postgame sequence 1. Other routes keep the upstream order. Right now 6 of the 12 Gameday routes list Postgame first.
  • New route.isLoop column. It is false when longName starts with "Gameday". The migration starts existing rows at true, and the next route data sync marks the Gameday routes.
  • New sync stream RoutesV2 → RouteV2 (adds isLoop) + RouteDeleteV2. RoutesV1 is unchanged.
  • openapi.json is regenerated.

Notes

  • isLoop has no bun default tag. With one, bun inserts DEFAULT for a false value, and Gameday routes would be stored as true. A medium test in route_data_repository_test.go covers this.
  • RoutesV2 has its own delete type because the SyncStreams unit test requires it. I added a row to docs/design/sync-stream.md.

Old app compatibility

  • RoutesV1 lines still leave out isLoop. A controller test covers this.
  • Requesting RoutesV1 and RoutesV2 together returns 400.
  • When a client moves from V1 to V2, it gets every route again in the V2 shape.
  • Old apps also get the Pregame/Postgame order, because a changed sequence re-sends those DirectionV1 rows.

Deploy

Deploy this before the matching app release. The app requests RoutesV2.

@bwees
bwees merged commit 2016660 into main Nov 14, 2026
4 checks passed
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