Repository navigation
docs(engine,daemon,core,protocol): retarget citations at rsync 3.5.0 - #7603
Merged
Merged
Conversation
The pinned upstream oracle is rsync 3.5.0, but 3.4.x-era citations in
crates/{engine,daemon,core,protocol} still carried 3.4.1/3.4.4 line
numbers. Neither gate can catch this: 'xtask citations' only checks the
number is within the 3.5.0 file's length, and the drift audit only
inspects citations carrying a quoted C-string anchor.
Every site was resolved by locating the named construct in
target/interop/upstream-src/rsync-3.5.0, not by arithmetic. Both ends of
each range were re-derived. Comment-only; no behaviour change.
oferchen
added a commit
that referenced
this pull request
Sep 1, 2026
…ng them `resolve_upstream_path` returns `ForeignUpstream` for any cited path carrying a `/` that is not a manifest key, on the rule that a directory rsync does not ship names a different project. A citation written as `target/interop/upstream-src/rsync-3.5.0/delete.c:191` matches that rule, so the gate skips it - and the skip `continue`s above `tally.names_checked`, so it leaves no trace in a report whose stated job is telling "clean" apart from "examined nothing". Measured on master at 92e50ab: 8718 names and 8718 ranges checked, and 379 citations skipped. 113 of those 379 name the PINNED release - 34 spelling the full unpack prefix, 79 spelling the bare `rsync-3.5.0/` directory - so their line numbers have never been checked by anything. That set includes the citations #7601, #7603 and #7605 have just rewritten: the retarget sweep landed its new line numbers into the one shape the gate does not read. Three changes: - A leading `[target/interop/upstream-src/]rsync-<VER>/` is split off before resolution, so a prefixed citation of the pinned release resolves to a manifest key and is range-checked exactly as the bare form is. A `rsync-` directory that is not a version number is not stripped. - A citation naming any other release becomes `Violation::UnpinnedRelease`, a hard failure. It names rsync at a version this tree no longer builds against, which is a stale citation, not an out-of-scope one. - Under a pinned prefix, a tail that resolves nowhere is `Missing` rather than `ForeignUpstream`: the prefix asserts the release outright, so it cannot be another project. - The skip is counted before the `continue`, and `execute` prints the skipped and permitted totals, so a population that grows again grows in the open. After: 8831 names and 8831 ranges checked, 10 skipped - all of them zsync's genuinely foreign `librcksum/`. Two exemptions from the unpinned-release arm, both scoped, neither covering the phantom-file or out-of-range arms. `CONTRIBUTING.md` and `xtask/src/commands/citations.rs` document this gate and have to be able to spell a rejected citation to show what it rejects. `docs/` mixes live reference with historical record, and a note describing upstream at 3.4.1 is accurate because it names the old release; 253 citations across 70 files there name a non-pinned release, and sorting record from reference needs a reader per file. Non-vacuity, both arms, end to end. A probe file citing `rsync-3.4.1/flist.c:999999`, `rsync-3.5.0/flist.c:999999` and the bare `rsync-3.5.0/` spelling of the same - a line no rsync release has - was added to the tree. Against master's gate: exit 0, tally `8718 name(s) and 8718 line range(s)`, byte for byte the tally without the probe, so the probe was invisible rather than tolerated. Against this gate: exit 1, the 3.4.1 line reported as unpinned and both 3.5.0 spellings reported as out of range, and those three are the only violations in the tree. The probe was removed before commit. Also sweeps nine citations of `checksum.c:285`, which claims the `schar *buf` cast. At the pin that cast is line 307; 285 is now `case CSUM_SHA256:` inside a digest switch. #7601 corrected three instances of this string and left nine, which is the failure mode the gate's own docs name: a finder only surfaces what its heuristic matched, so working a finding list is not a sweep. All nine are in range and were green under both gates.
oferchen
added a commit
that referenced
this pull request
Sep 2, 2026
…ng them (#7607) `resolve_upstream_path` returns `ForeignUpstream` for any cited path carrying a `/` that is not a manifest key, on the rule that a directory rsync does not ship names a different project. A citation written as `target/interop/upstream-src/rsync-3.5.0/delete.c:191` matches that rule, so the gate skips it - and the skip `continue`s above `tally.names_checked`, so it leaves no trace in a report whose stated job is telling "clean" apart from "examined nothing". Measured on master at 92e50ab: 8718 names and 8718 ranges checked, and 379 citations skipped. 113 of those 379 name the PINNED release - 34 spelling the full unpack prefix, 79 spelling the bare `rsync-3.5.0/` directory - so their line numbers have never been checked by anything. That set includes the citations #7601, #7603 and #7605 have just rewritten: the retarget sweep landed its new line numbers into the one shape the gate does not read. Three changes: - A leading `[target/interop/upstream-src/]rsync-<VER>/` is split off before resolution, so a prefixed citation of the pinned release resolves to a manifest key and is range-checked exactly as the bare form is. A `rsync-` directory that is not a version number is not stripped. - A citation naming any other release becomes `Violation::UnpinnedRelease`, a hard failure. It names rsync at a version this tree no longer builds against, which is a stale citation, not an out-of-scope one. - Under a pinned prefix, a tail that resolves nowhere is `Missing` rather than `ForeignUpstream`: the prefix asserts the release outright, so it cannot be another project. - The skip is counted before the `continue`, and `execute` prints the skipped and permitted totals, so a population that grows again grows in the open. After: 8831 names and 8831 ranges checked, 10 skipped - all of them zsync's genuinely foreign `librcksum/`. Two exemptions from the unpinned-release arm, both scoped, neither covering the phantom-file or out-of-range arms. `CONTRIBUTING.md` and `xtask/src/commands/citations.rs` document this gate and have to be able to spell a rejected citation to show what it rejects. `docs/` mixes live reference with historical record, and a note describing upstream at 3.4.1 is accurate because it names the old release; 253 citations across 70 files there name a non-pinned release, and sorting record from reference needs a reader per file. Non-vacuity, both arms, end to end. A probe file citing `rsync-3.4.1/flist.c:999999`, `rsync-3.5.0/flist.c:999999` and the bare `rsync-3.5.0/` spelling of the same - a line no rsync release has - was added to the tree. Against master's gate: exit 0, tally `8718 name(s) and 8718 line range(s)`, byte for byte the tally without the probe, so the probe was invisible rather than tolerated. Against this gate: exit 1, the 3.4.1 line reported as unpinned and both 3.5.0 spellings reported as out of range, and those three are the only violations in the tree. The probe was removed before commit. Also sweeps nine citations of `checksum.c:285`, which claims the `schar *buf` cast. At the pin that cast is line 307; 285 is now `case CSUM_SHA256:` inside a digest switch. #7601 corrected three instances of this string and left nine, which is the failure mode the gate's own docs name: a finder only surfaces what its heuristic matched, so working a finding list is not a sweep. All nine are in range and were green under both gates.
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.
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.
The pinned upstream oracle is rsync 3.5.0, but citations across
crates/{engine,daemon,core,protocol}still carried 3.4.1- and 3.4.4-era linenumbers. These are not cosmetically-stale paths: the numbers point at the wrong
code.
Comment-only. No behaviour change.
Before / after: what the old number actually says at 3.5.0
delete.c:130-225(6 files)delete_itemenum delret delete_item(...)* delete recursively.— a comment fragmentdelete.c:191-288generator.c:272-347(5 files)delete_in_dirstatic void delete_in_dir(...)lseek(deldelay_fd, 0, 0);insideflush_delete_delay()generator.c:285-360clientserver.c:752(2 files)@ERROR: max connections (%d) reachedreplyio_printflineint ret, pre_exec_arg_fd = -1, ...— a variable declarationclientserver.c:799flist.c:3217-3343f_name_cmpint f_name_cmp(...)return ndx;insideflist_find_ignore_dirness()flist.c:3554-3671main.c:1267-1384(2 files)client_run()int client_run(...)rprintf(FERROR, "Your options have been rejected...")main.c:1323-1440hlink.c:186-208match_hard_linksvoid match_hard_links(...)if (inc_recurse && CVAL(node->data, 0) == 0) {hlink.c:200-222Method
Every site was resolved by locating the named construct in
target/interop/upstream-src/rsync-3.5.0, never by arithmetic, and both endsof every
START-ENDrange were re-derived independently. Ranges that repeatacross files (
delete.c:130-225,generator.c:272-347, …) were resolved onceand applied consistently.
Findings that are not retargets
del.cdoes not exist — in any version.crates/engine/src/delete/reorder_buffer.rs:65cited
rsync-3.4.1/del.cfor NDX_DEL_STATS semantics. There is nodel.cat3.4.1 or 3.5.0. The described construct (one frame, five varints) is
main.c:write_del_stats()/read_del_stats(); the citation now names thosefunctions at
main.c:229-251.Two pre-existing over-spans, corrected rather than shifted.
delete.c:82-225 (delete_item)indelete/mod.rsanddelete_determinism_property.rs: at 3.4.1, line 82 is insidedelete_dir_contents(/* We do our own recursion... */), notdelete_item(130).
flist.c:3217-3343 (f_name_cmp)indelete/mod.rs:f_name_cmpends at3334 at 3.4.1; 3343 is inside
f_name_has_prefix. Both were narrowed to thelabelled function's true 3.5.0 bounds.
socket.c:402-499 (open_socket_in)at3.4.4 likewise stopped one line short of the function (
500).Claims whose named helpers no longer exist upstream — prose left alone.
emitter/mod.rssaysdelete_itemuses "do_rmdirfor directories androbust_unlinkfor everything else";cohort_index.rssays "the dispatch isunconditional
do_unlink". At 3.5.0 the directory arm isdel_held_dfd()+do_unlink_atfd(dfd, leaf, AT_REMOVEDIR)(falling back todo_rmdir_at), and the file arm isdel_unlink(). The policy is unchanged(rmdir for dirs, unconditional unlink otherwise), so the ranges were retargeted
and the prose left as-is rather than rewritten to match 3.5.0. Flagging it here
so a reviewer can decide.
Separately,
emitter/mod.rs'sdelete_itembullet says "ENOTEMPTYrecurses".It does not, at either version: the recursion happens in
delete_dir_contentsbefore the rmdir, and
delete_item'sENOTEMPTYarm only setsDR_NOT_EMPTY. Pre-existing, not version drift; left untouched.One quoted C excerpt had to move with its range.
zlib_codec_proto_lt_31.rsquotes (elided)send_deflated_token. 3.5.0restructured that loop: the
deflate()call now sits inside a nested drain loop(bundled-zlib
Z_INSERT_ONLYvs system-zlibZ_SYNC_FLUSHfallback, upstream#951). The
protocol_version >= 31offset advance the test actually pins isbyte-identical. The elision was updated so the quote is faithful to the lines it
now cites (475-511). The
send_file_entryflag prelude quoted inflist_wire_flags_rp28g.rsis byte-identical at 3.5.0 — path and range only.One citation coincides across versions.
hlink.c:59-65(init_hard_links)is at the same lines in both trees; only the path changed. Being in the stale set
did not mean it had moved.
cleanup.rscarried three eras side by side. 3.4.1-era, 3.4.4-era, andalready-3.5.0 citations in the same file. Verified-correct-at-3.5.0 and therefore
left untouched:
delete.c:217,generator.c:351,flist.c:1490, and the wholesender.cblock (145,176-177,395,426-428,429-430,433-440,434-439,442,442-451,453,454,456-457,457-458).Deliberately not touched
crates/core/tests/common/mod.rs:428namesrsync-3.4.4/rsync— an interopbinary path this repo builds, not a source citation. Same shape at
.github/workflows/_interop.yml:87.Stale citations found outside this PR's scope
Reported, not changed here:
crates/daemon/src/daemon/sections/server_runtime/{accept_loop.rs:199, listener.rs:370, listener.rs:463, tests.rs:1234, tests.rs:1490}— all citesocket.c::open_socket_inat 3.4.1428-498/ 3.4.4432-498/socket.c:463-465. This PR movedruntime_options/types.rstorsync-3.5.0/socket.c:552-650for the same function, so those five sites arenow the odd ones out. They sit in an area under active change, hence the split.
crates/core/src/client/remote/output_option.rs:3—options.catrsync-3.4.4:354crates/core/tests/exit_code_comprehensive.rs:1139—rsync-3.4.1/errcode.hcrates/protocol/tests/iconv_golden_bytes.rs:7—rsync-3.4.1/flist.cGates
python3 tools/ci/check_rustfmt_all.py.rsfiles checked at edition 2024 — cleancargo xtask citationspython3 tools/ci/citation_drift_audit.py engine daemon core protocol:unresolveddoes not rise anywhere;string-anchoredrises by 2 in engine anddaemon and daemon's
unresolveddrops by 1 — retargeted anchors that now resolveagainst the 3.5.0 tree. The 2 daemon drift rows are pre-existing and untouched.
Verified comment-only: every added and removed line in the diff begins with
//,///, or//!.