docs(blobs): say what the push ack actually proves - #26
Merged
Conversation
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>
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #25. Documentation only — no behavior change.
The comment on
push_acceptedclaimed the provider closes its half "when the push was accepted and handled", and that waiting on it meansexecute_pushreturns "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, beforehandle_push_implstores anything.reader.inner.stop(code)(provider.rs:364) — aSTOP_SENDINGon the pusher's send stream, which a pusher that has already calledsend.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-blobspasses.🤖 Generated with Claude Code