Sync loop failure typing: Stopped(typed cause) for unrecoverable protocol errors, malformed-batch retry through §5 with a §7 event (§10.3.4) #141

Closed
opened 2026-08-27 19:21:11 +02:00 by thecrealm · 1 comment
Owner

Review finding 2026-08-27 (A8). SyncLoop.kt:105-113: non-auth protocol errors (403/400/M_UNRECOGNIZED) back off forever; SyncState.Stopped/Backoff causes are Strings; malformed-batch retries use the private sleeper and only a log line, no MetricEvent.

Acceptance (§10.3.4, §7): typed cause on Backoff/Stopped; unrecoverable protocol errors stop with a typed cause; malformed-batch retry paced by §5 and reported as a metric event; tests asserting the observable Backoff state (none exist).

Review finding 2026-08-27 (A8). `SyncLoop.kt:105-113`: non-auth protocol errors (403/400/M_UNRECOGNIZED) back off forever; `SyncState.Stopped`/`Backoff` causes are Strings; malformed-batch retries use the private sleeper and only a log line, no `MetricEvent`. Acceptance (§10.3.4, §7): typed cause on `Backoff`/`Stopped`; unrecoverable protocol errors stop with a typed cause; malformed-batch retry paced by §5 and reported as a metric event; tests asserting the observable `Backoff` state (none exist).
Author
Owner

Partial overlap landed with #134 / D81 (commit f624a99): the malformed-batch retry is now paced by the §5 schedule (retryPolicy.retryDelay(e, malformedStreak)) and SyncLoopRateLimitTest.malformedBatchRetriesUnderTheSection5Schedule asserts the observable Backoff state. Still open here: typed causes on Backoff/Stopped, unrecoverable protocol errors stopping with a typed cause, and the §7 metric event.

Partial overlap landed with #134 / D81 (commit f624a99): the malformed-batch retry is now paced by the §5 schedule (`retryPolicy.retryDelay(e, malformedStreak)`) and `SyncLoopRateLimitTest.malformedBatchRetriesUnderTheSection5Schedule` asserts the observable `Backoff` state. Still open here: typed causes on `Backoff`/`Stopped`, unrecoverable protocol errors stopping with a typed cause, and the §7 metric event.
thecrealm added
now
and removed
next
labels 2026-09-01 11:33:29 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thecrealm/katrix#141
No description provided.