ReviewOS

also looking at this

craft-native/craft

iOS Phase 9: calendar and contacts — ratchet 53 → 48

#91
Merged glennmichael123 wants to merge feat/ios-phase9-data into main
6 files +5708 -1
11 days ago

Follow-on to #90. Five actions — getCalendarEvents, createCalendarEvent, deleteCalendarEvent, getContacts, addContact — and no new mechanism.

That was the point. Every foundation written in this session (ios_async's deliverJson, ios_events, the delegate helper's ?Id) had a bug in it that review caught. The way to reduce that risk was to stop writing foundations and apply the three that exist.

Speech: researched in full, deliberately not served

startListening/stopListening stay with the Swift shim, and this is the cheapest such deferral yet: neither carries a callbackId and neither ever replies, so unlike scheduleNotification or sendToWatch there is no promise to strand. Falling through costs the page nothing.

The module stays as the record of that decision and of the Swift behaviour a future port must match — including two bugs it would otherwise have to choose between reproducing and diverging from. But it is not in the dispatch chain: a module whose capability_actions table is empty can only ever return UnknownAction, so keeping it there would cost a comparison to serve nothing and read as coverage it doesn't provide.

A non-vacuity guard that was itself vacuous

The best find of the round. A test scanned the module's own @embedFile for "ios_async.deliverJson" to prove the reply path existed — and the needle matched the assertion line that spelled it, plus the module prose naming the same function. Deleting every real reply call would have left the test green.

The sibling modules avoid this by embedding an escaped quote so the literal can't match itself; these two calls had no quote to hide behind. Now assembled from halves.

It also found a claimed diagnostic that did not exist: the module said a nil event date was "refused with the event's id in the log", and nothing logged the id — leaving an operator with a failing fetch and no way to find the offending row. The log line exists now.

Verification

Sixteen fixture assertions on an iPhone 17 Pro simulator, plus zig build test / test:ios / build-ios / build-ios-simulator / build-android, zig fmt --check, verify:cimports, pickier.

48 of 106 remaining. Everything left is a repetition of a proven pattern, or Swift-only by nature (WidgetKit, ActivityKit, App Intents, StoreKit 2).

6 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.