Repository navigation
Strict concurrency: MenubucketApp from 331 diagnostics to 1, enforced in CI - #299
Merged
Merged
Conversation
…the main actor Both were main-thread-only by comment; the annotation makes the compiler check it. The download progress callback is now @sendable, which is what it always had to be: the download runs off the main actor. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every entry point already ran on the main queue. The animation timers say why their callbacks are on the main thread, and the appearance observation hands its callback only the look's name instead of reading the button from a Sendable closure. Tests and the landing-media cluster that call its drawing helpers are main-actor too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the main actor WidgetInstallURLPrompt, MenuBarStyleControls, PopupSurface/PopoverSurface, PagerState and AccessibilityHelper only ever ran on the main thread; they now say so. EventMonitor and NotificationObservation own an event monitor or a block observer and remove it when released, so a main-actor owner no longer has to reach a non-Sendable token from its deinit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Scheduler, DirectoryWatcher and PointerWatcher ran on the main queue by convention. Now the compiler checks it: - timers, observers, the App Nap activity, the event tap and the FSEvents stream are held by small objects that undo them when released, so no main-actor deinit reaches non-Sendable state; - DirectoryWatcher's FSEvents box is Sendable (`weak let`) and only carries the callback from the FSEvents queue to the main queue; - StatusItemController and MenuBarClusterController hold their monitors and Carbon references the same way. The same teardown happens at the same moment; owners that used to cancel a watcher in their deinit now rely on the watcher's own. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ThumbnailService and RemoteImageService always deliver on the main queue; their completion type now says so (@mainactor @sendable), and the Quick Look generator callback, which arrives on another thread, is @sendable. WidgetImageLoader, which receives them, is main-actor. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…in-actor SharedShelfPublisher was main-thread only by comment. Its thumbnail export stays off the main actor (nonisolated), as before. The vault broker's prompt hooks are main-actor function types, matching the prompts they default to. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he main actor AppPrefs, WidgetPrefs, MenuBarVisibility and HotkeyRegistrationCoordinator are observable stores read and written by the UI. DockView's drop helper collects file URLs behind an OSAllocatedUnfairLock instead of an NSLock around a captured var, and its pure constants and `==` are nonisolated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- DockMenuRouter, SearchField.Coordinator and CardFreshness are main-actor; DockPanelController's mouse monitors remove themselves (EventMonitor) and its slide-out completion is a main-actor callback. - CardDrag hands the dragged id to a main-actor callback. - Gallery pack text closures are @sendable; UndoAnchor is Sendable (it has no state); the action environment's default is made on request. - PermissionWaitingBanner.message is nonisolated (a pure string). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every stored property already was; the conformance lets the app's snapshot disk cache hand a snapshot to its write queue under strict concurrency checking. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Covers the by-name observation that replaced the key-path one: it reports light and dark as a view's appearance changes, and stops once released. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main-actor AppPrefs makes `appPrefs: AppPrefs = .shared` a warning in the normal build wherever it is a default argument, and one of those is WidgetRuntime.init, which is being rewritten elsewhere. Its one strict diagnostic (the shared instance) stays until that default can change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…in actor DockStore, DockHotkeys, DockHotkeyStatus, RunningApps, DockActions, its file presentation cache and FolderMenuTarget are all used from the main thread; BarShelfDock now has no strict-concurrency diagnostics. - DockHotkeys holds its Carbon registrations, its handler and its Automation observer in objects that undo them when released, so it needs no deinit. The status shown in settings is no longer reset when a DockHotkeys goes away (the app keeps one for as long as it runs). - RunningApps reads the launched app's path before entering the main-actor block of its workspace observer. - The file-drop helper's completion is a main-actor callback, so the dock's drop handlers no longer carry the store across threads. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AppPrefs is an observable store the UI reads and writes. The places that took `AppPrefs = .shared` as a default argument (WidgetRuntime.init, UpdateChecker.check/skipVersion, AppSettingsWindowController.show) take nil and resolve it inside: a default argument is evaluated outside the main actor. WorkflowWatch is main-actor like DirectoryWatcher, which conforms to it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… diagnostic The cancellation handler invalidates the LAContext the prompt runs on, and LAContext is not Sendable. Comment only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new step builds the app target with -strict-concurrency=complete and fails on any diagnostic located in Sources/MenubucketApp, except the one documented in VaultResume (allowed by file and wording). It counts instead of using -warnings-as-errors because that flag would also stop on BarShelfAutomation, a dependency that is not clean yet. It runs after the report-only step so that step still compiles, and counts, its own targets. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
jiunbae
enabled auto-merge
November 16, 2026 10:07
Swift 6.3 reports the captured LAContext and its import where 6.4 reports the sent closure. Same single case; everything else stays enforced. Co-Authored-By: Claude Fable 5.2 <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.
Takes
MenubucketAppfrom 331 strict-concurrency diagnostics to 1 and enforces that in CI.WidgetInstaller,MenuBarController,Scheduler, the watchers, popup/pager/panels,SharedShelfPublisher,WidgetPrefs,AppPrefs, and inBarShelfDockthe store, hotkeys and actions (that target is now at 0 locally).@MainActor @Sendablecompletions for images, vault prompts, drops).deinitmoved into small owners that undo themselves when released (ScopedObservation.swift: event monitors, notification observers, timers).MainActor.assumeIsolatedonly where delivery on the main thread is guaranteed (main-run-loop timers,queue: .mainobservers, the main-run-loop event tap, AppKit animation completions), each with a comment.@unchecked Sendable,nonisolated(unsafe),@preconcurrencyorTask.detached; one existing@unchecked Sendableremoved. No real data race was found.The one diagnostic left is
VaultResume.swift: the Touch ID prompt'sonCancelshares anLAContextwithevaluatePolicy; fixing it needs@unchecked Sendableor a slower cancel. It is documented in place and is the only one CI allows.CI: new step "MenubucketApp (own files, enforced)" fails on any strict diagnostic in
Sources/MenubucketApp/beyond that one. It counts rather than using-warnings-as-errors, which would stop inBarShelfAutomation(23 remaining, untouched here).Behavior nuances: the Esc monitor of a released popover is now removed;
DockHotkeysno longer clears the shared status sets when released (the app keeps one instance for its lifetime). Full suite: Core 941 / App 1007 / CLI 86, 0 failures.🤖 Generated with Claude Code