Skip to content

Stop the Bluetooth permission prompt; stop ewiz-mcp crashing on SIGTERM - #49

Merged
broisnischal merged 1 commit into
mainfrom
fix/bluetooth-prompt-and-mcp-crash
Oct 7, 2026
Merged

broisnischal merged 1 commit into
mainfrom
fix/bluetooth-prompt-and-mcp-crash

Conversation

@broisnischal

Copy link
Copy Markdown
Collaborator

Bluetooth prompt. The Automation tab's live panel sampled IOBluetoothDevice.pairedDevices() every 4 s. TCC gates that call, restarts the app on grant, and keys the grant to the (ad-hoc) signature, so every build re-prompted and Allow quit the app. Bluetooth is now read only when an enabled rule uses it; the live row says so.

ewiz-mcp crash. main.swift globals are main-actor isolated in Swift 6; the signal handler read awake from a global queue → dispatch_assert_queue_fail on every SIGTERM (matches the 3 crash reports on this Mac). Bound to a local. Verified: SIGTERM mid-hold exits 0, releases the assertion, no crash report.

255 tests pass. Ships as 0.18.5.

…SIGTERM

The Automation tab's live panel read IOBluetooth's paired devices every four
seconds. That call is TCC-gated, macOS restarts the app when access is
granted, and an ad-hoc signature ties the grant to the exact build, so every
update asked again and 'Allow' quit the app. Bluetooth is now read only when
a rule depends on it, and the row says so.

Top-level globals in main.swift are main-actor isolated under Swift 6; the
signal handler read `awake` from a global queue and the isolation assertion
trapped, so ending an agent session crashed the server instead of releasing
its hold. Bound to a local the handler can use. Verified: SIGTERM mid-hold now
exits cleanly, releases the assertion, writes no crash report.
@broisnischal
broisnischal merged commit aa10771 into main Oct 7, 2026
1 check passed
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