Fix Swift concurrency build error blocking v0.4.0 release + add pre-tag macOS CI - #27
Merged
Merged
Conversation
… build CI The v0.4.0 release build failed at the swiftc step on the macos-14 runner: DeviceSession's G1b self-heal closure captured a weak `self` and referenced it inside a @sendable Task — "reference to captured var 'self' in concurrently-executing code." A weak capture is modeled as a var (ARC can zero it across a concurrency boundary), so the newer runner toolchain rejects it as a hard error; the older local toolchain only warned, so it slipped past local builds and the tag. Fix: bind a strong, immutable `self` (guard-let) before the Task in onUnexpectedExit, and re-capture self immutably in onStatusLine's DispatchQueue.main.async closure. Root cause was zero pre-tag macOS build coverage (release.yml is tag-only, the Forgejo workflow is Linux/Go). Add build-check.yml: a pull_request job on macos-14 that runs the same `make dist-swiftc` release.yml runs (plus the Go build/tests), no secrets/signing — so compile-time toolchain skew surfaces on the PR, not on a tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
terraceonhigh
added a commit
that referenced
this pull request
Jun 21, 2026
…ing) Session handoff at usage limit. Records: G1–G4 passed, freshness bug fixed + verified, the v0.4.0 tag's CI failure (Swift toolchain skew) fixed via PR #27 (merged) + new pre-tag macOS build-check workflow. Sole remaining action is retagging v0.4.0 onto the fixed master HEAD; exact commands in the block. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
v0.4.0tag's release run failed at the swiftc step on themacos-14runner (run 27889275965):The G1b self-heal closure captures a weak
self(modeled as a var — ARC can zero it across a concurrency boundary) and references it inside a@SendableTask. The runner's newer Swift toolchain rejects this as a hard error; the older local toolchain only warned, so it slipped past local builds and the tag. Nothing shipped — the build died at compile, before notarization.Fix
onUnexpectedExit:guard let self else { return }before theTask, so the capture is immutable.onStatusLine: re-captureselfimmutably in theDispatchQueue.main.asynccapture list (same class of issue, a warning today / Swift-6 error).Durable fix for the root cause
release.ymlis tag-triggered, and the Forgejo workflow is Linux/Go only — so there was zero pre-tag macOS build coverage. Newbuild-check.yml: apull_requestjob onmacos-14running the samemake dist-swiftcthe release uses (plus Go build/tests), no secrets or signing. Compile-time toolchain skew now surfaces on the PR, not on a tag.After merge
Nothing was published, so: delete + recreate the
v0.4.0tag on the fixed commit (no-retracted, nov0.4.1).🤖 Generated with Claude Code