Repository navigation
fix(citations): retarget the core crate's upstream citations at rsync 3.5.0 - #7321
Merged
Merged
Conversation
… 3.5.0 #7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it, so their citations name 3.4.4 line numbers in a tree the gate resolves against 3.5.0. This clears the `core` ratchet, which five open PRs currently inherit: FAIL: core suspected-drift rose 3 -> 4 (before) core: suspected-drift=0 (after) Every target was verified against BOTH tarballs. Only the first is a mechanical retarget; the rest needed the enclosing construct because the anchor the audit extracts is not unique in its file. 1. flags.rs generator.c:298 -> :304 `io_error & IOERR_GENERAL` is unique; surrounding context is byte-identical. 2. daemon_transfer/connection/mod.rs clientserver.c:382 -> :425 `rprintf(FERROR, "` occurs many times. The site is the `@ERROR` handler, located by `strncmp(line, "@error", 6)` (3.4.4:381 -> 3.5.0:424) and confirmed by byte-identical context. 3. flags.rs options.c:2852-2857 -> :3018-3023 4. invocation/tests.rs options.c:2850-2851 -> :3016-3017 (two sites) Both were already correct 3.4.4 RANGES; the audit flagged them only because it anchors on the range's prose (`if (am_sender)`), which occurs three times in options.c and is not on the cited line. The blocks are byte-identical at a constant +166. The comments are re-anchored on `args[ac++] = "--super"` and `args[ac++] = "--only-write-batch=X"`, each unique in options.c, so the audit can resolve them instead of guessing. 5. invocation/tests.rs main.c:1839 -> :1919, sender.c:217 -> :501 ⚠ Neither was reported by the ratchet - it only inspects lines containing the word `upstream`, and these sit mid-sentence in a doc comment. Both were stale. `sender.c` moved by +284 where options.c moved by +166, so an offset applied in bulk would have been wrong; each was located by its construct (`if (write_batch < 0) dry_run = 1` and `f_xfer = write_batch < 0 ? batch_fd : f_out`). `core` drops 4 -> 0, so its baseline goes 3 -> 0 in the same commit, as the baseline file requires - leaving it at 3 would keep accepting drift that no longer exists and hide the next regression under that headroom. Deliberately out of scope: - `protocol` (`flist.c:758`) - the identical fix is already in #7318. - `daemon` (`clientserver.c:1559`) - same cohort, fixed on #7314. Measured on ce8c63d: `tools/ci/citation_drift_audit.py --ratchet` reports core=0; `cargo xtask citations` passes (7826 citations); `cargo fmt --all -- --check` clean.
oferchen
force-pushed
the
fix/citation-pin-cohort
branch
from
August 14, 2026 05:17
ff82327 to
f473d80
Compare
oferchen
enabled auto-merge (squash)
August 14, 2026 06:00
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… 3.5.0 (#7321) #7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it, so their citations name 3.4.4 line numbers in a tree the gate resolves against 3.5.0. This clears the `core` ratchet, which five open PRs currently inherit: FAIL: core suspected-drift rose 3 -> 4 (before) core: suspected-drift=0 (after) Every target was verified against BOTH tarballs. Only the first is a mechanical retarget; the rest needed the enclosing construct because the anchor the audit extracts is not unique in its file. 1. flags.rs generator.c:298 -> :304 `io_error & IOERR_GENERAL` is unique; surrounding context is byte-identical. 2. daemon_transfer/connection/mod.rs clientserver.c:382 -> :425 `rprintf(FERROR, "` occurs many times. The site is the `@ERROR` handler, located by `strncmp(line, "@error", 6)` (3.4.4:381 -> 3.5.0:424) and confirmed by byte-identical context. 3. flags.rs options.c:2852-2857 -> :3018-3023 4. invocation/tests.rs options.c:2850-2851 -> :3016-3017 (two sites) Both were already correct 3.4.4 RANGES; the audit flagged them only because it anchors on the range's prose (`if (am_sender)`), which occurs three times in options.c and is not on the cited line. The blocks are byte-identical at a constant +166. The comments are re-anchored on `args[ac++] = "--super"` and `args[ac++] = "--only-write-batch=X"`, each unique in options.c, so the audit can resolve them instead of guessing. 5. invocation/tests.rs main.c:1839 -> :1919, sender.c:217 -> :501 ⚠ Neither was reported by the ratchet - it only inspects lines containing the word `upstream`, and these sit mid-sentence in a doc comment. Both were stale. `sender.c` moved by +284 where options.c moved by +166, so an offset applied in bulk would have been wrong; each was located by its construct (`if (write_batch < 0) dry_run = 1` and `f_xfer = write_batch < 0 ? batch_fd : f_out`). `core` drops 4 -> 0, so its baseline goes 3 -> 0 in the same commit, as the baseline file requires - leaving it at 3 would keep accepting drift that no longer exists and hide the next regression under that headroom. Deliberately out of scope: - `protocol` (`flist.c:758`) - the identical fix is already in #7318. - `daemon` (`clientserver.c:1559`) - same cohort, fixed on #7314. Measured on 30b95b7: `tools/ci/citation_drift_audit.py --ratchet` reports core=0; `cargo xtask citations` passes (7826 citations); `cargo fmt --all -- --check` clean.
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.
Clears the
coreratchet, which five open PRs currently inherit (#7301, #7304, #7313, #7314, #7315, #7316). Comment-only — no behaviour change.Why these went stale
#7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it (
git log 21c46555b..master), landing 3.4.4 line numbers in a tree the gate resolves against 3.5.0. A pin move is not a one-changeset event — it silently invalidates every branch already in flight.What changed
Every target verified against both tarballs. Only the first is a mechanical retarget.
flags.rsgenerator.c:298:304daemon_transfer/connection/mod.rsclientserver.c:382:425@ERRORhandlerflags.rsoptions.c:2852-2857:3018-3023args[ac++] = "--super"invocation/tests.rs(×2)options.c:2850-2851:3016-3017args[ac++] = "--only-write-batch=X"invocation/tests.rsmain.c:1839,sender.c:217:1919,:501⚠ Do not treat the audit's candidate column as a fix list
Rows 2-4 have non-unique anchors —
rprintf(FERROR, "andif (am_sender)each resolve to three places in 3.5.0, andio_error |= IOERR_GENERALoccurs 19 times inflist.c. So the audit reports candidates, not answers.It is worse than merely non-committal. For row 2 the audit offered:
The correct line is 425 — not in that list at all. Every candidate sits in the greeting/protocol-error block; the actual site is the
@ERRORhandler further down. Anyone retargeting to the first suggestion would have shipped a citation that resolves cleanly, passes the hard gate, and points at unrelated code — strictly worse than leaving it stale, because the next reader has no reason to doubt it.Each site here was instead located by its enclosing construct and confirmed by byte-identical surrounding context.
Rows 3-4 were already correct 3.4.4 ranges; the audit flagged them only because it anchors on the range's prose (
if (am_sender)), which is not on the cited line. Those comments are now re-anchored on strings that are unique inoptions.c, so the audit can resolve them rather than guess — this is the recurrence fix, not just the retarget.Row 5 is the one the gate could never have caught
main.c:1839andsender.c:217sit mid-sentence in a doc comment, on lines that do not contain the wordupstream— the only lines the drift audit inspects. Both were stale.sender.cmoved by +284 whereoptions.cmoved by +166, so a bulk offset would have been wrong; each was located by its construct (if (write_batch < 0) dry_run = 1andf_xfer = write_batch < 0 ? batch_fd : f_out).Baseline
coredrops 4 → 0, so its baseline goes 3 → 0 in this commit. The baseline file requires lowering when citations are fixed: leaving it at 3 keeps accepting drift that no longer exists and hides the next regression under that headroom.Out of scope, deliberately
protocol(flist.c:758) — the identical fix is already in docs(protocol): retarget name.rs upstream citations at the 3.5.0 pin #7318. Dropped from this PR to avoid two PRs editing one line.daemon(clientserver.c:1559) — same cohort, fixed on fix(daemon): match upstream's peer-host naming and ACL evaluation #7314.Verification
Measured on
ce8c63dd1:python3 tools/ci/citation_drift_audit.py --ratchet—core: suspected-drift=0cargo xtask citations— 7826 citations, all resolvecargo fmt --all -- --check— cleanNo
cargo buildneeded, so master'sdrop_devicesbreakage (#7319) does not gate this.