docs: align historical plans/specs with renamed identifiers (roundTrip -> execute, log schema)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 20:24:05 +02:00
parent 5ebb0f756d
commit 5b238b3f54
5 changed files with 20 additions and 20 deletions

View File

@@ -100,7 +100,7 @@ preflights:
### Garmin wrapper call log (`internal/garmin`)
`client.go`'s `roundTrip` is the single funnel point every one of the six
`client.go`'s `execute` is the single funnel point every one of the six
`Client` methods already goes through (confirmed while surveying: none of
them ever put Garmin credentials in the wire `params` -- email/password
only ever reach the subprocess via env vars at spawn time, so logging
@@ -134,7 +134,7 @@ what keeps this safe for the huge per-second-telemetry responses
while still showing tiny auth results (`{"status":"mfa_required",...}`) in
full -- exactly the detail needed for the motivating incident.
All six `Client` methods pass their own `ctx` through to `roundTrip`
All six `Client` methods pass their own `ctx` through to `execute`
(currently they call it without one). `ensureStarted` also gains a `ctx
context.Context` param and logs one `Info` line on actual spawn
(`python_path`, whether a token store is configured) -- spawning the
@@ -163,7 +163,7 @@ subprocess is itself a call to the external component.
`applog.WithLogger`, call `Authenticate`/`CompleteMFA`, assert the emitted
JSON line's `cmd`/`duration_ms`/`result_preview` fields, and that a
wrapper-reported error surfaces at `Warn` with an `error` field. Update
the three existing tests that call `roundTrip` directly
the three existing tests that call `execute` directly
(`TestSubprocessClient_RoundTrip_DetectsIDMismatch`,
`_SubprocessClosedIsError`, `_WrapperErrorPropagates`) to pass
`context.Background()` as the new first argument.

View File

@@ -42,7 +42,7 @@ dispatcher that `get_workout_by_id` goes through) gains a check: if the caught e
- `wireResponse` gains `NotFound bool `json:"not_found,omitempty"``.
- A new sentinel: `var ErrNotFound = errors.New("garmin: resource not found")`.
- `roundTrip`: when `resp.Error != "" && resp.NotFound`, the returned error wraps `ErrNotFound`
- `execute`: when `resp.Error != "" && resp.NotFound`, the returned error wraps `ErrNotFound`
(`fmt.Errorf("%s: %s: %w", cmdName, resp.Error, ErrNotFound)`), so callers can
`errors.Is(err, garmin.ErrNotFound)` regardless of which method was called.
@@ -96,7 +96,7 @@ no shape change -- a test simulating a 404 just sets the mapped error to
- `internal/garmin/pyscript/tests/test_wrapper.py`: a new test mirroring the existing
`test_call_propagates_garminconnect_exception_as_error`, but raising
`GarminConnectNotFoundError` and asserting the response includes `"not_found": true`.
- `internal/garmin` (Go): a test asserting `roundTrip` wraps the error with `ErrNotFound` when
- `internal/garmin` (Go): a test asserting `execute` wraps the error with `ErrNotFound` when
the wire response sets `not_found: true`.
- `internal/store`: extend the existing `ActivitiesMissingWorkout` test (or add a new one) with a
fixture that has `workout_not_found_at` set, asserting it's excluded from both