Skip to content

fix: don't skip Build Determinism when bazel-test-all tests fail - #11091

Open
basvandijk wants to merge 2 commits into
masterfrom
ai/build-determinism-not-skippable-2026-08-10
Open

fix: don't skip Build Determinism when bazel-test-all tests fail#11091
basvandijk wants to merge 2 commits into
masterfrom
ai/build-determinism-not-skippable-2026-08-10

Conversation

@basvandijk

Copy link
Copy Markdown
Collaborator

Problem

build-determinism (which compares per-artifact digests between the remote-cache-enabled Bazel Test All build and the no-cache Build IC build) declared needs: [build-ic, bazel-test-all] with no if: — so any test failure in Bazel Test All skipped it. By the time tests run in that job, its build step has succeeded, its execution logs are uploaded (the .github/actions/bazel action uploads them if: success() || failure()), and on release builds the artifacts have already been published to the CDN by the "Upload artifacts" step.

Net effect: an ordinary flaky/failing test disables the determinism gate for artifacts that still ship. That's exactly how 9e2920593e and f18ab1c843 reached the CDN with the check silently skipped (both master pushes had test failures; verified via the jobs API — Build Determinism: skipped on both runs). The pcre2-sys non-reproducibility introduced by 9e2920593e (fixed in #11090) went unnoticed until repro-check failed on a dev machine.

Fix

if: ${{ !cancelled() && needs.build-ic.result == 'success' }}
  • Bazel Test All test failures no longer skip the comparison — the execlogs it needs exist even when that job fails.
  • build-ic must still have succeeded: it produces the no-cache side of the comparison, and it is skipped on merge_group runs — where the determinism job stays skipped exactly as before.
  • Cancelled runs stay skipped.

Found while root-causing the GuestOS reproducibility regression (see #11090 for the full analysis).

🤖 Generated with Claude Code

The build-determinism job compares per-artifact digests between the
remote-cache-enabled Bazel Test All build and the no-cache Build IC
build. It had `needs: [build-ic, bazel-test-all]` with no `if:`, so any
test failure in Bazel Test All skipped it — even though by that point
the job's build step had succeeded, its execution logs had been
uploaded (the bazel action uploads them on failure too) and, on release
builds, the artifacts had already been published to the CDN by the
"Upload artifacts" step.

That is exactly how 9e29205 and f18ab1c shipped to the CDN with
the determinism check silently skipped: both master pushes had ordinary
test failures, so the pcre2-sys non-reproducibility introduced by
9e29205 (fixed in #11090) sailed through unnoticed and only surfaced
when repro-check failed on a dev machine.

Run the job whenever the run isn't cancelled and build-ic succeeded
(build-ic produces the no-cache side of the comparison and is skipped
on merge_group, where there is nothing to compare — that behavior is
unchanged).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflow so the Build Determinism gate still runs when Bazel Test All fails during its test phase, preventing flaky/failing tests from silently skipping determinism verification for artifacts that may already be published.

Changes:

  • Adds a job-level if: guard to run Build Determinism when the workflow isn’t cancelled and build-ic succeeded, regardless of bazel-test-all’s final result.
  • Documents the rationale in-line (why Bazel test failures previously caused determinism checks to be skipped while artifacts could still ship).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci-main.yml
@basvandijk
basvandijk marked this pull request as ready for review August 10, 2026 14:38
@basvandijk
basvandijk requested a review from a team as a code owner August 10, 2026 14:38
@github-actions github-actions Bot added the @idx label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants