Repository navigation
docs: retarget upstream citations at the pinned 3.5.0 - #7601
Merged
Merged
Conversation
Two citations in `crates/matching` named `.../rsync-3.4.1/rsum.c:362-366`. `rsum.c` is zsync's `librcksum/rsum.c`; no file of that name has ever existed anywhere in the rsync source tree, so the path was fabricated in both halves - wrong project and a version the repo does not pin. Both sites already cite the same source correctly elsewhere as `zsync librcksum/rsum.c:362-366`; they now match that local form. The remaining eleven sites named `rsync-3.4.1` / `rsync-3.4.4` paths while the pin is 3.5.0, and the line numbers were 3.4.1-era. Each was re-derived by locating the cited construct in the 3.5.0 tree, both ends of every range: - checksum.c get_checksum1: 285-300 -> 303-318; the `schar *` cast is 307 (285 was the function signature, not the cast). - match.c hash_search: 140-345 -> 163-378, 200-345 -> 224-378, 265-310 -> 297-343. - io.c safe_read/safe_write: 239 -> 292, 312 -> 369, 276 -> 333. - testsuite/atimes.test and crtimes.test -> atimes_test.py and crtimes_test.py; 3.5.0 replaced the shell suite with Python rewrites. - batch.c, token.c and the whole-tree reference in iocp/pump.rs are path-only and just move to 3.5.0. Neither existing gate detects this class: `xtask citations` only checks that a line number is within the file's 3.5.0 length, and `citation_drift_audit.py` only inspects citations carrying a quoted C anchor. A citation can therefore name a file that does not exist in the tree it points into and still pass both. `simd-checksum-x86_64.cpp:113-313` is unchanged between 3.4.1 and 3.5.0 and is left alone. The `rsync-3.4.1/flist.c:713` strings in `xtask/src/commands/citations.rs` are the deliberate worked example of the out-of-scope-path rule that gate implements, and stay as they are.
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.
A citation naming a file that has never existed in the tree it points into
crates/matching/tests/sparse_match_fixture.rsandcrates/matching/src/index/sparse_match_tests.rsboth carried:The comment says "zsync's" and then points into the rsync tarball.
rsum.ciszsync's
librcksum/rsum.c; rsync has never shipped a file of that name, at anyrelease. So the path is wrong in both halves - wrong project, and a version the
repo does not pin. Both files already cite the same source correctly a few lines
away (
zsync librcksum/rsum.c:362-366, andcrates/matching/src/index/mod.rs,bithash.rs,compact_lookup.rsall use that form). These two sites now match it.This is the clearest statement of why a line-count gate is not sufficient.
xtask citationspassed this line for as long as it existed: it resolves a pathwith a directory component that the 3.5.0 manifest lacks to
ForeignUpstreamanddeclines to range-check it - by design, so that genuine
librcksum/citations arenot false positives.
citation_drift_audit.pynever looked at it either; it onlyinspects citations carrying a quoted C-string anchor (572 lines of 13k+). Neither
gate can tell a deliberate foreign-upstream citation from a fabricated path.
Retargeting the rest
The other eleven sites named
rsync-3.4.1/orrsync-3.4.4/paths while the pinis 3.5.0, and the line numbers were 3.4.1-era, not merely the paths. Each was
re-derived by locating the cited construct in
target/interop/upstream-src/rsync-3.5.0/, both ends of every range, and eachmapping confirmed by comparing the line text across the two trees:
checksum.cget_checksum1()bodychecksum.cschar *buf = (schar *)buf1match.chash_search()wholematch.chash_search()two-stage gatematch.cpost-match forward jumpio.csafe_read()io.csafe_write()io.csafe_readEOF breakbatch.c,token.cand the whole-tree reference incrates/fast_io/src/iocp/pump.rscarry no line number and only move to 3.5.0.
checksum.c:285was already wrong at 3.4.1Three sites cite
checksum.c:285for theschar *cast. At 3.4.1 line 285 is theuint32 get_checksum1(char *buf1, int32 len)signature; the cast is 289. They nowname 307, which is the cast at 3.5.0.
The atimes/crtimes fixtures moved shape, not just line
3.5.0 replaced the shell
testsuite/*.testsuite with Python*_test.py.testsuite/atimes.testandtestsuite/crtimes.testdo not exist at the pin;atimes_test.pyandcrtimes_test.pydo, and each declares itself a "Pythonrewrite of testsuite/atimes.test".
crates/metadata/tests/atimes_crtimes_roundtrip.rsnow names the Python files and says why the name changed. The prose claim (stamp
known timestamps, assert preservation) still holds against the rewrites.
Left untouched, deliberately
xtask/src/commands/citations.rs:174and:562. Thersync-3.4.1/flist.c:713string is the worked example of the
ForeignUpstreamrule that gate implements -"a release this gate does not pin".
:562is the test asserting that resolution.Retargeting either destroys the example, and
:562is not a comment line.tools/ci/run_upstream_test_with_upstream_binary.sh:15. The comment documentsthe script's own default, and that default is a non-comment line still reading
upstream_version="${UPSTREAM_VERSION:-3.4.4}"whilerun_upstream_testsuite.shdefaults to 3.5.0. Editing only the comment would make it false. Flagged for a
separate change that moves the default.
simd-checksum-x86_64.cpp:113-313incrates/checksums/src/rolling/checksum/neon.rs.Measured: that byte range is identical between 3.4.1 and 3.5.0 (
get_checksum1_ssse3_32starts at 113 in both). Correct by coincidence, so it stays.
Claims that changed meaning at 3.5.0 - reported, not rewritten
Neither invalidates the comment, but both are worth recording rather than quietly
absorbing:
hash_search()gained aMAX_CHAIN_LEN(1024) per-offset chain cap at 3.5.0(upstream issue Document legacy negotiation prefix replay in protocol docs #217). The "two-stage gate (rolling sum then strong sum)" the two
sparse-match fixtures describe is still there; it is now additionally bounded.
want_iadjacent-block hint gained&& l == s->sums[want_i].len. The claimin
shifted_insertion_fixture.rsthat aligned shifted inserts must satisfy thehint still holds, under a tighter condition.
Gates
python3 tools/ci/check_rustfmt_all.py- 3369 tracked files, clean.cargo xtask citations- 8668 names and 8668 line ranges across 5035 files, pass.cargo check -p matching -p checksums -p metadata -p compress -p batch --all-targets- clean.python3 tools/ci/citation_drift_audit.py matching checksums fast_io metadata compress batch-unchanged before and after, no rise in
unresolved:Comment-only:
git diff -U0contains no changed line that is not a comment.Scope excludes
crates/transfer,crates/engine,crates/daemon,crates/coreand
crates/protocol, which are being retargeted separately.