Companion to the Zig list in #223, and cross-referenced to #211. These actions are answered only by Swift, whether or not the Zig runtime is linked, so a Zig deadline never reaches them. Each one's only answer comes from a framework callback that no person is waiting on.
| action | where it waits in CraftApp.swift |
|---|---|
checkPermission('notifications') | UNUserNotificationCenter.getNotificationSettings. Zig returns UnknownAction for this permission, so Swift always serves it |
registerPush, after the grant | didRegisterForRemoteNotificationsWithDeviceToken / didFail…. A second call also overwrites the single pendingPushCallbackId, so the first promise never settles |
getProducts | await Product.products(for:) |
updateLiveActivity, endLiveActivity | await activity.update / await activity.end |
The pattern
#211's Swift half is a [UUID: DispatchWorkItem] keyed by a token for each call (not by callbackId, which can be nil and restarts on reload). Both the deadline and the completion run on the main queue and remove the same entry, so only the one that finds it answers. The deadline answers TIMEOUT, and never claims the work happened.
For registerPush, the overwrite needs fixing whatever happens to the deadline: reject the displaced call the way getCurrentPosition rejects a replaced request.