Skip to content

docs(blobs): say what the push ack actually proves - #26

Merged
jonaswre merged 1 commit into
mainfrom
docs/push-ack-scope
Aug 5, 2026
Merged

docs(blobs): say what the push ack actually proves#26
jonaswre merged 1 commit into
mainfrom
docs/push-ack-scope

Conversation

@jonaswre

@jonaswre jonaswre commented Aug 5, 2026

Copy link
Copy Markdown

Follow-up to #25. Documentation only — no behavior change.

The comment on push_accepted claimed the provider closes its half "when the push was accepted and handled", and that waiting on it means execute_push returns "once the blob has actually landed". Neither is what the stream carries.

The provider decides acceptance on the request alone:

  • handle_read_request_result (provider.rs:334) resets the writer there — that is the refusal signal.
  • into_reader (provider.rs:130) then syncs and drops that writer, producing a clean end of stream, before handle_push_impl stores anything.
  • A failure during the transfer is signalled the other way, as reader.inner.stop(code) (provider.rs:364) — a STOP_SENDING on the pusher's send stream, which a pusher that has already called send.finish() may never observe.

So a clean end of stream means the receiver took the request, not that the blob is durably stored. The comment now says that, and records the mechanism so the next reader doesn't have to re-derive it.

Refusals are still reported exactly as before, since those are decided pre-transfer — PushError::Refused's "It has stored nothing" remains accurate. This only narrows what the success case is documented to promise; it is not a regression, as the pre-#25 code reported success in the mid-transfer-failure case too.

Found during a security review of #25, which produced no HIGH or MEDIUM findings. cargo check -p krikos-blobs passes.

🤖 Generated with Claude Code

The comment on `push_accepted` claimed the provider closes its half "when
the push was accepted and handled", and that waiting on it means
`execute_push` returns "once the blob has actually landed". Neither is
what the stream carries.

The provider decides acceptance on the request alone:
`handle_read_request_result` resets the writer there, and `into_reader`
then syncs and drops it -- a clean end of stream -- before
`handle_push_impl` stores anything. A failure during the transfer is
signalled the other way, as a `stop` on the pusher's send stream, which
a pusher that has already called `send.finish()` may never observe.

So a clean end of stream means the receiver took the request, not that
the blob is durably stored. Refusals are still reported exactly as
before, since those are decided pre-transfer -- this only narrows what
the success case is documented to promise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://holon-technologies.github.io/iroh/pr/26/docs/krikos/

Last updated: 2026-08-05T13:09:52Z

@jonaswre
jonaswre merged commit 68705e2 into main Aug 5, 2026
47 checks passed
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