Skip to content

docs(transfer): retarget upstream citations at the pinned 3.5.0 - #7604

Merged
oferchen merged 1 commit into
masterfrom
docs/transfer-citations-350
Sep 1, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/transfer-citations-350

Conversation

@oferchen

@oferchen oferchen commented Sep 1, 2026

Copy link
Copy Markdown
Owner

crates/transfer cited upstream rsync by target/interop/upstream-src/rsync-3.4.1/... and rsync-3.4.4/... paths. The interop pin is 3.5.0. These were not cosmetically-stale paths: the line numbers are 3.4.x-era numbers, and at 3.5.0 most of them land on unrelated code.

What the old line numbers actually say at 3.5.0

citation what it claims at its 3.4.x baseline at 3.5.0, same number retargeted to
compat.c:655-661 the --acls requires protocol 30 or higher gate that gate (3.4.4) if (preallocate_files && !am_sender) { ... "preallocation is not supported" } compat.c:667-673
log.c:310-311 case FERROR_XFER: got_xfer_error = 1; that case (3.4.4) if (code == FCLIENT) code = FINFO; log.c:337-338
generator.c:1275-1287 check_filter(&daemon_filter_list, ...) and the ERROR: daemon refused to receive report that block (3.4.4) a comment fragment inside the hard-link fallback (* as a build without the macro does -- the caller creates) generator.c:1664-1676
backup.c:353 rprintf(FINFO, "backed up %s to %s\n", fname, buf) that line (3.4.4) close(bfd); backup.c:433
generator.c:2107-2145 touch_up_dirs() restoring tweaked dir perms that loop (3.4.4) the ftype != FT_REG / max_size skip block in recv_generator() generator.c:2579-2617

Neither existing gate can see this. cargo xtask citations only checks that the cited line number is <= the file's length at 3.5.0, which is true by coincidence for all of them; tools/ci/citation_drift_audit.py only inspects citations carrying a quoted C-string anchor, and it scans crates/*/src/** only - 21 of the 22 files here live in tests/.

Method

Every citation was retargeted by construct, never by arithmetic: read the claim, locate that function / branch / message / struct field in target/interop/upstream-src/rsync-3.5.0/, and re-derive both ends of every range there independently. Paths drop the version directory in favour of the bare form the rest of the crate already uses (there are no rsync-3.5.0/-prefixed citations anywhere in crates/).

Two of the citations turned out to be already-correct at 3.5.0 and were left alone: cleanup.c:217-218 (got_xfer_error -> RERR_PARTIAL) is byte-identical at both versions, and chmod.c:92 (bits = (where * what) & ~orig_umask) sits at line 77 in 3.4.1/3.4.4 and at 92 in 3.5.0 - it already names the pin. Coincidence is real here, so every site was checked rather than assumed to have moved.

The testsuite rename

3.5.0 rewrote the shell testsuite scripts as Python. Every one of the 19 cited testsuite/<name>.test files is gone at the pin and has a testsuite/<name>_test.py counterpart whose header reads # Python rewrite of testsuite/<name>.test, verified for all 19. Those locators move accordingly.

