Skip to content

fix(desktop): dodge the Xcode 16.4 SILGen segfault on alertPresenter (#12275) - #12279

Closed
kodjima33 wants to merge 3 commits into
mainfrom
watchdog/issue-12275-alertpresenter-silgen-crash
Closed

fix(desktop): dodge the Xcode 16.4 SILGen segfault on alertPresenter (#12275)#12279
kodjima33 wants to merge 3 commits into
mainfrom
watchdog/issue-12275-alertpresenter-silgen-crash

Conversation

@kodjima33

@kodjima33 kodjima33 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Bug

main's Desktop Swift CI has been failing on every commit that touches desktop/** since d49f978512 landed. AppState.alertPresenter's any DesktopAlertPresenting stored-property default-value initializer crashes swift-frontend SILGen (signal 11) on the CI-pinned Xcode 16.4 / Swift 6.1.2 toolchain. The crash is masked on main's status badge only because the required-check gate treats a path-filtered skipped job as satisfying the check — see #12275 for the full trace across four main pushes.

Root cause

var alertPresenter: any DesktopAlertPresenting = AppKitSheetAlertPresenter()

Emitting the any DesktopAlertPresenting existential erasure through the stored-property default-value generator crashes SILGen on this toolchain (confirmed via the CI job log linked in #12275, and reproduced locally: xcrun swift build -c debug --package-path Desktop on main HEAD before this fix fails the same way).

Fix

Move the same default value to the same lifecycle point — AppState.init() — instead of the stored-property default. No behavior change; AppState has exactly one initializer, and alertPresenter is assigned before anything else runs in it. This is the same workaround #12275 says is already carried on three unrelated branches.

Fixing that unmasked a second, pre-existing bug in AppState+Transcription.swift:848: alertPresenter.pauseQueueUntilAppActive() referenced the property without explicit self inside an escaping closure, which is invalid under this package's -strict-concurrency=complete -warnings-as-errors settings. It was never reached by the compiler because the SILGen crash aborted first. Added the required self..

What I tested

  • xcrun swift build -c debug --package-path Desktop — full app target, exit 0 (previously crashed with signal 11 on main HEAD).
  • xcrun swift test -c debug --package-path Desktop --filter AppStateAlertPresentationTests — 11/11 tests pass, 0 failures (previously could not even compile the test target).

Running the pinned swift-format lint scope after both fixes above surfaced one more piece of the same masked breakage: AppState+Permissions.swift:106 had formatting drift introduced by the same d49f978512 commit — CI's static-lint step never ran against it because the SILGen crash on the same commit aborted the job before reaching that step. Applied the pinned formatter (mechanical output only, no behavior change) so desktop-swift-format-lint passes clean.

Scope

Part 2 of #12275 (the CI gate that let skipped satisfy a required check) is out of scope here — it lives in .github/workflows/, which is out of bounds for this fix.

Failure-Class: none

🤖 automated by hourly watchdog — tested and merged

Review in cubic

…12275)

AppState.alertPresenter's `any DesktopAlertPresenting` default-value
initializer crashes swift-frontend SILGen (signal 11) on the CI-pinned
Xcode 16.4 / Swift 6.1.2 toolchain. It has been on main since
d49f978 and fails the real Desktop Swift CI job on every commit
that touches desktop/** -- masked on main's status badge only because
the required-check gate treats a path-filtered skip as success.

Move the same value to the same lifecycle point (AppState.init())
instead of the stored-property default, matching the workaround
already carried on three unrelated branches per #12275.

Fixing that unmasked a second, pre-existing compile error in the test
target: AppState+Transcription.swift:848 referenced `alertPresenter`
without explicit `self` inside an escaping closure -- always invalid
under `-strict-concurrency=complete -warnings-as-errors`, but never
reached by the compiler because the SILGen crash aborted first.

Failure-Class: none

Tested: `xcrun swift build -c debug --package-path Desktop` (full app
target, exit 0) and `xcrun swift test -c debug --package-path Desktop
--filter AppStateAlertPresentationTests` -- 11/11 pass, 0 failures.
)

Internal build-toolchain fix, not user-facing behavior — no release note.
…#12275)

Formatting drift from d49f978 -- CI's static-lint step never ran
against it because the SILGen crash on the same commit aborted the job
before reaching this step. Mechanical formatter output only, no
behavior change.

Failure-Class: none
@kodjima33

Copy link
Copy Markdown
Collaborator Author

Closing — superseded. Both fixes this PR proposed are already on main:

Diffing this branch against current main now shows only a cosmetic comment-style difference plus a stale desktop/macos/changelog/releases/0.12.223.json that this branch would incorrectly delete (main has since shipped that release). Nothing left to land.

🤖 automated by hourly watchdog — closed as superseded, not merged (main already carries the equivalent fix)

@kodjima33 kodjima33 closed this Aug 27, 2026
@kodjima33
kodjima33 deleted the watchdog/issue-12275-alertpresenter-silgen-crash branch August 27, 2026 04:40
@github-actions

Copy link
Copy Markdown
Contributor

Hey @kodjima33 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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