save_ride_blocks
Store one stationary ride's structured resistance and RPM blocks, preserving raw text and prior revisions when superseding, so athlete-entered workout details are saved as a clear, end-anchored log.
Instructions
Store one stationary ride's block structure. THE ONE tool that writes athlete input.
A writer is a deliberate act: the watch cannot record resistance or RPM,
and nothing else in this system does either, so there is no existing
channel this competes with. Perceived effort is NOT a field here --
Garmin's own self-evaluation, where the device asked for one, is the
effort channel (see session_load), and a second would be two places for
one answer.
Args:
payload: a JSON object. Required: run_id (or activity_id), raw_text,
blocks. Optional: events, machine_totals.
supersede: replace an existing log for this ride, AS AN ARGUMENT
BESIDE the payload and never a field inside it. The previous
revision is KEPT.
BLOCKS ARE END-ANCHORED: each entry is {resistance, end_min, rpm?}, and
start_min is the previous entry's end (0 for the first). Supplying
start_min is REJECTED -- one way to state a boundary means no way for two
statements to disagree. Storage is explicit [start_min, end_min).
resistance is DECIMAL knob-turns from closed (quarter turns such as 4.25,
4.5, 4.75 are ordinary values), validated against [0, MAX]. That ceiling is
DECLARED, not
measured, until the athlete tests where the knob stops.
rpm is a number or [low, high] and is stored as [low, high], NEVER
collapsed to a midpoint -- a midpoint invents precision the recollection
does not have. Absent is absent; a log with no RPM at all is complete.
raw_text is REQUIRED and stored VERBATIM through every revision. The
parsed blocks are an interpretation of it; the text is the record, for the
same reason bronze keeps the raw file.
AMBIGUITY IS REFUSED, NOT RESOLVED. This tool takes already-structured
blocks; overlapping or contradictory entries are rejected naming both.
Parsing prose is the chat's job, at save time, with the athlete present.
Athlete-recalled average HR is NOT a field here -- the watch's HR is
authoritative and already in the corpus. It survives in raw_text only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | ||
| supersede | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |