Skip to content

Keep the per-recipient code stream valid on failures after 64/65 - #36

Open
markmnl wants to merge 1 commit into
mainfrom
fix/per-recipient-code-stream
Open

Keep the per-recipient code stream valid on failures after 64/65#36
markmnl wants to merge 1 commit into
mainfrom
fix/per-recipient-code-stream

Conversation

@markmnl

@markmnl markmnl commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Confirmed follow-up (b) of #33: after code 64/65 the sender reads exactly one byte per recipient it hosts, so any header-level code written at that point is consumed as a recipient's response code and desyncs the stream — the sender ends up recording global code 3 as a per-recipient outcome.

Changes

  • The three per-recipient failure sites (store failure in storeAcceptedMessage, payload copy failure, attachment persist failure) now write the per-recipient undisclosed code 105 instead of header-level code 3.
  • When downloadMessage fails in handleConn — where the wire position within (or before) the per-recipient stream is unknown — the connection is now aborted instead of writing a header-level code 3 into the stream. The sender records no response (-1 retryable sentinel) and retries later, per SPEC §10.4.

🤖 Generated with Claude Code

After responding code 64 or 65 the sender reads one byte per recipient,
so per-recipient failure sites must write the per-recipient undisclosed
code 105, not the header-level code 3 (SPEC SS8/SS10.4). Download or
storage failures where the stream position is unknown now abort the
connection instead of writing a header-level code into the stream; the
sender records no response and retries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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