Skip to content

Commit 596efab

Browse files
committed
say that repeated sync failures pause rather than stop
1 parent 65415ae commit 596efab

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Sessions outlive their logs by one step: a batch sends the session records its l
254254
- Device and app context capture (`captureDeviceInfo` / `captureAppContext` are honoured)
255255
- In-app overlay: Logs, Network and Session tabs, reading a capped in-memory buffer so it works with no server configured
256256
- Opt-in redaction (`RedactionBehavior`) and body size caps (32 KB)
257-
- Server backoff: 429/503 read `Retry-After` and pause without counting toward the auto-stop; 413 halves the batch. `lib/src/log/sync_backoff.dart`
257+
- Server backoff: 429/503 read `Retry-After` and pause without counting toward the failure counter; 413 halves the batch. `lib/src/log/sync_backoff.dart`. Five consecutive real failures buy a 5 minute pause, not a stop, and the counter resets after it
258258
- Session sampling: `LoggingBehavior.sessionSampleRate`, lowered further by the project's server-side rate from `/api/validate`, drawn once per launch in `init()`. The gate is in `processLogEntry`, above the SQLite write and below the console and overlay
259259
- Live sessions: `lib/src/live/live_session_client.dart`, a `dart:io` WebSocket to `{link}api/live/socket`. Pairs with a six character code typed into the overlay's Live tab, then streams every log as it happens. `publish()` sits **above** the sampling gate in `processLogEntry` — somebody watching deliberately should see everything
260260

‎lib/src/log/log_sync_worker.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class LogSyncWorker {
156156
_growBatch(syncBehaviour.maxBatchSize);
157157
} catch (e, st) {
158158
// A throttle and an oversized batch are the server working correctly.
159-
// Neither touches the failure counter, so neither can reach the auto-stop
159+
// Neither touches the failure counter, so neither can reach the pause
160160
// below — that keeps its original meaning: this server is broken, or
161161
// these credentials are wrong.
162162
if (e is SyncBackoff) {

0 commit comments

Comments
 (0)