trails/openspec/changes/wahoo-route-push
Ullrich Schäfer c7a09e865d
Add sync_pushes table and granted_scopes column
sync_pushes tracks outbound route pushes to providers, keyed by
(user_id, route_id, route_version, provider). Successful rows hold
the remote_id; failed rows hold the error and can be retried in
place. The unique index makes idempotent push trivial.

granted_scopes records the OAuth scope set we requested at
exchangeCode time. Wahoo doesn't return a scope field in token
responses and grants scopes all-or-nothing, so the requested set is
the source of truth. Defaults to an empty array, which means any
pre-existing connection will be flagged as scope-mismatched on the
first routes_write push — the intended UX for the slice 3 re-auth
flow.

Adjusts tasks 2.3/2.4 in the spec to match repo reality: this
project runs `drizzle-kit push --force` schema-first, with no
checked-in migrations directory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 22:33:43 +02:00
..
specs Fix wahoo-route-push spec: correct schema path and id types 2026-04-30 22:03:28 +02:00
.openspec.yaml Propose wahoo-route-push: send planned routes to a user's Wahoo account 2026-04-29 08:38:14 +02:00
design.md Add @trails-cool/fit package with GPX→FIT Course encoder 2026-04-30 22:31:37 +02:00
proposal.md Add @trails-cool/fit package with GPX→FIT Course encoder 2026-04-30 22:31:37 +02:00
tasks.md Add sync_pushes table and granted_scopes column 2026-04-30 22:33:43 +02:00