Repository navigation
fix(batch): use protocol version for stream flags bitmap encoding - #2528
Merged
Merged
Conversation
BatchFlags::write_to previously hardcoded to_bitmap(30), which would incorrectly include protocol-30-only flag bits (e.g., xfer_dirs, preserve_acls) in batch files written with lower protocol versions. Similarly, BatchFlags::read_from hardcoded from_bitmap(bitmap, 30), ignoring the actual protocol version read from the header. Fix by: - Replace write_to with write_to_versioned(writer, protocol_version) that masks bits by the given protocol version - Replace read_from with read_raw(reader) that returns the raw bitmap, letting BatchHeader::read_from reconstruct flags after reading the protocol version from the header
oferchen
force-pushed
the
fix/batch-header-protocol-version
branch
from
February 27, 2026 14:35
5416017 to
e426a0a
Compare
oferchen
added a commit
that referenced
this pull request
May 1, 2026
) BatchFlags::write_to previously hardcoded to_bitmap(30), which would incorrectly include protocol-30-only flag bits (e.g., xfer_dirs, preserve_acls) in batch files written with lower protocol versions. Similarly, BatchFlags::read_from hardcoded from_bitmap(bitmap, 30), ignoring the actual protocol version read from the header. Fix by: - Replace write_to with write_to_versioned(writer, protocol_version) that masks bits by the given protocol version - Replace read_from with read_raw(reader) that returns the raw bitmap, letting BatchHeader::read_from reconstruct flags after reading the protocol version from the header
oferchen
added a commit
that referenced
this pull request
May 5, 2026
) BatchFlags::write_to previously hardcoded to_bitmap(30), which would incorrectly include protocol-30-only flag bits (e.g., xfer_dirs, preserve_acls) in batch files written with lower protocol versions. Similarly, BatchFlags::read_from hardcoded from_bitmap(bitmap, 30), ignoring the actual protocol version read from the header. Fix by: - Replace write_to with write_to_versioned(writer, protocol_version) that masks bits by the given protocol version - Replace read_from with read_raw(reader) that returns the raw bitmap, letting BatchHeader::read_from reconstruct flags after reading the protocol version from the header
5 tasks done
1 task
oferchen
added a commit
that referenced
this pull request
Jun 3, 2026
SEC-1.j (#2528) is completed. Remove the 3 leftover TODO comments that referenced deferred DirSandbox wiring in guard.rs and process.rs.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
SEC-1.j (#2528) is completed. Remove the 3 leftover TODO comments that referenced deferred DirSandbox wiring in guard.rs and process.rs.
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.
Summary
BatchFlags::write_towhich hardcodedto_bitmap(30), incorrectly including protocol-30-only flag bits in batch files written with lower protocol versionsBatchFlags::read_fromwhich hardcodedfrom_bitmap(bitmap, 30), ignoring the actual protocol version from the headerwrite_to_versioned(writer, protocol_version)andread_raw(reader)that properly respect protocol version boundariesTest plan