Repository navigation
Verify baseline builds before paired comparisons - #1508
Conversation
compare.py took a baseline as four binaries and a revision file, with nothing recording what built them, so a baseline from another Rust distribution or with other flags gave a comparison that looked valid. Every build now writes build.json beside its binaries: the revision and any uncommitted changes to tracked files, rustc -vV, the flag and profile settings in the environment, and each binary's hash. --save-baseline preserves a validated build with that record. --baseline refuses a directory without one, a binary that differs from its recorded hash, and a compiler or setting that differs from the current build's, before anything is built. --skip-build reuses binaries only when their record still describes them, so the current side of a pair is checked too.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 196d3a1328
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Cargo runs the compiler RUSTC names, then the one build.rustc names, which CARGO_BUILD_RUSTC sets from the environment, and only then rustc on PATH. The build record skipped the middle step, so builds made with different CARGO_BUILD_RUSTC compilers recorded the same rustc -vV and passed the pairing check.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
compare.py --baselinetook four binaries and arevisionfile, and nothing recorded what had built them. A baseline built by another Rust distribution, or with different flags, still gave a comparison that looked valid. The service footprint report describes one such comparison, which mixed Arch and rustup builds of the same Rust version.Every build now writes
build.jsonnext to its binaries. It holds the revision, any uncommitted changes to tracked files,rustc -vV, the Cargo flag and profile settings in the environment, and each binary's hash.--save-baseline DIRcopies a validated build and its record into DIR. Before anything is built,--baselinenow stops with an error when the record is missing, a binary differs from its recorded hash, or the compiler or settings differ from the current build's.--skip-buildnow needs the record as well, so the current side of a pair is checked rather than assumed to match.Two limits:
revisionfile, are refused. Save them again with--save-baseline.--save-baseline, so a baseline of an older revision can only be saved from a commit that includes this change.Rust flags set in Cargo config files outside the repository are not recorded.
Card: VIBE-245