Skip to content

Samples, list defaults, organization paging and batch estimates match the API - #34

Merged
DrAlexHarrison merged 2 commits into
mainfrom
wiretruth
Nov 22, 2026
Merged

DrAlexHarrison merged 2 commits into
mainfrom
wiretruth

Conversation

@DrAlexHarrison

@DrAlexHarrison DrAlexHarrison commented Nov 22, 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 #34 --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.
    What a partner developer would have hit, and what changes:

  • Contract samples in milliseconds and with attribution.required: false. tests/fixtures/contracts.json said trial_ends_at, the fueling profile's updated_at and webhook created_at were milliseconds and that attribution was optional. The API sends seconds and required: true on every partner answer. The samples now come from SaturdayInc/fuel-backend#2418 (stamped with its branch commit 5ff56d7; the next scripts/sdk-contracts-sync.sh --pr after it lands restamps them with no content change).

  • activities.list paged at 20. It always sent limit=20, where the docs, the Node SDK and the API's default (pkg/api/activities.go) give 50. It now sends no limit unless you pass one.

  • organizations.list() could not page. It took no arguments, so an account with more than 50 organizations could not get past the first page. It now takes limit and cursor (pkg/api/organizations.go: default 50, 1 to 200).

  • batch_calculate could not ask for an estimate. batch_calculate(scenarios, estimate_only=True) sends estimate_only, which the API takes (pkg/api/batch.go).

  • The create docstring said an identifier was required. A single create takes none (pkg/api/athletes.go); only a batch_create item needs one (missing_identifier, pkg/api/batch.go). The docstrings now say both.

  • coach.register_webhook said an empty events meant every coach event. It means the two concern events (pkg/coachwebhook normalizeEvents); ["*"] is every event. The docstring says so. The request is unchanged.

Overlaps: #33 (Muse's security PR) touches client.py too; whichever lands second merges the other.

Tests: pytest -q: 231 passed, 2 skipped (new tests/test_request_options.py; tests/test_contracts.py now expects no default activities limit). Live suite against fuel-app-test (partner-api at fuel-backend 13ca2e5d3): 2 passed in 157.39s; two earlier runs failed on "Server disconnected without sending a response" from the test service at an athlete create, and main's checkout passed between them.

No CHANGELOG line here: INTEGRATIONS writes the 0.9.0 entries. Unlabeled.

Update (2026-11-22, after fuel-backend #2424). ErrorCatalogEntry["retryable"] and meta.errors() say what the catalog's retryable means: retry the same call automatically after Retry-After, false for the daily ceilings. pytest: 231 passed, 2 skipped.

🤖 Generated with Claude Code

… the API

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se for daily ceilings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DrAlexHarrison
DrAlexHarrison merged commit 4183fd8 into main Nov 22, 2026
1 check passed
@DrAlexHarrison
DrAlexHarrison deleted the wiretruth branch November 22, 2026 22:23
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