Skip to content

ci: run trusted fork builds once before merge - #3219

Merged
MarcusSorealheis merged 3 commits into
mainfrom
fix/premerge-cluster-ci
Nov 18, 2026
Merged

MarcusSorealheis merged 3 commits into
mainfrom
fix/premerge-cluster-ci

Conversation

@MarcusSorealheis

@MarcusSorealheis MarcusSorealheis commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What and why

Run trusted fork contributions through the retained Bazel and shared Nix build lanes before merge, without also running the full hosted PR Bazel suite. This closes the coverage gap exposed after #3210 while removing the duplicate Bazel invocation observed on #3219.

The protected-base policy lists the six maintainer-supplied account/fork pairs: amankrx, palfrey, corcillo, MarcusSorealheis, modernmedici, and matdexir. GitHub account and repository IDs were verified against the API. Automatic promotion requires matching PR author, fork owner/repository, and a listed triggering account; policy is never loaded from the fork.

The coordinator promotes the exact commit to an immutable upstream branch, dispatches only workflows without an existing run for that SHA, and publishes ci/trusted-builds. Existing failures require explicit retry. Internal PRs reuse push builds, with missing builds dispatched when a path-filtered push skipped the latest head. Nix automatic dispatch uses scope=branch to omit nightly Cargo and the three integration jobs. Initial reporter notifications are reduced from seven to three; unlisted forks retain local tests and manual promotion.

Both LRE toolchain jobs move from pull-request and push events to a daily 07:30 UTC schedule, with manual dispatch retained. A job-level event guard also skips mirrored PR/push runs. Main keeps write-capable cache credentials; manual runs on other refs use read-only credentials.

How was this verified?

  • CI-script suite: 112 tests, 103 passed and 9 unrelated BEP protocol tests skipped because optional protobuf/gRPC dependencies are not installed locally. Coverage includes all six identities, wrong/recreated/transferred forks, unlisted actors, stale revisions, denied promotion, duplicate-dispatch avoidance, branch-only Nix dispatch, exact-commit reporting, skipped jobs, API errors, and the path-filtered internal-PR case.
  • All 10 Nix package-sharing tests passed.
  • Actionlint 1.7.7, pinned Prettier write/check, typos, Vale, Python compilation, and whitespace checks passed.
  • The original reporter was checked read-only against real runs: both failing main builds reported failure, the previous successful builds reported success, and fix: log worker startup scheduler misses as warnings #3210's local-only PR head remained pending.
  • The LRE workflow passed Actionlint 1.7.7, pinned Prettier write/check, typos, and whitespace checks after the schedule change. The 112-test CI-script suite was rerun: 103 passed and the same 9 optional-dependency tests skipped. Scheduled execution still needs verification after merge.
  • Live privileged dispatch/status publication needs verification after this workflow lands on the default branch. No contributor commits were promoted during local validation.

Risk

Listing an account authorizes its qualifying future commits to run with trusted CI credentials and the retained client. The coordinator executes only base/default-branch code, but needs contents/actions/status write permissions to create branches, dispatch workflows, and publish results. If GitHub rejects promotion of changed workflow files because additional permissions are needed, the documented manual promotion path remains available.

After merge, require ci/trusted-builds on main while retaining existing checks and the up-to-date requirement. The status remains advisory until that repository setting is applied. Fork branches must incorporate the new routing and Nix dispatch input from main. Primary Bazel/Nix builds on main and ordinary fork-workflow approval settings are unchanged. LRE-specific regressions will be detected by nightly or manual runs rather than every PR/push. This does not repair the underlying remote-execution or Buildkite failures.

AI assistance

Codex drafted and validated the workflows, policy, reporter, tests, and documentation at the maintainer's request. The maintainer supplied the trusted accounts and fork URLs.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Nov 18, 2026 2:52am UTC
nativelink-aidm Ready Ready Preview Nov 18, 2026 2:52am UTC

Request Review

@MarcusSorealheis MarcusSorealheis changed the title ci: report trusted branch builds on pull requests ci: run trusted fork builds once before merge Nov 18, 2026
@MarcusSorealheis
MarcusSorealheis merged commit e658f7d into main Nov 18, 2026
40 checks passed
@MarcusSorealheis
MarcusSorealheis deleted the fix/premerge-cluster-ci branch November 18, 2026 16:20

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – nativelink — 5667a4f2 Deployed Nov 18, 2026 by vercel[bot]
Preview – nativelink-aidm — 5667a4f2 Deployed Nov 18, 2026 by vercel[bot]
cluster-ci-benchmark — 5667a4f2 Deployed Nov 18, 2026 by MarcusSorealheis via NativeLink / Linux #812
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