fix(xtask): pin the validate fidelity oracle to upstream rsync 3.4.4 - #7245
Merged
Conversation
oferchen
force-pushed
the
fix/xtask-validate-pinned-oracle
branch
from
August 7, 2026 01:35
dd4904e to
558bf25
Compare
oferchen
force-pushed
the
fix/xtask-validate-pinned-oracle
branch
from
August 7, 2026 23:03
558bf25 to
fc62caf
Compare
version_banner and parse_release_version are consumed only by commands::validate::oracle, and validate declares `mod oracle` behind #[cfg(unix)] because the fidelity matrix is unix-only. Their enclosing module, interop::shared::upstream, is not gated, so on Windows both functions had no caller and the deny(dead_code) build failed on the Windows ACL/xattr, Windows GNU cross-check and Windows IOCP cells. Gate them to match their sole consumer. Verified with cargo check -p xtask --all-targets --target x86_64-pc-windows-msvc (clean) and natively via fmt + clippy -D warnings.
Both sides added a module declaration at the same point in the alphabetical list: this branch adds `mod oracle;`, master gained `mod skips;` from the skip-ledger change. Both modules are required, so keep both and preserve the ordering (oracle < skips < support).
oferchen
marked this pull request as ready for review
August 12, 2026 16:04
Every sibling module in the validate command carries #[cfg(unix)], and
skips.rs opens with `use super::unix_impl::{CheckOutcome, Status}`, a
module that is itself #[cfg(unix)]. Merging master into this branch
re-ordered the module list to place `mod oracle;` alphabetically and
dropped the attribute from `mod skips;` in the process, so on Windows
the module compiled while the type it imports was configured out.
That broke every Windows job that builds the workspace - not just the
cross-check - because all of them build xtask:
error[E0432]: unresolved import `super::unix_impl`
--> xtask/src/commands/validate/skips.rs:30:12
Verified with cargo check -p xtask for x86_64-pc-windows-msvc and for
the native unix target.
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.
Problem
cargo xtask validateis the drop-in fidelity matrix: every check in it asserts"oc-rsync matches upstream rsync". It resolved the "upstream" side of that
comparison from
PATH:The first
rsynconPATHwon, at any version, with no version check at all.So a PASS meant "oc matches whatever rsync this host happens to have" - not
the contract - and a FAIL could be an oracle-version difference rather than an
oc defect. Measured: on the aarch64 Linux box the matrix has been run on,
/usr/bin/rsyncis 3.4.1, so the whole matrix was scored against 3.4.1.The fallback path could not have saved it either. It filters
UPSTREAM_VERSIONS, which still reads["3.0.9", "3.1.3", "3.4.1"], whiletools/ci/run_interop.shhas moved toversions=(3.0.9 3.1.3 3.4.4). Thestarts_with("3.4")preference therefore selects 3.4.1, and 3.4.4 wasunreachable by either branch.
Two more holes made the resolution unsafe rather than merely loose: nothing
verified the binary's version, and nothing verified it was rsync at all
(
/usr/bin/rsyncon macOS is openrsync).Fix
The oracle becomes an explicit, verified input to the harness instead of
ambient state it sniffs. New
xtask/src/commands/validate/oracle.rs:target/interop/upstream-install/3.4.4/bin/rsync- the treetools/ci/run_interop.shalready populates. No second discovery mechanism isintroduced; the path construction and the install root are hoisted into
interop::shared::upstreamand shared withdetect_upstream_binaries.--versionbanner, not the path. This mirrorsupstream_release_version()intools/ci/run_interop.sh, which parses thebanner for exactly the stated reason: "The install path is not authoritative:
a directory named 3.4.4 may hold any binary, and /usr/bin/rsync on macOS is
openrsync."
wrong release. A fidelity gate that cannot find its oracle must not guess.
PASS and FAIL is attributable to a named upstream release.
OC_RSYNC_VALIDATE_UPSTREAM=<path>overrides for deliberate cross-versioncomparison. The override is still probed and still reported - only the
version requirement is relaxed. The default is strict.
resolve_with()takes the install root, the override, and the version probe asparameters so the policy is exercisable without a real binary; production passes
the real probe at the single call site. That is the same dependency-inversion
shape as #7240, and for the same reason - the input that decides the outcome was
a global read several frames below the function under test. A plain parameter,
not a trait: one production value, one fixture value.
xtaskis oc-specific build tooling. Upstream rsync uses autotools and has noequivalent command, so there is no upstream behaviour to mirror here and no
upstream citation is claimed for this change. The
run_interop.shreferenceabove is a reuse citation for the banner-parsing rule, not an upstream-fidelity
claim.
Verification
Local only - GitHub Actions was in a confirmed outage while this was prepared.
Both directions. Relaxing only the two production strictness gates (making them
if false && ...) while keeping the tests turns the two that matter red:so they exercise the resolver rather than passing vacuously. End-to-end, with
real binaries:
Matrix re-run: which failures were oracle artifacts
Same oc-rsync binary, same checks, oracle version as the only variable, both
upstream releases built from source on the same host. Two runs each, identical
results:
verbosity: local -vverbosity: local -vvverbosity: local -vvvcrtimes: daemonchmod: local D2755,F640chmod: daemon D2755,F640chown: daemon chown-selfverbosityfailures survive verbatim -line 1: oc "a.txt" vs upstream "./"- so they are genuine oc divergences, not oracle artifacts.crtimes: daemonpasses against 3.4.1 and fails against 3.4.4(
crtime differs at alpha: oc=1614830767 upstream=0). The wrong oracle wasmasking a real divergence. Not fixed here - out of scope for this change -
but it is the concrete demonstration of the defect this PR closes.
chmod/chownfailures are host artifacts of this run, not oc defects:upstream itself exits 23 (
failed to set permissions on ".": Operation not permitted) and the group mismatch is the macOS default-group rule. They areoracle-independent.
Caveats on this measurement, stated rather than hidden: it was run on macOS, so
the 10 ssh-transport cells skipped (no sshd on localhost:22), and it needed GNU
touchonPATH. That is a second, separate defect worth its own issue -support::build_backdated_treeshells out totouch -h -d @<epoch>, which BSDtouchrejects, so on a stock macOS host 127 of 239 cells skip and the matrixsilently validates almost nothing. Not touched here.