Skip to content

Verify baseline builds before paired comparisons - #1508

Merged
mgomes merged 2 commits into
masterfrom
yori/vibe-245
Dec 4, 2026
Merged

mgomes merged 2 commits into
masterfrom
yori/vibe-245

Conversation

@mgomes

@mgomes mgomes commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

compare.py --baseline took four binaries and a revision file, 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.json next 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 DIR copies a validated build and its record into DIR. Before anything is built, --baseline now 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-build now needs the record as well, so the current side of a pair is checked rather than assumed to match.

Two limits:

  • Baseline directories made the old way, with a revision file, are refused. Save them again with --save-baseline.
  • Revisions from before this change don't have --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

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T00:28:11.973256Z 5118634 Manual request
🔒 Security Review ✅ Completed 2026-12-04T00:22:30.068920Z 196d3a1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mgomes

mgomes commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/compare.py Resolved
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.
@mgomes

mgomes commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 5118634768

ℹ️ 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".

@mgomes
mgomes merged commit 235606b into master Dec 4, 2026
12 checks passed
@mgomes
mgomes deleted the yori/vibe-245 branch December 4, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant