Skip to content

fix(cli): close the two release-gate findings for 0.8.19 - #235

Merged
philbert440 merged 4 commits into
release/0.8.19-rcfrom
fix/release-gate-0.8.19
Nov 25, 2026
Merged

philbert440 merged 4 commits into
release/0.8.19-rcfrom
fix/release-gate-0.8.19

Conversation

@philbert440

Copy link
Copy Markdown
Collaborator

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_node used Locate::Discover, so rh memory receive --gateway <url> (or RIVETHUB_GATEWAY_URL) treated that URL as this node's drop box and sent the drop id there without SharePolicy::admit. The probe now uses the new Locate::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 --from server. DropBox::download is split into request (status checks) and Incoming::save (streaming), so downloading is announced only for the attempt that actually downloads.

H2. A refused desk push answered 500. desk_error mapped ShareError::Rescanned, Raw, Withheld and the seal refusals (Raw, Withheld, Unconfirmed) to DeskError::Failed, which the API answers with 500 "sharing failed; the rh log names the cause". They now map to a new DeskError::Refused(String). The share API answers it with 422 and the existing RefusalReason::Invalid, carrying the refusal text that says what to redact. No RefusalReason was added, so the wire contract is unchanged. desk_error moved to memory/desk_error.rs to keep desk.rs under the 600-line ceiling.

Tests

  • receive_never_sends_the_drop_id_to_the_gateway_flag: the --gateway server sees no request.
  • a_stopped_local_gateway_falls_back_to_the_embedded_server
  • a_local_gateway_that_answers_401_falls_back_to_the_embedded_server
  • a_push_the_second_scan_refuses_answers_4xx_with_the_reason: a real NodeDesk behind the gateway router. A draft with "ignore all previous instructions" answers 4xx with the prompt-injection reason.
  • desk_errors_map_to_one_status_and_reason gains the Refused → 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).

…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
philbert440 force-pushed the fix/release-gate-0.8.19 branch from 8124aa1 to 9023556 Compare November 25, 2026 15:42
@philbert440
philbert440 merged commit 7d66cdd into release/0.8.19-rc Nov 25, 2026
7 of 8 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