Repository navigation
fix(batch): mirror upstream batch writing, replay and option checks - #8250
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/batch-parity
branch
from
October 28, 2026 16:32
0666d28 to
d26f87a
Compare
4 of 5 tasks
Carries the session_fork.rs fix from #8253 so this branch's macOS jobs stop failing on the master test-harness race: on EPERM for our own child, SIGKILL the leader before a blocking WNOWAIT wait, and accept a setpgid refusal when the child already leads its own group. The content is identical to #8253, so the two merge without conflict.
# Conflicts: # crates/core/src/client/config/filters.rs # crates/core/src/client/run/batch.rs
This was referenced Oct 29, 2026
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
-nwith--write-batchor--only-write-batchcreates no batch files (options.c:2280-2283)..shhere-doc writes each rule throughget_rule_prefix(for_xfer=0)and lists the rule list as it stands when the script is written (batch.c:213-240, exclude.c:1540-1572, 1824-1885).--read-batchreconciles its options with the batch's stream flags through one table, ascheck_batch_flagsdoes (batch.c:59-162), and refuses conflicting options with upstream's text (options.c:1780-1792, 2265-2269).--write-batchwrites its.shduring protocol setup (compat.c:838). The script is a byte-exact copy of the original argv (batch.c:297-311). Remote batches record--iconv..shas 3.5.1 and exits 1 with upstream's text (batch.c:217-229). Batch open errors name the file throughfull_fname()(util1.c:1528).81 felike 3.5.1 (compat.c:739-740, uidlist.c:398-405).--read-batch --inplacewrites into the destination itself, keeping its inode. It truncates the file to the new length and makes backups by copy (receiver.c:664-671, 1212-1241; generator.c:2281-2301).--delete-excluded, only the rules given after the option carry thesmodifier, on the wire (- a, then-s b) and in the.sh(exclude.c:1478-1481). Every unsided rule is still treated as sender-only (exclude.c:1903-1913).crates/batch/src/replay/is deleted. Its tests now replay through the live--read-batchreceiver, and their fixtures write real MD5 file sums plus the trailer a recording ends with.Test plan
tests/batch_upstream_oracle.rs(16 cells) compares oc against pinned 3.5.1 bytes, and against a live 3.5.1 when one is installed, with cross-replay in both directions. The cells cover:.sh, open-error paths,81 feheader bytes, the--inplaceinode, and the--delete-excludedhere-doc.crates/test-support/tests/delete_excluded_rule_order.rschecks the client-to-server rule bytes for a pull and a push, with oc and 3.5.1 as clients.cargo nextest run -p batch -p core -p cli -p transfer -p protocol -p engine -p logging -p test-support --all-featuresCoordination
-Flisting: .rsync-filteragainst upstream: /.rsync-filter, and-/ abs(filters parity, task 222). Protocol-29 replay of an oc-recorded local batch (task 279).Deliberate differences and residuals
81 fewhere 3.5.1 writes81 ff. Setting the bit made the header match in all six option cells. But 3.5.1 then refused to replay the batch with "invalid path from sender: sub/b" (flist.c:3230). The engine writes one flat file list, and an inc-recursive reader accepts only top-level names in the first list. Matching this needs an INC_RECURSE-segmented body, built either by the engine batch writer or by routing local--write-batchthrough the in-process sender and receiver, as upstream's local child does. This branch keeps the bit cleared. The full mirror, with the bit set and the incremental-recursion file list layout, is tracked as a follow-up (task 484).Pre-merge checklist
cargo fmt --allrun locally.CHANGELOG.mdupdated.