Skip to content

Provider toolchain: build and release with Xcode 27.2 (SDK 27.2, Swift 6.4.2); CI also accepts SDK 27.0 for now - #1791

Merged
Gajesh2007 merged 3 commits into
masterfrom
ci/xcode-27-2-toolchain
Nov 5, 2026
Merged

Gajesh2007 merged 3 commits into
masterfrom
ci/xcode-27-2-toolchain

Conversation

@davidtai

@davidtai davidtai commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Refs Layr-Labs/darkbloom-sandbox#245. Follow-up: #1790 (remove SDK 27.0).

What changed

  • scripts/prepare-provider-release-toolchain.sh has two modes, set by DARKBLOOM_PROVIDER_TOOLCHAIN:

    Mode Used by SDK (SDKSettings.json Version) Apple Swift
    release release-provider.yml (build, qualify shards, sign), provider-signing-validation.yml, master and dispatched SDK 27 release preparation 27.2 6.4.2 (or 6.4.2.x)
    qualification (default) ci.yml, pull-request SDK 27 release preparation, Darkbloom Sandbox's macOS CI base check 27.2 or 27.0 6.4 or 6.4.x
  • The step tries the image's Xcode first, then each installed /Applications/Xcode*.app, newest first. It takes the first Xcode with SDK 27.2, else the first with another accepted SDK. An explicit DEVELOPER_DIR is the only candidate. When it selects another Xcode than the image's, it writes DEVELOPER_DIR to GITHUB_ENV. Metal, xcodebuild, the cache identity and signing then use the same Xcode. When no Xcode qualifies, it names the installed ones.

  • PROVIDER_SDK_VERSION is the SDK that the step selected. Before, it was always 27.0. The older-macOS smoke and the release resume (scripts/provider_release_resume/identity.py) now expect 27.2.

  • provider-signing-validation.yml uses the same step and swift wrapper, not its own xcrun check for SDK 27.0.

  • The swift wrapper link points at the script's own directory, so a checkout under tooling/ works.

  • mise.toml pins Swift 6.4.2. docs/developer/build.md, docs/developer/test.md, docs/operations/provider-release.md and a changelog fragment describe the modes.

Why

The Darkbloom Sandbox production macOS CI base moved to Xcode 27.2 (27B52). Xcode 27.2 has no SDK 27.0, so every d-inference macOS job failed in its first step. David ruled (2026-11-04) that d-inference builds and qualifies with Xcode 27.2.

David 2026-11-04: release mode accepts the Xcode 27.2 beta until GA. On Blacksmith, blacksmith-12vcpu-macos-27 has the Xcode 27.2 beta (27B5038j): SDK 27.2 and Apple Swift 6.4.2 (swiftlang-6.4.2.1.4), from the log of PR run 41908511951. The release check accepts these versions. No GA-only rule is added.

SDK 27.0 stays accepted in qualification only. Production goes back to the Xcode 27.1 base until this change merges, and Xcode 27.1 ships SDK 27.0. Issue #1790 removes SDK 27.0 when the base is on Xcode 27.2 again.

Exact versions and source

Xcode SDK Version Apple Swift Source
27.2 (27B52) 27.2 (macosx27.2) 6.4.2 (swiftlang-6.4.2.1.9, clang-2100.4.1.1), swift-driver 1.168.6 SDKSettings.json and the toolchain of an installed Xcode 27.2 (27B52), the build of the sandbox base. The CI log of master run 41786901765 shows Xcode 27.2 / 27B52 on the sandbox, and its Swift passed the old 6.4 check.
27.2 beta (27B5038j) 27.2 6.4.2 (swiftlang-6.4.2.1.4, clang-2100.4.1.1) Blacksmith blacksmith-12vcpu-macos-27, log of PR run 41908511951. Accepted in release mode (David 2026-11-04).
27.1 (27A9275) 27.0 6.4 (swiftlang-6.4.0.34.1) darkbloom-sandbox docs/design/macos-guest-image.md
27.0 (27A266a) 27.0 6.4 (swiftlang-6.4.0.34.1) Blacksmith blacksmith-12vcpu-macos-27 default, log of run 41875576612

Not changed, and why

  • blacksmith-12vcpu-macos-26 in validate-older-macos: that job runs the signed app on an older macOS and compiles nothing. Its check 14 <= major < 27 is its purpose. Its expected build_sdk_version is now 27.2.
  • swift-tools-version: 6.1 in the package manifests: Swift 6.4.2 builds them, and no newer manifest feature is needed.
  • No workflow on master selects Xcode 26.4, 26.6 or 27.0 by path. The only Xcode 26.4 mention is a historical comment in provider-swift/Package.swift.
  • Historical records (CHANGELOG.md, docs/reports, receipts) and test fixtures that use synthetic Xcode 27.0 identities.

Before

flowchart LR
  A[CI or release job] --> B[prepare-provider-release-toolchain.sh]
  B --> C{image Xcode SDK == 27.0<br/>and Swift 6.4.x?}
  C -- yes --> D[PROVIDER_SDK_VERSION=27.0<br/>swift wrapper on PATH]
  C -- no: Xcode 27.2 base --> E[fail in 4 s]
  F[provider-signing-validation.yml] --> G{xcrun SDK == 27.0?}
Loading

After

flowchart LR
  A[CI or release job] --> M{DARKBLOOM_PROVIDER_TOOLCHAIN}
  M -- release --> R[SDK 27.2 / Swift 6.4.2]
  M -- qualification default --> Q[SDK 27.2 or 27.0 / Swift 6.4.x]
  R --> S[image Xcode, then installed Xcodes, newest first]
  Q --> S
  S --> P{first with SDK 27.2?}
  P -- yes --> D[selected Xcode]
  P -- no --> F2{first with another accepted SDK?}
  F2 -- yes --> D
  F2 -- no --> E[fail, name installed Xcodes]
  D --> W[DEVELOPER_DIR if not the image's,<br/>PROVIDER_SDK_VERSION = selected SDK,<br/>swift wrapper on PATH]
  V[provider-signing-validation.yml] --> A
Loading

How it was tested

  • No local builds or tests (repository and lane rule). CI is the test.
  • scripts/test-provider-release-toolchain.py: both modes, SDK 27.0, 27.0.0, 27.2 and 27.2.0, refusal of SDK 26.5, 27.1, 27.3, empty and unparsable settings, Swift 6.3, 6.40, 6.4.20, no version line and a failing compiler, the unknown mode, the CLT SDK choice, and Xcode selection with stub xcrun, xcode-select and xcodebuild (prefers an installed 27.2, keeps the image's 27.1, skips a 27.3 beta, explicit DEVELOPER_DIR, release refusal that names the installed Xcodes).
  • PR CI: the macOS lanes run on the Darkbloom Sandbox base (Xcode 27.2) while it is in production, or on Blacksmith.
  • On this PR, the SDK 27 release preparation lanes select Xcode 27.2 beta (27B5038j) on blacksmith-12vcpu-macos-27 in qualification mode. The warm job runs only for pull requests and master, so a dispatch on this branch skips it (run 41908524996). The release mode runs first in CI on the master push warm, or in release-provider.yml. Before that, only the unit tests exercise it.

Hooked up

  • prepare-provider-release-toolchain.sh is called from .github/actions/provider-ci-build, .github/actions/provider-release-build, ci.yml (cluster metadata and focused checks), release-provider.yml (signing), provider-signing-validation.yml (build and signing) and Darkbloom Sandbox's images/macos/guest/qualify-dinference.sh.
  • DARKBLOOM_PROVIDER_TOOLCHAIN=release is set in the release-provider.yml workflow env, the two provider-signing-validation.yml toolchain steps and the non-pull-request provider-release-cache.yml warms.

Refactor pass

Done by a dedicated refactor subagent (commit b69a5bf). The changes do not change behavior:

  • One path selects an explicit toolchain root or an image CLT. Before, two branches did the same steps.
  • The Xcode candidate search is the select_xcode function. Its order, preference and fallback did not change.
  • The script reads the Applications folder variable one time.
  • The script, docs/developer/build.md and the changelog fragment do not name an issue number (AGENTS.md: no ticket names in files). They still state when SDK 27.0 is removed.
  • The toolchain tests use one GITHUB_ENV reader.

These items did not change: the accepted SDK and Swift versions, the release and qualification modes, PROVIDER_SDK_VERSION and the other GITHUB_ENV lines, and the messages that the tests check. The head moved from 5c7c109 to b69a5bf. The pins.env comment in darkbloom-sandbox #259 names 5c7c109; update it to the new head.

Locks

No locks are added or removed: this PR changes shell, Python, workflow and docs files only.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…t 6.4.2)

The Darkbloom Sandbox macOS CI base moved to Xcode 27.2 (27B52), which has
no SDK 27.0. prepare-provider-release-toolchain.sh accepted only SDK 27.0,
so every provider CI job failed in its first step.

- DARKBLOOM_PROVIDER_TOOLCHAIN=release (release-provider.yml,
  provider-signing-validation.yml, master and dispatched release
  preparation) accepts SDK 27.2 and Apple Swift 6.4.2 only.
- The default, qualification (ci.yml, pull-request release preparation,
  the sandbox base check), accepts SDK 27.2 or 27.0 and Swift 6.4.x.
  SDK 27.0 stays while production runs the Xcode 27.1 base (issue 1790).
- The step tries the image's Xcode, then each installed Xcode, newest
  first, and takes the first with SDK 27.2. It exports DEVELOPER_DIR when
  it selects another Xcode, so Metal, xcodebuild and signing match.
- PROVIDER_SDK_VERSION is the selected SDK. The older-macOS smoke and the
  release resume expect 27.2.
- The signing validation workflow uses the same step and wrapper.
- mise pins Swift 6.4.2. Docs and a changelog fragment follow.

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

vercel Bot commented Nov 4, 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 5, 2026 1:32am UTC
d-inference-console-ui-dev Error Error Nov 5, 2026 1:32am UTC
d-inference-landing Ready Ready Preview Nov 5, 2026 1:32am UTC
darkbloom-status Ready Ready Preview Nov 5, 2026 1:32am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 5, 2026 1:32am UTC

Request Review

@davidtai

davidtai commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Open question before merge: release lanes would build with a beta Xcode 27.2.

The PR CI shows two different Xcode 27.2 builds:

Runner Xcode Apple Swift
Darkbloom Sandbox (provider shards) 27.2 (27B52, GA) 6.4.2 (swiftlang-6.4.2.1.9 clang-2100.4.1.1)
blacksmith-12vcpu-macos-27 (SDK 27 release and qualification) 27.2 (27B5038j, a beta build) 6.4.2 (swiftlang-6.4.2.1.4 clang-2100.4.1.1)

The Blacksmith image's default Xcode is 27.0 (27A266a). Its installed Xcode 27.2 is a beta. The release mode checks the SDK version and the Swift version only, so on Blacksmith it selects the beta. After this PR merges, release-provider.yml would build, qualify and sign the shipped provider with Xcode 27.2 beta 27B5038j. Before this PR, it used Xcode 27.0 GA.

Options:

  • A. Accept the beta for releases.
  • B. Make release refuse a prerelease Xcode build. Releases then fail until Blacksmith ships Xcode 27.2 GA.
  • C. Make release accept only GA Xcode builds: SDK 27.2 when a GA Xcode 27.2 is installed, else SDK 27.0 (Xcode 27.0 GA). CI qualification still runs on Xcode 27.2. Releases move to 27.2 when Blacksmith ships it.

Recommended default: C. It keeps releases on a GA compiler and moves to 27.2 by itself. This PR stays a draft until David rules.

Behavior-preserving cleanup of the 27.2 toolchain step:
- One path for an explicit toolchain root and an image CLT; the Xcode
  candidate search is the select_xcode function.
- The Applications folder is read once.
- No ticket number in the script, build docs or changelog fragment; the
  removal condition for SDK 27.0 stays stated.
- The toolchain tests share one GITHUB_ENV reader.

Accepted SDK and Swift versions, modes, outputs and messages are unchanged.

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

davidtai commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Ruling (David, 2026-11-04) on the beta Xcode question: release mode accepts the installed Xcode 27.2 beta (27B5038j) on Blacksmith until Xcode 27.2 GA is available. No code change follows from it.

🤖 Generated with Claude Code

@davidtai
davidtai marked this pull request as ready for review November 5, 2026 00:15
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head 4212ffa6ac90 against base d087d7d81890.

Reviewers: anthropic/claude-sonnet-5.5: first pass completed; anthropic/claude-opus-5.5: selected depth completed (1 batches); openai/gpt-6.1-sol: selected depth completed (5 batches)

No actionable findings in the reviewed text. This is not a security approval.

Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging.

Scan completed; human review required.
Cross-file reviewer requests further review; independent human review required; Final reviewer requests further review; independent human review required

Coverage: 67/67 source units; cross-file integration complete. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned.

Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens.

Saved findings and earlier report · Historical findings are not confirmed resolved.

Bedrock: 25 request(s), 926132 uncached + 0 cache-read + 174710 cache-write input / 18118 output tokens; 0 request(s) with unknown usage. OpenRouter backup used 0 time(s). Dollar amounts above cover OpenRouter only; AWS billing is reconciled separately.
Workload allowance: 26 native request(s), including one shared response repair; 500 emergency ceiling. Selected depth and integration rounds are admitted as their scope becomes known.

This branch had an error being deployed

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

3 participants