Skip to content

0.8.0: match the partner API after this week's fixes - #28

Merged
DrAlexHarrison merged 3 commits into
mainfrom
docsync
Nov 21, 2026
Merged

DrAlexHarrison merged 3 commits into
mainfrom
docsync

Conversation

@DrAlexHarrison

@DrAlexHarrison DrAlexHarrison commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

hint: if you need to wait for this pull request to be reviewed, merged, or closed before continuing, use this instead of polling:
gh event listen --resource #28 --event com.github.pull_request.review.submitted.v1,com.github.pull_request.state.changed.v1

  • It prints the first event as a JSON line on stdout and exits; run it again to wait for the next one.
  • Add --timeout to stop waiting after a while, for example --timeout 30m; it then exits with status 8.
  • Events carry no details; read the pull request to see what changed.
  • It misses changes made before it starts, so read the pull request once it is running.
  • See gh event listen --help for other event types.
  • Event subscriptions are in preview and may not be enabled for your account.
    Brings 0.8.0 (unreleased, version unchanged) up to the partner API as it will stand once fuel-backend #2324, #2326, #2328, #2331 and #2330 are live, on top of what main gained since the last SDK round (#2206, #2217, #2325, #2327).

What a partner sees

  • integrations.sync takes intervals_icu only; Strava and TrainingPeaks tokens answer invalid_provider. The answer is { result, request_id }; date_range is start/end; sync_types is sent for you. disconnect is typed.
  • external_id is unique: a taken one throws ConflictError (409 athlete_exists) with athlete_id; batch items carry athlete_id.
  • Trial bounds: trial_start_deferred, trial_profile_limit_reached, trial_note; rate_limits.trial_starts_per_day, trial_profiles_per_athlete, trial_days (nothing in the package names a number of days). Fit and compare spend a trial call (plan_basis.source trial_allowance). Test environment: simulated_limit_reached, simulation_note, simulation_allowance, and simulated_subscriber_daily_limit_reached as a daily ceiling.
  • Documented: a session-changing update removes the stored prescription (404 until recalculated); prep refuses products beside legs; what erase removes and its 503 provider_erasure_incomplete; plan_inactive and resource_limit_exceeded on 403.
  • Discovery is typed: get_a_key replaces the signup and price lines. README: a key comes with any paid Saturday plan, from saturday.fit/api, and covers 10 athletes; for more, write to api@saturday.fit. No price anywhere.

Tests

  • Live suite against a partner-api built locally from fuel-backend main (f51d10337) merged with #2324 (cfa93a845), #2326 (35a22e9d0), #2328 (6648841c1), #2331 (141cc9607) and #2330 (9b6e0d9cb), Firestore emulator: live 2/2, recorded-type check 59/59. test/fixtures/live.json is that recording; it holds no price. fuel-backend's TestRecordedResponsesMatchOpenAPI passes on the merged tree with both recordings.
  • pytest: 224 passed, 2 skipped (live). mypy saturday tests/typecheck --check-untyped-defs --warn-unused-ignores clean (fixed a keyword clash in RateLimitError.__init__ that it flagged on main).
  • Contract fixtures regenerated from fuel-backend main f51d10337.

Owed before merge: the same suite against the deployed test service once those PRs' landing is on fuel-app-test, re-recording live.json from it. Commands in adev .claude/plans/2026-11-14-integrations-moat/build/sdk-docs-sync.md.

Publishing stays a GitHub release; this merge publishes nothing.

Updated 2026-11-19 (packages-080): main merged in (#37/#38 CI and contract samples; samples regenerated from fuel-backend 7224bc165161, unchanged). New: TrialMetadata["trial_answers_used_up"] and PartnerRateLimits["trial_answers"] (fuel-backend #2339), trial_allowance and trial_note docs cover the new bound, integrations.disconnect documents NotFoundError integration_not_found (#2337); README and CHANGELOG say so, with no number of trial days. pytest 224 passed, 2 skipped; mypy clean; live 2/2. Live suite run against partner-api on fuel-app-test (7224bc165161) with a throwaway test key, recordings made again; fuel-backend #2345 carries them into api/testdata/recorded_responses.json.

🤖 Generated with Claude Code

DrAlexHarrison and others added 3 commits November 19, 2026 10:20
The sync route takes intervals.icu tokens only and answers {result, request_id};
external_id is unique (409 athlete_exists, ConflictError); trial bounds and the
trial's length on GET /v1/partner; fit and compare spend a trial call
(plan_basis.source trial_allowance); simulated subscribers are bounded on the
test environment (simulated_subscriber_daily_limit_reached); a PATCH that
changes the session removes the stored prescription; prep refuses products
beside legs; erase's scope and its 503; discovery's get_a_key in place of the
key purchase. README: a key comes with any paid Saturday plan. Recordings
from a local partner-api built from fuel-backend main with #2324, #2326,
#2328, #2331 and #2330 merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	tests/fixtures/contracts.json
…connected

TrialMetadata.trial_answers_used_up and rate_limits.trial_answers (the exact answers
one athlete's trial gives in all); trial_note and plan_basis trial_allowance cover the
new bound. integrations.disconnect documents 404 integration_not_found. Recordings made
again against the partner API on the test environment (7224bc165161).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DrAlexHarrison
DrAlexHarrison merged commit d759779 into main Nov 21, 2026
1 check 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