Skip to content

Satiety and fitness take 1, 3, 5, 7 or 9; Max Carbs steps of 10 - #98

Merged
DrAlexHarrison merged 5 commits into
mainfrom
api-input-values
Nov 22, 2026
Merged

DrAlexHarrison merged 5 commits into
mainfrom
api-input-values

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 #98 --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.
    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 Satiety and fitness take 1, 3, 5, 7 or 9; Max Carbs steps of 10 #98 --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.
    The partner API now takes satiety_level and fitness_level only as 1, 3, 5, 7 or 9 and carb_upper_limit_override only as 50 to 150 g/hr in steps of 10, the values the Saturday app stores (fuel-backend #2405). These pages say the same: the athlete settings table and its refusal paragraph, the request bounds on Safety, and the calculate request's profile fields. engine-constants-allowlist.txt allows the step of 10 as a request bound.

Land after fuel-backend #2405 (SaturdayInc/fuel-backend), so the pages never describe a refusal the API does not make yet.

Checks run locally against a fuel-backend worktree at that PR's head: check-docs-drift.py clean, check-engine-constants.py clean, check-app-claims.py clean. Wording-only change to tables and paragraphs; no layout change.

Follow-up (sweat level and saltiness). The same rule now covers sweat_level (1, 3, 5, 7 or 9) and saltiness (1, 5 or 9), the levels the app stores (saturday lib/user/common/sweatiness_slider.dart five stops, lib/user/common/saltiness_slider.dart three stops, setSweatLevel and setSaltiness in lib/providers/user_profile/user_profile_fueling.dart refuse the rest, onboarding and the coach quick setup use the same sets). A session's thermal stress level, the app's per-session "how sweaty" slider (lib/activity/common/thermal_slider.dart, 1 to 9, divisions: 8), takes every whole number from 1 to 9, as the API already did. Refusal: settings.saltiness must be 1, 5 or 9 (got 3). See https://docs.saturday.fit/guides/athletes (400 invalid_value). Stored records outside the sets (count() aggregations): partner athletes 0 on test (35 read) and prod (0 in all); app members, sweat 38 on test and 1 on prod, saltiness 71 on test and 2 on prod. Stored values stay; the next write must carry an accepted value.

Update (INTEGRATIONS lane sdk-docs-followups, 2026-11-22). fuel-backend #2405 is merged (18:35 UTC). Main merged in, with #99. The settings-schema paragraph on Athletes now names values and step, the two fields #2405 added to GET /v1/settings/schema (pkg/api/meta.go). Rerun against fuel-backend origin/main ef5e2069c: check-docs-drift.py clean, check-engine-constants.py clean, check-app-claims.py clean, test-response-examples.py passed.

Update (2026-11-22, after fuel-backend #2424). Error Handling's catalog section says what retryable means (retry the same call automatically after Retry-After; false for the daily ceilings, which clear at midnight UTC) and that a per-item batch code such as missing_identifier is listed with the status a single request would get. Drift, constants, app-claims and response-example checks pass against #2424's branch.

🤖 Generated with Claude Code

DrAlexHarrison and others added 2 commits November 22, 2026 06:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-From: linux
Ci-Session: 5f9c7d25-5b60-4c43-beda-a4c0c63709d4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-From: linux
Ci-Session: 5f9c7d25-5b60-4c43-beda-a4c0c63709d4
DrAlexHarrison added a commit that referenced this pull request Nov 22, 2026
…SDKs (#99)

* Fix code examples and docs mismatches against the SDKs

Guard optional precision and Retry-After, add status checks and batch error handling, store rotated OAuth tokens, correct error catalog details, and align response examples with the SDK types and fixtures.

* Review fixes: keep odd-point scales; daily 429 scheduling without a Retry-After

The settings-scale wording goes back to "1, 3, 5, 7 or 9": PR #98 sets those values on purpose.
A daily ceiling with no Retry-After header (older API) still schedules after midnight UTC, as
saturday-node's RateLimitError treats it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Review: keep three statements the API's code supports

- Single athlete create takes no required field (pkg/api/athletes.go); only a batch item
  needs one of name, email or external_id (pkg/api/batch.go, missing_identifier).
- The export carries conversations when the athlete has any (pkg/api/gdpr.go,
  gdpr_types.go: conversations, omitted when empty), so both pages name them again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
DrAlexHarrison and others added 3 commits November 22, 2026 12:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-From: linux
Ci-Session: 0fe43437-6218-4995-9bbb-14b061a1d1c2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-From: linux
Ci-Session: 0fe43437-6218-4995-9bbb-14b061a1d1c2
@DrAlexHarrison
DrAlexHarrison merged commit b921a86 into main Nov 22, 2026
4 checks passed
@DrAlexHarrison
DrAlexHarrison deleted the api-input-values branch November 22, 2026 22:35
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