Skip to content

ci: bump to Xcode 26.3 and fix CalendarWatcher.stop race#4

Merged
Newarr merged 4 commits into
mainfrom
ci/bump-to-xcode-26
May 11, 2026
Merged

ci: bump to Xcode 26.3 and fix CalendarWatcher.stop race#4
Newarr merged 4 commits into
mainfrom
ci/bump-to-xcode-26

Conversation

@Newarr

@Newarr Newarr commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

CI on main has been red since PR #1. Two root causes; both fixed here.

1. Swift version skew

mlx-audio-swift declares // swift-tools-version:6.2 while CI selected Xcode_16.app (Swift 6.0):

error: package 'mlx-audio-swift' @ b8ec43083e... is using Swift tools
version 6.2.0 but the installed version is 6.0.0

The macos-15 runner already ships Xcode 26.3 at /Applications/Xcode_26.3.app. Switching xcode-select to it unblocks swift build (was failing before any tests ran).

2. CalendarWatcher.stop() race surfaced by slower CI hardware

After step (1), swift build passed but testStopCancelsPollLoop failed:

XCTAssertEqual failed: ("3") is not equal to ("4")
  stop() must halt the poll loop

Cause: the previous sync stop() returned before the in-flight refreshNow() had drained. Locally on Apple Silicon the refresh always finished inside the test's first sleep window, hiding the bug. On the slower macOS runner one extra callout slipped through after stop() returned.

Fix: make stop() async and await task?.value. All five call sites already prefix with await (actor isolation), so no signature changes ripple out.

Heads-up: Build app step still broken

The Build app step references TranscriberApp/TranscriberApp.xcodeproj with scheme TranscriberApp, but the real artifact is TranscriberApp/Scribe.xcodeproj with scheme Scribe. Pre-existing stale config; out of scope for this PR.

Test plan

  • CI on this PR is green for Build core and Test core
  • Local swift test --filter CalendarWatcherTests passes (verified)
  • (Known) Build app step still fails on the stale project name — separate PR

Szymon Sypniewicz added 2 commits May 11, 2026 18:57
The pinned mlx-audio-swift dependency declares
`// swift-tools-version:6.2`, which SwiftPM enforces on the consumer
side. The previous CI step selected Xcode 16 (Swift 6.0), so every
build since PR #1 has failed with:

  package 'mlx-audio-swift' is using Swift tools version 6.2.0 but
  the installed version is 6.0.0

The macos-15 runner image ships Xcode 26.3 at /Applications/Xcode_26.3.app
alongside the default Xcode 16.4. No runner change needed — just point
xcode-select at the newer toolchain.
CI on macos-15 surfaced testStopCancelsPollLoop as flaky: after
`await watcher.stop()`, the lookup callout occasionally fired one more
time before the poll task actually exited. Locally on faster hardware
the in-flight refreshNow() completed before the test reached its second
sleep so the bug stayed hidden.

The real cause is the previous sync `stop()` returning before the
already-resumed poll iteration finished. Refactoring `stop()` to be
async and `await task?.value` ensures any drained refresh completes
before stop returns, so the test's "no more polls after stop" invariant
holds across hardware. All five existing call sites already prefix
with `await` (actor isolation), so no caller signature changes.
@Newarr Newarr changed the title ci: select Xcode 26.3 to satisfy mlx-audio-swift Swift 6.2 requirement ci: bump to Xcode 26.3 and fix CalendarWatcher.stop race May 11, 2026
Szymon Sypniewicz added 2 commits May 11, 2026 19:20
The xcodebuild step still pointed at TranscriberApp/TranscriberApp.xcodeproj
and scheme `TranscriberApp`, neither of which exist — the app project is
`TranscriberApp/Scribe.xcodeproj` with scheme `Scribe`, per
`scripts/dev-install.sh`. The previous compile failure masked this; once
Build core and Test core started passing the Build app step exposed it.
After fixing the Swift 6.2 toolchain selection, swift build and swift
test passed on macos-15. The xcodebuild step then failed at
CompileAssetCatalogVariant: Xcode 26's `actool` invokes ibtoold, which
links AVFCore privately and dyld-fails on macOS 15 with missing
CoreMedia symbols (`_kFigCaptionRegionDisplayAlign_Before`,
`_kFigCaptionRegionDisplayAlign_After`). Xcode 26's tools need their
matching OS frameworks; macos-26 is the supported runner image for that
combination.
@Newarr Newarr merged commit f5303f8 into main May 11, 2026
1 check passed
@Newarr Newarr deleted the ci/bump-to-xcode-26 branch May 11, 2026 18:45
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