Skip to content

docs: correct the delivery-retry paragraph — the SDK never auto-resends - #16

Merged
Zakariya1057 merged 1 commit into
mainfrom
fix/readme-delivery-retry
Aug 13, 2026
Merged

docs: correct the delivery-retry paragraph — the SDK never auto-resends#16
Zakariya1057 merged 1 commit into
mainfrom
fix/readme-delivery-retry

Conversation

@Zakariya1057

Copy link
Copy Markdown
Collaborator

What

One paragraph in the README, rewritten to match the code.

Why

The "Delivery state & retry" section claimed:

an unconfirmed send is retried automatically every 3 s, up to 3 times, and each retry waits out a mid-reconnect socket (up to 15 s) before transmitting — so FAILED only lands after the ladder is exhausted (~12 s fully offline).

Every specific in that sentence is wrong. Coordinator.trackDelivery never retransmits — it waits for the server echo and fails the draft as soon as the echo can't arrive:

Situation Actual behaviour README claimed
Offline at send time (sentEpoch == 0) fails immediately ~12 s
Socket drops / reconnects while pending fails at that moment retried, waits up to 15 s
Healthy socket, server never echoes SEND_CONFIRM_TIMEOUT_MS = 10 s, then FAILED 3 s × 3 attempts

The companion comment says it outright — // No auto-resend — the user retries explicitly — and this has been the deliberate design since 0.8.0, where auto-resend-on-reconnect was removed to stop duplicate delivery (CHANGELOG: "one retry = one send").

Why it's worth fixing rather than leaving

The old wording framed the host app's retry button as a backstop for the SDK's own retry ladder — something you add after the SDK gives up. An integrator could reasonably read that as optional. It isn't: it is the only path from FAILED back to a send, so an app built on the old text silently strands failed messages.

This also propagated outward — it was copied into the published Android SDK docs page, which is being corrected separately.

Corroboration

examples/chat/views/02-standard/README.md:264 and the 0.8.0 CHANGELOG entry both already describe the real behaviour. The top-level README was the only place still carrying the old claim.

Scope

Documentation only — no code change. Verified against v0.9.0.

The README claimed an unconfirmed send is "retried automatically every 3 s,
up to 3 times", waiting out a mid-reconnect socket for up to 15 s, with
FAILED landing only after "~12 s fully offline". None of that matches the
code, and it has been wrong since the 0.8.0 manual-retry change.

Coordinator.trackDelivery never retransmits. It waits for the server echo
and fails the draft when the echo can't arrive:

  - sentEpoch == 0 (never reached an open socket) -> fails immediately,
    not after ~12 s
  - the connection drops or the open-epoch changes while still pending
    -> breaks out and fails at that moment
  - otherwise withTimeoutOrNull(SEND_CONFIRM_TIMEOUT_MS = 10_000L), then
    failPending()

The companion comment is explicit: "No auto-resend - the user retries
explicitly", as is the 0.8.0 CHANGELOG entry ("one retry = one send",
adopted to kill duplicate delivery on reconnect).

This matters beyond accuracy: the old wording framed the host app's retry
button as a backstop for the SDK's own retry ladder, so an integrator could
reasonably conclude it was optional. It isn't - it's the only path from
FAILED back to a send.

examples/chat/views/02-standard/README.md and the CHANGELOG already
described the real behaviour; the top-level README was the outlier. No
code change - documentation only.
@Zakariya1057
Zakariya1057 merged commit bd36b6f into main Aug 13, 2026
3 checks passed
@Zakariya1057
Zakariya1057 deleted the fix/readme-delivery-retry branch August 13, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant