Skip to content

ci: guard master's prod plain-build default (and dev's dev default) - #1741

Merged
davidtai merged 2 commits into
devfrom
ci/master-prod-default-guard
Nov 3, 2026
Merged

davidtai merged 2 commits into
devfrom
ci/master-prod-default-guard

Conversation

@davidtai

@davidtai davidtai commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Goal

David, 2026-11-03: master must not default to DevNet. Commit 52079c0 on dev ("Keep the dev default for plain builds when this lands in dev") must never reach master. It sets the plain-build default in provider-swift/Package.swift to dev. Master's history already has the older dev-only commit 431a93d, so this guard checks the file content, not ancestry.

Change

  • scripts/provider-build-default.py reads the ?? "<default>" fallback of DARKBLOOM_RELEASE_ENVIRONMENT in Package.swift and checks it for a target branch: master needs prod, dev needs dev, and other branches are not checked. If it does not find exactly one default line, it fails. A refactor of Package.swift cannot turn it off.
  • scripts/test-provider-build-default.py holds the unit tests. They also pin the two workflow steps below.
  • .github/workflows/ci.yml, Release Integrity (no if:, so it runs on every PR and push): the target is github.base_ref || github.ref_name, which is the PR base or the pushed branch.
  • .github/workflows/release-provider.yml, job resolve-env: every run except a dev push builds master's source (a tag, a master push, or a dispatch). Those runs check --branch master after the source checkout and before resolve-provider-release.sh. Every build, qualification, signing and publish job needs resolve-env. The release sets DARKBLOOM_RELEASE_ENVIRONMENT explicitly, and the check still runs.
  • release-swift.yml and release-dev-branch.yml: the script is added to both push path lists. Existing tests require every release script to be in those lists and the two lists to stay equal. The dev lane itself does not run the check.
  • Docs: docs/developer/build.md ("The dev branch") and docs/operations/provider-release.md.

Before

flowchart LR
  A[PR into master with Package.swift default dev] --> B[CI green]
  B --> C[master plain build = DevNet]
  C --> D[tag / master push release proceeds]
Loading

After

flowchart LR
  A[PR into master or push to master] --> RI[Release Integrity: provider-build-default.py --branch master]
  RI -- default prod --> OK[green]
  RI -- default dev or missing --> F[red]
  P[PR into dev or push to dev] --> RD[Release Integrity: --branch dev] -- default not dev --> F
  R[release-provider.yml run, not a dev push] --> G[resolve-env: --branch master] -- default not prod --> S[stop before build and signing]
Loading

Evidence

Throwaway draft PR #1740 "DO NOT MERGE: guard proof" was based on master. It carried this guard and then a last commit that changed only Package.swift (?? "prod" -> ?? "dev"). It is now closed and its branch is deleted.

Head Master default CI run Release Integrity job Result
ef396ae (guard only) prod 41656212103 125987429158 pass: target 'master': plain-build default is 'prod', 8 tests OK
820a36b (+ default set to dev) dev 41657427548 125992260510 fail: provider-build-default: target 'master' requires the plain-build default 'prod', but Package.swift defaults to 'dev'

On this PR (base dev), Release Integrity checks --branch dev against dev's dev default (see the checks below).

Refactor Pass

An independent subagent got the diff and the goal. It returned PASS on correctness, with these findings:

  • Fixed in 9c89ce9: the release check keyed on the lane (inputs.environment != 'dev'). The dispatched dev validation build also builds master's source, so the check now keys on the source (github.ref != 'refs/heads/dev').
  • Fixed: the wording in build.md.
  • Not in this diff: master has no required status checks, so a red Release Integrity shows on a PR into master but does not block the merge. The release guard still stops staging and prod. Making "Release Integrity" a required check on master is a ruleset decision for David. This PR changes no ruleset.

Limits

  • No local runs. The unit tests run in Release Integrity on this PR.
  • A PR retargeted to master keeps its earlier run until its next push (the pull_request default types leave out edited).

🤖 Generated with Claude Code

davidtai and others added 2 commits November 3, 2026 08:40
provider-swift/Package.swift falls back to an environment when
DARKBLOOM_RELEASE_ENVIRONMENT is unset. master must fall back to prod and
dev to dev. scripts/provider-build-default.py reads that fallback and checks
it for a target branch; it fails when it cannot find the fallback, so a
change to Package.swift cannot turn the check off.

- ci.yml, Release Integrity: checks the pull request's base branch, or the
  pushed branch (master -> prod, dev -> dev, others unchecked).
- release-provider.yml, resolve-env: a staging or prod lane (master)
  stops before the build and signing unless the default is prod.
- release-swift.yml and release-dev-branch.yml: the new script joins the
  push path lists, which test-provider-release-pipeline.py and
  test-release-dev-branch.py require to cover every release script and to
  stay equal. The dev lane does not run the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dispatched dev validation build also builds master's source. Skip the
check only for a dev push. Tighten the build.md wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference Error Error Nov 3, 2026 2:45pm UTC
d-inference-console-ui-dev Error Error Nov 3, 2026 2:45pm UTC
d-inference-landing Ready Ready Preview Nov 3, 2026 2:45pm UTC
darkbloom-status Ready Ready Preview Nov 3, 2026 2:45pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 3, 2026 2:45pm UTC

Request Review

@davidtai
davidtai merged commit 613aa47 into dev Nov 3, 2026
30 of 32 checks passed
@davidtai
davidtai deleted the ci/master-prod-default-guard branch November 3, 2026 15:08
davidtai added a commit that referenced this pull request Nov 3, 2026
Keeps dev's cluster suite jobs (#1737) and the build-default guard (#1741).
The #1737 jobs (Cluster Runtime Tests, Cluster GPU Tests, Cluster Focused
Checks) move to blacksmith-12vcpu-macos-27 like the other macOS jobs: their
route fallback was already that label, so no job needs another runner. The
per-shard route lanes from #1691 go away with the route's macOS lanes.
cache-swift stays removed. The provider shards stay at eight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference-landing — 9c89ce96 Deployed Nov 3, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 9c89ce96 Deployed Nov 3, 2026 by vercel[bot]
Preview – darkbloom-status — 9c89ce96 Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 9c89ce96 Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference — 9c89ce96 Deployed Nov 3, 2026 by vercel[bot]
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