trails/openspec/changes/wahoo-route-push
Ullrich Schäfer 5b0bf40b97
Add Wahoo pushRoute and SyncProvider push interface
Extends the SyncProvider interface with an optional pushRoute method
plus PushRoutePayload, PushRouteResult, and a typed PushError so the
slice-4 action route can map error codes to user-facing copy without
parsing HTTP statuses itself.

Wahoo provider:
- adds routes_write to the requested OAuth scope set
- implements pushRoute: base64-encodes the FIT, builds the form body
  Wahoo's POST /v1/routes expects, parses the remote id out of the
  response, and throws typed PushError on 401/403/422/429/5xx
- saveConnection now persists the requested scopes as grantedScopes
  on exchangeCode (Wahoo doesn't return a scope field, so the
  requested set is the granted set)

Token refresh on 401 is deferred to the slice-4 action route — same
pattern as the existing webhook handler in this repo, which does
inline refresh rather than wrapping every call.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 22:36:45 +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 Wahoo pushRoute and SyncProvider push interface 2026-04-30 22:36:45 +02:00