Conversation
A receiver used to learn what it was getting as it arrived, and the file was created before any question could be asked. Now, once the key confirmation passes, the receiver is shown the name, a type label from the real extension (with a warning for programs), the size, a folder's file count and unpacked size, and exactly where it would be saved. Nothing is created until they accept. The destination is planned by looking rather than creating, so declining leaves the directory byte-identical, and the name shown is the name written. A question unanswered for two minutes is declined. Without a terminal, `drop recv` refuses to start unless given `--yes`, and refuses before contacting anything so the sender's code is not spent. The relay learns `accept`, `decline`, `cancel` from either side and `finishing`. It carries no chunk before `accept`, forwards reasons only from a fixed set, and counts declines and cancels apart from failures. The sender waits for the answer and says what the receiver is doing. While the question is open the receiver keeps reading, because a relay drops a socket that stops answering pings. That read is abandoned when the person answers, so receiving must be cancel-safe, and the QUIC framing was not: `read_exact` into a local buffer loses a partial frame when dropped. It now keeps the partial frame in the transport. Negative controls: without the relay's gate the early-chunk test fails; with a file created on the decline path the decline test fails; the old framed reader fails the cancel-safety test. Consent plan phases 2 and 3; decisions entry 19. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
On Windows, where a PathBuf is larger, the two fields receiver consent added to Payload pushed Attempt::FailedTheCode past Clippy's large-variant limit, failing CI there only. The payload is boxed; nothing reads it except the retry that hands it back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
Only a normal completion drained the sender's socket before dropping it. When a receiver declined or cancelled mid-stream, the relay stopped reading the sender's chunks, so its close became a TCP reset. Linux keeps the preceding `cancel` frame readable after a reset; Windows discards unread data, so the Windows CI run of the receiver-cancel test saw "connection aborted" instead of the receiver's reason. Both socket tasks now drain until the peer answers the Close, whenever their loop ended with the socket still open, bounded by the existing deadlines. The download socket had no drain at all, which the teardown plan had recorded as a latent problem of the same shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
This branch has not been deployed
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.
Consent plan, phases 2–3, recorded as decision 19. It changes behaviour and the wire (still protocol v2, unreleased), so it waits for your review. Stacked on #71.
What a receiver sees now
Folders show the file count and unpacked size. Programs (
.exe,.ps1,.dmg,.sh…) get a warning line. The type comes from the real extension, not the sender's MIME type, soinvoice.pdf .exeshows up as a program.--yes→ refuses before contacting anything, so the code isn't spent (your choice from earlier). Scripts pipingdrop recvneed--yes; netlab andscripts/dev-transfer.share updated.Sender
Prints what the receiver is doing: "The receiver entered the code and is deciding whether to accept...", "Accepted.", "The receiver has everything and is finishing up...". It also reports "the receiver declined the transfer", "…did not answer within two minutes…", and receiver cancels, with reasons.
Relay
accept,decline {reason},cancel {reason},finishing. A sendercancelnow reaches the receiver ascancel, noterror: sender cancelled.accept, andacceptis refused beforemeta./metricsgainstotal_transfers_declinedandtotal_transfers_cancelled. These are no longer counted as failures.Found while building it
While the question is open, the receiver must keep reading the socket, or the relay drops it for not answering pings. That read gets abandoned when the person answers, so receiving must be cancel-safe, and the QUIC framing wasn't:
read_exactinto a local buffer loses a partial frame when dropped. It now keeps partial frames in the transport, and the trait documents the requirement.Tests (240, up from 217)
authentication failedhandshake error, which also occurs onmain(details in the netlab plan).Not in this PR (phase 4)
Letting a person cancel (a key, or a first Ctrl-C),
drop-status: state=lines, and exit codes 3/4.🤖 Generated with Claude Code
https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S