ReviewOS

also looking at this

craft-native/craft

test(ios): record registerPush, so every unmigrated action now has a checked reason

#123
Merged glennmichael123 wants to merge test/account-for-register-push into main
1 file +20 -1
10 days ago

The last of the four that carried no reason at all. scanNFC and signInWithApple turned out to be simply undone and were migrated (#121, #122); scanQRCode turned out to have a real wall. This one is neither, and is recorded as what it is rather than rounded to whichever is tidier.

The device token is delivered to didRegisterForRemoteNotificationsWithDeviceToken on CraftAppDelegate, which SwiftUI instantiates and owns through @UIApplicationDelegateAdaptor (CraftApp.swift:68) — Zig cannot replace that class or reliably graft a method onto it. The token then reaches the page via an NSNotification named by a plain string, which Zig can observe.

So serving it is possible, and it would mean depending on Swift to keep posting a name the spec is free to change. A coupling, not a wall, and the row says so.

All 23 unmigrated actions now have a checked reason

Not asserted, deliberately. Pinning the exact count would turn migrating a deferred action into a three-edit chore — delete the row, lower the ratchet, fix the count — and buys nothing the existing two guards do not already catch. The table also stays non-exhaustive on purpose: "nobody has reached it yet" is an honest state for a newly-added action, and demanding a reason for one would only invite an invented reason.

I removed an exact-count assertion I had briefly added here for exactly that reason.

Both guards re-mutation-tested after the change: listing a migrated action still fails with "Zig serves it now — delete the row, its reason is spent".

1 changed file on the files tab, with 0 review threads.

Sign in to comment on this pull request.