Prose that quotes the shell form verbatim keeps it and is now qualified as the 3.4.x form - e.g. Mirrors the opening block of upstream hardlinks_test.py, quoted here in the 3.4.x hardlinks.test shell form it was rewritten from: above a ```sh block. Sentences that record provenance ("Port of the upstream rsync 3.4.4 testsuite duplicates.test", "Verified against upstream rsync 3.4.4") are historical statements and are left as written.

Claims that changed, not just moved

  • generator.c:1344 cited link_stat(fname, &sx.st, keep_dirlinks && is_dir). At 3.5.0 that call site is generator.c:1745 and reads gen_entry_stat(fname, file, &sx.st, keep_dirlinks && is_dir). gen_entry_stat (generator.c:1389) is a thin dispatcher to link_stat_at on a held dirfd or link_stat otherwise, so the keep_dirlinks && is_dir follow-decision the comment is about is unchanged; only the quoted call text is updated.
  • uts_nextest_daemon_delete_stats.rs claimed the daemon-mode NDX_DEL_STATS exchange "is not a standalone upstream script". False at the pin: testsuite/daemon-delete-stats_test.py exists at 3.5.0. The reference list now names it and scopes the old statement to 3.4.x.
  • Same file cited del.c::do_delete_pass(). There is no del.c in 3.4.4 or 3.5.0; do_delete_pass() is static in generator.c (3.4.4:358, 3.5.0:364). Corrected to generator.c:364.
  • Three citations were already wrong at their own 3.4.x baseline, not merely drifted: options.c:2695-2703 and options.c:2727 in acl_negotiation_missing_remote.rs (they pointed at relative_paths/one_file_system and at args[ac++] = NULL, not at the A/X emission and maybe_add_e_option), and options.c:2002 in the two -zz files (the compress_choice = "zlibx" assignment is at 3.4.4:2011-2012). All three now point at the construct at 3.5.0.

No construct cited by the 22 files is absent from 3.5.0.

Deliberately not changed

daemon_push_refused_file_reports_error.rs:183-184 builds the runtime lookup path for an upstream binary (target/interop/upstream-install/3.4.4/bin/rsync, target/interop/upstream-src/rsync-3.4.4/rsync). That is executable code selecting which peer the interop leg runs against, not a citation - retargeting it would change behaviour, so it is left for whoever owns the interop binary pin. The same applies to the 3.4.4 gating prose in upstream_compat_daemon_gzip_goodbye.rs, which describes that binary.

Gates

  • python3 tools/ci/check_rustfmt_all.py - clean, 3369 tracked .rs files at edition 2024.
  • cargo xtask citations - passes; 8668 names and 8668 line ranges across 5035 files.
  • python3 tools/ci/citation_drift_audit.py transfer - string-anchored=152 suspected-drift=6 (4%) unresolved=78, identical to the pre-change baseline. That is not evidence of correctness: the audit globs crates/transfer/src/**/*.rs only, and 21 of these 22 files are under tests/. It confirms no regression, nothing more. No entry in its output names any file this PR touches.

Comment-only. Four changed lines are not comments: they are assert! failure-message string literals in acl_negotiation_missing_remote.rs and daemon_push_refused_file_reports_error.rs that quote the same citations inline ("error message must match upstream compat.c:657-659 format byte-for-byte"). Leaving them would print a stale line number to whoever reads the failure. No predicate, comparison value, or control flow changed.

Out of scope, and still stale

The unresolved=78 population in the drift audit is concentrated in crates/transfer/src/, outside the 22 files this PR covers, and those citations carry no version prefix so the enumerating grep does not reach them. Spot-checked, they are 3.4.4-era and mostly wrong at the pin:

  • receiver/directory/backup.rs: generator.c:2018 -> generator.c:2477-2478; its quoted make_backup(fname, False) is a paraphrase of if (!make_backup(fname, skip_atomic)) at both versions. backup.c:191 (if (!prefer_rename)) -> backup.c:230.
  • receiver/basis.rs: generator.c:720-721 (if (block_size) blength = block_size;) is correct at 3.5.0 - it was 714-715 at 3.4.4. The audit reports it unresolved only because the quoted anchor spans two upstream lines, a documented false-negative class of the tool.

basis.rs, quick_check.rs and directory/backup.rs alone carry 181 citation lines across ~120 distinct sites; construct-level re-derivation of those is a separate piece of work, not a rider on this one. uts_2_efg_ssh_alt_dest_verification.rs and uts_files_from_ssh_push_relative.rs also still cite testsuite/alt-dest.test and testsuite/files-from.test, both gone at the pin.

The crate's upstream citations named rsync-3.4.1 / rsync-3.4.4 paths and
carried 3.4.x-era line numbers. The interop pin is 3.5.0, where those line
numbers land on unrelated code: compat.c:655-661 (the --acls protocol gate)
is a SUPPORT_PREALLOCATION block, log.c:310-311 (case FERROR_XFER) is an
FCLIENT remap, backup.c:353 (the "backed up %s to %s" report) is close(bfd).

Every citation was re-derived by locating its construct in the pinned tree,
both ends of every range independently. Paths drop the version directory to
match the bare form the rest of the crate already uses.

3.5.0 also rewrote the shell testsuite scripts as Python (each _test.py
carries a "Python rewrite of testsuite/<name>.test" header), so the 19 cited
testsuite/*.test locators move to their testsuite/*_test.py equivalents.
Sentences that quote the shell form verbatim keep it, qualified as 3.4.x.

Comment-only. The four non-comment lines touched are assert! failure-message
literals that quote the same citations.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 1, 2026
@oferchen
oferchen merged commit 47b7c9f into master Sep 1, 2026
70 checks passed
@oferchen
oferchen deleted the docs/transfer-citations-350 branch September 1, 2026 19:41
oferchen added a commit that referenced this pull request Sep 2, 2026
`## [Unreleased]` last covered the #7304-#7522 era. Measured against the 60
most recently merged pull requests, 44 were absent; of the most recent 45,
43 were absent. Nothing from #7574 onward was recorded at all.

Each entry is derived from what the pull request actually landed - the merge
commit and the body - not from its title. Three cases where those differ:

  * #7616 ships far more than the doc-alias correction its body describes:
    the `upstream_version` pin moves to 3.5.0 and `--version` starts naming
    `quic`, `sd-notify`, `vmsplice` and `send_zc`.
  * #7618 also adds the pull-request rustdoc-link job its body says was
    filed separately, which is what closes the master-only-gate recurrence.
  * #7602's squash carries the closed #7597 as its first commit, so the
    directory-obstacle half is recorded under #7602.

#7587 is deliberately not recorded. Its merge commit is empty: the change
had already landed as #7563, which the section already names.

Entries extend the existing Keep a Changelog groups and the bold
sub-groupings. Clusters that are one story carry one entry with several
references: the FERROR_XFER routing and its two-phase drain (#7576, #7581),
the connection-FSM close edge and the accept loop that outlives a session
error (#7579, #7590), the three detaching daemon suites (#7578, #7588,
#7592), the io_uring and SEND_ZC work (#7593, #7600, #7610), the citation
retargets (#7601, #7603, #7604), and the accept-loop pin flake (#7615,
#7620).

Only `## [Unreleased]` is touched; every released section, including the
3.4.4 statements that were correct when written, is byte-identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant