Commit graph

5 commits

Author SHA1 Message Date
36a9afdbc3 Telemetry contract: rows from builds up to 1.3.0+38 can be stored twice
Backgrounding started two flushes at once and both posted the pending rows:
17 of 438 sessions in 2026-08-30..09-13 have two session_summary rows, each
pair created within 0.23 s. Says how to count them (distinct device + ts +
event, or device + sessionId for a summary). Fixed in amber-app by running one
flush at a time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 21:44:31 +02:00
2e5ae66662 Telemetry contract: a session the app never saw end
Documents the amber-app change that records a film whose TV is switched off
with it on screen. session_summary gains ended (closed | unseen), lastSeenAt
and playedOn; a session held on disk and never closed is written once at the
next launch, with its one health row; a new error row, session_hold_failed,
records a hold that could not be written, released or read.

Includes the measurement that ruled out a lifecycle hook: on the kids' box
ff3bcf, 13 of 13 films in 14 days left no summary, with no callback at their
end and 0 of 3572 api_usage rows delivered late.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 21:25:53 +02:00
9daf638c49 Document source_pick, the row that says why a source won
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 21:58:18 +02:00
8d3cefa3f5 Telemetry contract: the real session_summary shape, and the duplicate warning
The documented meta was the THIN row -- the leftover second writer that
amber-app just removed. It also never said that watchedS (elapsed watch
clock) and positionS (where playback reached) are different numbers, which
is exactly the distinction that made a never-started session readable.

Records that aggregates over rows before 2026-08-07 double-count Android
sessions, and gives the filter that excludes them.
2026-08-07 12:40:49 +02:00
418f566603 Add client_logs collection for background device diagnostics (feedback 2 §4)
The family runs Amber on hardware I can't debug directly, so the app batches
a low-volume diagnostic stream here: uncaught errors, player error codes,
per-session playback summaries, and the audio-delay a user dials in to fix
desync (the "a track falls behind" signal).

- Migration 1788000000_client_logs.js: owner-create-only, superuser-read-only
  (list/view/update/delete = null); fields kind/event/message/meta/appVersion/
  platform/device/ts + created.
- client_logs.pb.js: nightly cron trims rows older than 14 days.
- docs/telemetry-contract.md: event catalogue, how I query it, and the
  privacy/redaction guarantees (host-only, never a token or full URL).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:49:04 +02:00