Skip to content

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

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

DrAlexHarrison merged 4 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 #32 --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 (SaturdayInc/fuel-backend #2405). Anything else gets a 400: invalid_value for the two levels, out_of_range for Max Carbs, with a message naming the values taken.

  • AthleteSettings says what a write of satiety_level, fitness_level and carb_upper_limit_override takes; nutrition.calculate's docstring says the same.

  • SettingsFieldSchema gains values and step, which GET /v1/settings/schema now returns.

  • CHANGELOG line, under Unreleased (0.8.0 is published).

Tests: pytest 156 passed (live suites not run).

Left unlabeled for Alex to merge and release.

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 and serves values (sweat, saltiness, satiety, fitness) and step (Max Carbs) in GET /v1/settings/schema (pkg/api/meta.go on main). Main merged in; the CHANGELOG line moved from the 0.8.0 section to Unreleased. pytest -q: 228 passed, 2 skipped.

🤖 Generated with Claude Code

DrAlexHarrison and others added 4 commits November 22, 2026 07:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DrAlexHarrison
DrAlexHarrison merged commit a07227f into main Nov 22, 2026
1 check passed
@DrAlexHarrison
DrAlexHarrison deleted the api-input-values 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