Repository navigation
ci: range-check release-prefixed upstream citations instead of skipping them - #7607
Merged
Merged
Conversation
…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
force-pushed
the
ci/citation-gate-release-prefix
branch
from
September 1, 2026 20:12
d28151d to
215e823
Compare
This was referenced Sep 1, 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.
Rebased onto 92e50ab. Scope shrank from 31 files to 9: #7601, #7603 and #7605
landed the citation retargets this PR originally carried, so that half is
dropped as superseded. What remains is the half nothing else covers - the gate
that makes those retargets checkable - plus one sweep they left behind.
The hole
resolve_upstream_pathreturnsForeignUpstreamfor any cited path carrying a/that is not a manifest key, on the rule that a directory rsync does not shipnames a different project. A citation written as
target/interop/upstream-src/rsync-3.5.0/delete.c:191matches that rule, so thegate skips it - and the skip
continues abovetally.names_checked, so itleaves no trace in a report whose stated job is telling "clean" apart from
"examined nothing".
Measured on master at 92e50ab:
113 of those 379 skips name the PINNED release - 34 spelling the full unpack
prefix, 79 spelling the bare
rsync-3.5.0/directory - so their line numbershave 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, so the sweep is currently unverified. This PR is what verifies it: with
the gate widened, all 113 pass, but nothing proved that until now.
The change
[target/interop/upstream-src/]rsync-<VER>/is split off beforeresolution, so a prefixed citation of the pinned release is range-checked
exactly as the bare form is. Both spellings work; a
rsync-directory that isnot a version number is not stripped.
Violation::UnpinnedRelease, ahard failure - it names rsync at a version this tree no longer builds against,
which is a stale citation, not an out-of-scope one.
Missing, notForeignUpstream.continue, andexecuteprints the skippedand permitted totals.
After: 8831/8831 checked, 10 skipped - all zsync's genuinely foreign
librcksum/.Exemptions
CONTRIBUTING.mdandxtask/src/commands/citations.rsdocument this gate andmust be able to spell a rejected citation to show what it rejects.
docs/mixeslive 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, stated in-code rather than discovered later. The exemption covers only
the new arm; a phantom file or an out-of-range line still fails everywhere.
Non-vacuity proof
A gate that only ever passes was never tested, so both new arms were driven end
to end against a probe file added to the tree:
Line 999999 exists in no rsync release.
Master's gate: exit 0, reporting
8718 name(s) and 8718 line range(s) checked- byte for byte the tally without the probe. Invisible, not merelytolerated.
This gate: exit 1:
Those three are the only violations in the tree. Probe removed before commit.
The sweep #7601 left behind
checksum.c:285claims theschar *bufcast. At the pin that cast is line307; line 285 is now
case CSUM_SHA256:inside a digest switch. #7601corrected three instances of this string and left nine - all in range,
all green under both gates, all making the identical claim. Swept here.
This is the failure mode the gate's own module docs name: a finder only
surfaces what its heuristic matched, so working a finding list is not a sweep.
The remaining nine are why the module docs tell you to grep the defect string
before closing.
Gates
cargo fmt --all -- --check- cleancargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings- cleancargo nextest run -p xtask- 438/439; 24/24 citation tests pass. The onefailure,
validate::support::tests::backdated_tree_populates_and_backdates_the_root,is pre-existing and macOS-only (it shells out to
touch -d @1614830767, whichBSD
touchrejects) and is in a file this change does not touch.cargo xtask citations- green, 8831/8831python3 tools/ci/citation_drift_audit.py- per-crate counts identical tomaster in all 21 crates;
--ratchetpasses. No baseline change.CI is red on a pre-existing master failure, not on this change
nextest (stable),nextest (nightly)and bothFeature flag combinationsjobs fail on one test, the same one in every job:
Measured, not assumed: pristine current master (
603d101de) content checkedout into a clean worktree - none of this PR present - fails identically,
same assertion, same message. Independently, every changed line under
crates/in this PR is a comment (diffing out
//,///,//!leaves an empty set),and
xtaskis not linked into that test binary.The failing assertion is that test's own non-vacuity guard, not the property
it exists to prove: the three property assertions above it pass. The daemon
answers the provoker instead of dropping it, having parsed the client's greeting
line as a module name.
nextest (stable)cancelled at 1329/33460 tests on that failure, so it neverreached most of the suite. The checks that actually exercise this change both
pass:
Upstream citations resolve- pass (this iscargo xtask citations, the gate)Upstream citations track 3.5.0- pass (the drift ratchet)plus
fmt + clippy,macOS (stable),Windows (stable),interopandupstream-testsuite. This PR should go green once master is repaired; thebreakage is tracked with the daemon owner.