Skip to content

chore(ci): add upstream rust and bazel compat lanes - #3712

Merged
ScriptedAlchemy merged 1 commit into
ScriptedAlchemy:masterfrom
ultramodernjs:chore/upstream-compat-lanes
Oct 12, 2026
Merged

ScriptedAlchemy merged 1 commit into
ScriptedAlchemy:masterfrom
ultramodernjs:chore/upstream-compat-lanes

Conversation

@BleedingDev

@BleedingDev BleedingDev commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Why the change

Adds two non-production upstream-compatibility probe lanes — a Bazel 10 flipped-incompatible-flag build on the pinned 9.3.0 and a weekly Rust nightly toolchain probe — so the next stable releases stop being hidden surprises.

Special things to note

  • Probe-only lanes: the pinned stable toolchain (1.99.0) and Bazel 9.3.0 stay the authority surface; no nightly adoption and no .bazelversion bump in this PR.
  • PR smoke runs are informational (continue-on-error); scheduled and workflow-dispatch runs fail for real when upstream moves.
  • The nightly probe re-pins MODULE.bazel (rust.toolchain(versions) and rustfmt_version) to a dated nightly snapshot inside the lane only and never commits that change.

Change outline

 .github/workflows/
+  upstream-compat.yml   # weekly cron + workflow_dispatch + PR smoke trigger
upstream-compat (cron Mon 04:00 UTC + dispatch + PR paths-lane)
├─ bazel-10-readiness
│    pinned Bazel 9.3.0 with 10.0 flipped incompatible flags
│      --experimental_fetch_all_coverage_outputs
│      --experimental_split_coverage_postprocessing
│      --incompatible_check_testonly_for_output_files
│      --incompatible_exclude_starlark_flags_from_exec_config
│      --incompatible_no_implicit_file_export
│      --rewind_lost_inputs
│    → bazel build --config=ci //crates/...
└─ nightly-rust-probe
     MODULE.bazel: "1.99.0" → "nightly/<dated snapshot>" (lane-only sed)
       versions + rustfmt_version → nightly/yyyy-mm-dd
     → bazel build --config=ci //crates/... --keep_going

Summary

  • Adds .github/workflows/upstream-compat.yml with the two probe lanes above.
  • Weekly scheduled run plus workflow_dispatch (with an optional nightly-date input) so upstream breakage is caught early, before it lands in stable.

Motivation

Rust 1.99.0 / Bazel 9.3.0 / rules_rust 0.74.0 are all current as of the probe design, but Bazel 10 already names its next incompatible-flag flips and the next Rust stable follows days later. This lane converts "we find out at release time" into "we find out weekly", without sending any production lane to nightly or 10.0.

Changes

  • .github/workflows/upstream-compat.yml (new): two informational compatibility lanes. Each runs on ubuntu-latest with the shared .github/actions/setup-bazel composite action and its own disk-cache key, keeps the pinned toolchain as authority, and is non-blocking on PR smoke runs.

Test plan

  • The affected Bazel targets pass
  • bazel build //... passes when the change crosses package boundaries
  • Tested manually (lane file runs on this PR via its pull_request paths trigger; the PR lanes are the smoke run)

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump)
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any)

Devin Review

@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b8f6cd2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 4 potential issues.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +22 to +23
group: upstream-compat-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'upstream' }}
cancel-in-progress: true

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.

🟡 Manual probe cancels weekly master probe

When a manual run starts during the weekly probe, cancel-in-progress cancels the scheduled run. Both runs share the upstream group, even across branches, so the weekly master result is lost.

Learn more

Scheduled runs check master, while workflow dispatch can run on another branch. Both events resolve the group suffix to upstream, and the workflow cancels any in-progress run in that group. A manual probe can therefore replace an unfinished scheduled master probe with a result from a different revision.

Example: The Monday master probe starts at 04:00. A maintainer dispatches the workflow on a feature branch at 04:15. GitHub cancels the master probe; only the feature-branch result remains.

Recommended fix: Give scheduled master runs and manual dispatches separate concurrency groups, with a ref- or input-specific group for dispatches. Preserve the PR-number group for superseded PR smoke runs.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +40 to +47
bazel build --config=ci \
--experimental_fetch_all_coverage_outputs \
--experimental_split_coverage_postprocessing \
--incompatible_check_testonly_for_output_files \
--incompatible_exclude_starlark_flags_from_exec_config \
--incompatible_no_implicit_file_export \
--rewind_lost_inputs \
//crates/...

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.

🟡 Coverage flips escape Bazel readiness probe

When Bazel's coverage defaults break coverage, bazel build still passes this probe. The two coverage flags do not exercise coverage collection or postprocessing without a coverage run.

Learn more

The readiness lane passes two coverage-related flags to a build. Bazel builds targets without collecting coverage, so it never invokes the coverage output collection or postprocessing those flags change. A successful build therefore does not establish compatibility with those Bazel defaults.

Example: A coverage postprocessor fails with the split-postprocessing default. The weekly bazel build succeeds because it never runs a coverage postprocessor, leaving that break undetected.

Recommended fix: Add a bazel coverage probe over a representative test target with these flags, or remove the coverage flags from the claimed readiness coverage until a coverage run exists.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +4 to +6
pull_request:
paths:
- .github/workflows/upstream-compat.yml

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.

🟡 Closed PR keeps compatibility builds running

Closing a PR during its smoke run does not cancel upstream-compat jobs. PR cleanup targets only CI runs, leaving these builds occupying runners until completion or timeout.

Learn more

The PR smoke trigger starts two jobs that each allow up to four hours. The existing PR cleanup searches only ci.yml runs when a PR closes. No close event enters this workflow's PR-number concurrency group, so these compatibility jobs continue to use shared hosted-runner capacity after closure.

Example: A PR is closed ten minutes into a cold nightly build. CI's cleanup cancels its own runs, but the nightly and Bazel readiness jobs keep running until they finish or hit their timeouts.

Recommended fix: Extend the closed-PR cleanup to cancel this workflow's runs too, using the same PR ownership and start-time checks, or add a trustworthy close-triggered cancellation path.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +74 to +75
sed -i "s|versions = \[\"1\.99\.0\"\]|versions = [\"nightly/$NIGHTLY_DATE\"]|" MODULE.bazel
sed -i "s|rustfmt_version = \"1\.99\.0\"|rustfmt_version = \"nightly/$NIGHTLY_DATE\"|" MODULE.bazel

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.

🟥 Nightly date executes runner commands

A dispatched nightly-date containing $(...) executes commands when sed expands $NIGHTLY_DATE inside double quotes. The command runs in the workflow's runner context before the Bazel probe.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@ScriptedAlchemy
ScriptedAlchemy merged commit cb7ce0c into ScriptedAlchemy:master Oct 12, 2026
2 checks passed
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.

2 participants