Skip to content

fix(bcr): darwin/amd64 pin + Bazel 9 & Rosetta-Intel CI coverage#3

Merged
michael-herwig merged 3 commits into
mainfrom
fix/bcr-macos-and-bazel9
Jul 3, 2026
Merged

fix(bcr): darwin/amd64 pin + Bazel 9 & Rosetta-Intel CI coverage#3
michael-herwig merged 3 commits into
mainfrom
fix/bcr-macos-and-bazel9

Conversation

@michael-herwig

Copy link
Copy Markdown
Contributor

Fixes the macOS-only failure in the BCR submission (bazelbuild/bazel-central-registry#9543) and closes the two CI gaps that let it through. Does not touch the BCR PR — repo-side fix + coverage first.

Root cause

BCR's macos presubmit agent is Intel x86_64 (macos_arm64 is a separate platform). The lazy ocx.package in e2e/bzlmod (and examples/package) pinned darwin/arm64 but not darwin/amd64, so on Intel mac pinned_ref fell back to the bare tag and _lazy_package hard-fail()d at fetch (package.bzl:38-41). Linux/Windows/arm64-mac passed because they had pins. Our own CI missed it: macos-latest = arm64, and e2e/bzlmod wasn't in CI at all.

Changes

  • Fix: add darwin/amd64 pin (digest b17686a0…, verified via ocx package install -p darwin/amd64) to e2e/bzlmod jq_lazy and examples/package jq_pinned + jq_lazy. Build-only bakes the digest as text → GC-safe.
  • Bazel 9: version matrix (8.7.0 + 9.x required, rolling non-blocking) on test/examples/offline via USE_BAZEL_VERSION. Bazel 9 is otherwise green — only docs-freshness (//docs) is excluded on Bazel≠8.7.0 (stardoc emits extra repo_mapping rows; the golden is a pinned-Bazel artifact).
  • Intel macOS via Rosetta: new bcr-parity job builds e2e/bzlmod across all four BCR platforms; macos-13 is deprecated, so darwin/amd64 is emulated by running an x86_64 Bazel under Rosetta on the arm64 runner (repo-rule host arch = Bazel JVM arch).
  • pin-completeness job: deterministic, arch-independent guard that every pins map lists all four BCR platforms.

Verified locally

  • Root test //... green on 8.7.0 and 9.x (9.x: only //docs:defs_docs_test differs → excluded).
  • e2e/bzlmod build //... green on 8.7.0 and 9.x; package example green on 9.x.
  • pin-completeness script passes now and fails when a pin is removed.

Follow-up (separate, after this merges)

The fix lives inside the source archive, and v0.1.0 is immutable — so BCR #9543 needs either a v0.1.1 resubmit (recommended) or a .bcr/patches entry. Decide after this is green.

BCR's `macos` presubmit agent is Intel x86_64 (macos_arm64 is a separate
platform). The lazy `ocx.package` in the e2e test module and the package
example pinned darwin/arm64 but not darwin/amd64, so on an Intel mac
`pinned_ref` fell back to the bare tag and `_lazy_package` hard-failed at
fetch ("must be digest-pinned") — the macOS-only failure in
bazel-central-registry#9543 while Linux/Windows passed.

Add the darwin/amd64 manifest digest (build-only bakes it as text, so it is
GC-safe) to e2e/bzlmod jq_lazy and examples/package jq_pinned + jq_lazy.
Close the two CI gaps that let the BCR macOS failure through:

- Bazel version matrix (8.7.0 + 9.x required, rolling non-blocking) across
  the test, examples, and offline jobs via USE_BAZEL_VERSION. Docs-freshness
  (//docs) is excluded on Bazel != 8.7.0 because stardoc under Bazel 9 emits
  extra `repo_mapping` rows the pinned-Bazel golden doesn't carry.
- New bcr-parity job builds e2e/bzlmod across all four BCR platforms. macos-13
  (Intel) is deprecated, so darwin/amd64 is emulated on the arm64 runner by
  running an x86_64 Bazel under Rosetta — the repo-rule host arch is the Bazel
  JVM arch, so this reproduces BCR's Intel agent and the missing-pin failure.
- New pin-completeness job: a deterministic, arch-independent guard asserting
  every ocx.package pins map lists all four BCR platforms.
Bazel rejects a leading-dash target as an option; '-//docs/...' must follow
the '--' end-of-options marker. Fixes the Bazel 9.x/rolling Test legs.
@michael-herwig michael-herwig merged commit c6dbd78 into main Jul 3, 2026
33 checks passed
@michael-herwig michael-herwig deleted the fix/bcr-macos-and-bazel9 branch July 3, 2026 23:21
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