Repository navigation
fix(cli): close the two release-gate findings for 0.8.19 - #235
Merged
Merged
Conversation
…past it rh memory receive asked "this node's drop box" through the gateway URL from --gateway or RIVETHUB_GATEWAY_URL, so the drop id went to whatever server that named, outside the share allowed list. The probe now locates the gateway from the config and the live runtime record only (Locate::ThisNode). A stopped local gateway, a 401, or a 404 on that probe now means the drop is not here, and the receive continues to the embedded or --from server instead of failing. The download is announced only once a server answers with the drop, so a skipped probe no longer prints "downloading from this node's drop box".
A desk push the second scan refused (prompt-injection or secret shapes), or that the share rules refused (a raw bundle, withheld or unconfirmed flags), mapped to DeskError::Failed and answered HTTP 500 with "sharing failed; the rh log names the cause". Those refusals now map to DeskError::Refused, which the share API answers with 422, reason invalid, and the refusal text that says what to redact. The desk error mapping moves to its own module to keep desk.rs under the file ceiling.
A successful GET consumes the one-time drop. The old save step then wrote the progress line and opened a second inbox tempfile, so a broken stderr pipe or a failed open dropped the response and lost the drop. The receive now clones the inbox partial opened before the claim and streams the body into it. The progress callback returns nothing, so reporting progress can no longer fail a receive on any path.
…ctions reqwest's is_connect also matches TLS handshake failures, so a running local gateway with a rejected certificate was silently skipped and the drop fetched from the embedded server. Only connection refused, found in the error source chain, now means no gateway is here; TLS and other connect errors fail the receive.
philbert440
force-pushed
the
fix/release-gate-0.8.19
branch
from
November 25, 2026 15:42
8124aa1 to
9023556
Compare
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.
Why
To ship 0.8.19 stable. The release-gate review of release/0.8.19-rc found two items that have to be fixed first.
What changed
H1. Receive sent the drop id to the --gateway server and failed instead of falling back.
DropBox::on_this_nodeusedLocate::Discover, sorh memory receive --gateway <url>(orRIVETHUB_GATEWAY_URL) treated that URL as this node's drop box and sent the drop id there withoutSharePolicy::admit. The probe now uses the newLocate::ThisNode, which reads only the config and the live gateway.json. A connection failure, 401 or 404 on that probe now means "not here", and the receive continues to the embedded or--fromserver.DropBox::downloadis split intorequest(status checks) andIncoming::save(streaming), sodownloadingis announced only for the attempt that actually downloads.H2. A refused desk push answered 500.
desk_errormappedShareError::Rescanned,Raw,Withheldand the seal refusals (Raw,Withheld,Unconfirmed) toDeskError::Failed, which the API answers with 500 "sharing failed; the rh log names the cause". They now map to a newDeskError::Refused(String). The share API answers it with 422 and the existingRefusalReason::Invalid, carrying the refusal text that says what to redact. NoRefusalReasonwas added, so the wire contract is unchanged.desk_errormoved tomemory/desk_error.rsto keepdesk.rsunder the 600-line ceiling.Tests
receive_never_sends_the_drop_id_to_the_gateway_flag: the--gatewayserver sees no request.a_stopped_local_gateway_falls_back_to_the_embedded_servera_local_gateway_that_answers_401_falls_back_to_the_embedded_servera_push_the_second_scan_refuses_answers_4xx_with_the_reason: a realNodeDeskbehind the gateway router. A draft with "ignore all previous instructions" answers 4xx with the prompt-injection reason.desk_errors_map_to_one_status_and_reasongains theRefused→ 422 / invalid row.All four new tests fail on the base branch and pass on this one.
Proved with:
cargo xtask check --locked --no-nextest-list(GATE OK);cargo nextest run -p cli -p gateway -p rivethub -p wire --no-fail-fast(1158 passed, 1 skipped);cargo xtask commits origin/release/0.8.19-rc..HEAD(GATE OK); the four new tests run against the unfixed source (4 failed).