Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / apple / E2E_CHECKLIST.md

E2E_CHECKLIST.md6.7 KiBRenderedCodeRaw
1# EverySync Apple — manual end-to-end checklist (Phase 3, Mac + devices)
2
3`xcodebuild` cannot run on the Windows box, so this checklist is the Phase 3
4verification gate. Run top-to-bottom on a Mac with two iOS simulators (or one
5simulator + one Android emulator for the cross-device matrix). Every step
6references the file that implements it.
7
8Conventions: vault keys NEVER user-visible (share links carry ids only; keys
9move via PQC-sealed inbox invites). Failed pull = abort, never empty. Only
10explicit tombstones delete.
11
12## 0. Build
13
14- [ ] `sh apple/XCFramework/build_xcframework.sh` succeeds (see
15 `XCFramework/BUILD_NOTES.md`); the XCFramework links into all five
16 targets (Passwords, Notes, Hub, Credential Provider, Share extension).
17- [ ] `./gradlew :library:everysync-core:compileKotlinIosArm64`
18 `:library:everysync-core:compileKotlinIosSimulatorArm64` green (see
19 `XCFramework/IOS_ACTUALS_NOTES.md`).
20- [ ] `xcodebuild` Passwords / Notes / Hub schemes build for simulator.
21
22## 1. Permissions (fresh install per app)
23
24- [ ] Passwords launch: Face ID prompt (`NSFaceIDUsageDescription`); deny ->
25 vault list still renders, unlock rows disabled (no crash, no secret leak).
26- [ ] Hub launch: Reminders prompt (`NSRemindersUsageDescription`),
27 Calendars (`NSCalendarsUsageDescription`), Contacts
28 (`NSContactsUsageDescription`). Deny EACH ONE individually and confirm
29 the other two sinks still cycle (per-store health — `HubSync.swift`).
30- [ ] Keychain: lock the simulator, unlock, confirm vault keys + cursors
31 survived (`KeychainSecureStore.swift`:
32 `AfterFirstUnlockThisDeviceOnly`).
33
34## 2. Relay conformance (simulator <-> Android/desktop, both directions)
35
36Against staging `https://api.maproj.org/personal` (see plan Phase 1F):
37
38- [ ] `register` / `getkey` round-trip from the simulator (device id stable
39 across restarts — `personalDeviceId` in Keychain).
40- [ ] `append` / `pull` on `passwords:<vault>`, `notes:<vault>`,
41 `todos:<vault>`: channel-name assertions pass; records are
42 `B64(AES_GCM)` per item; roster/epoch/transfer envelopes double-wrap
43 as `B64(Json(...))`.
44- [ ] PQC-sealed invite to `inbox:<device>` decrypts on the recipient.
45- [ ] `everysync://join` link parses (`RelayLinks.parseJoinLink` via the
46 XCFramework; URL scheme fires the app).
47- [ ] Kill the network mid-pull: cycle ABORTS, local data untouched (never
48 folded as empty). Restore network: next pull resumes from the cursor
49 (`relay_cursor:<type>:<vault>:<channel>` in Keychain).
50- [ ] Tombstone propagation per type: delete a note/todo on Android, confirm
51 the tombstone removes the `EKReminder` / note row on iOS; delete a
52 password, confirm the row VANISHES (hard-delete) while the snapshot
53 remembers it.
54- [ ] Purge a vault on iOS (`EnvelopeIPC.purgeVault`), pull: vault
55 re-populates from the relay (re-enable repopulation).
56
57## 3. Passwords + Credential Provider (autofill)
58
59- [ ] Create a password on iOS; `mergeCredentials` pairs its passkey on the
60 detail page (explicit `PasskeyLink.To` survives; auto-match needs
61 domain AND username on exactly one candidate; ties stay standalone).
62- [ ] TOTP code matches Android for the same secret/epoch (6-digit,
63 30s step — `Totp.generate` in the XCFramework).
64- [ ] Autofill in Safari: `prepareCredentialList` offers the right site
65 (`DomainMatch` — `notexample.com` must NOT match `example.com`);
66 `provideCredentialWithoutUserInteraction` fills without UI;
67 confirmation UI path works with Face ID.
68- [ ] XPC: kill the containing app, autofill from the extension ALONE
69 (reads via `com.vayunmathur.everysync.envelope-ipc` — extension never
70 touches the relay).
71- [ ] Share sheet offers EDITOR only — never VIEWER (`RelayRoles`).
72 Passwords vaults never grant VIEWER.
73
74## 4. Notes (NoteBody)
75
76- [ ] Text block round-trips markdown verbatim (merge hashes it — no
77 normalization in Swift).
78- [ ] Image block: photo added on Android appears on iOS via
79 `notes-blobs:<vaultId>` prefetch (`NoteKind.imageNames`); missing blob
80 renders a placeholder, never a crash. `widthFraction` resize persists.
81- [ ] Ink block: draw with PencilKit; strokes survive a sync cycle to Android
82 and back (mapping: `PencilKitMapping.swift`; serialization in
83 `serializeNoteBody`). `heightDp` default 300.
84- [ ] Soft-delete: delete a note on iOS, confirm the tombstone row persists
85 locally AND propagates (never raw-deletes).
86- [ ] Share extension: share a URL from Safari -> new note with a text block
87 in the active vault (hub picks it up next cycle; extension never talks
88 to the relay).
89
90## 5. Hub sinks (no Todo app — Reminders IS the UI)
91
92- [ ] Todo created on Android appears in the system Reminders app with title,
93 `notes` (persisted — merge-hash input), due date, done state.
94 `position` reorder on one side never looks like an edit.
95- [ ] `createdAt` adoption: pre-existing reminders adopt on first sync via
96 `contentKey = "todo␀" + title + "␀" + createdAt`.
97- [ ] Delete a reminder in the Reminders app: after the next HEALTHY fetch,
98 the tombstone envelope propagates (known-minus-fetched in `SyncIdMap`).
99 Airplane-mode delete + fetch failure: cycle aborts, nothing deleted.
100- [ ] Contact round-trip: name parts, org, note, all typed phones/emails/
101 addresses, birthday `yyyy-MM-dd`. Shared type ints pass through
102 (`PhoneKind`/`EmailKind`/`PostalKind` tables in `ContactSink.swift`).
103 Swift never writes syncIds into contact fields.
104- [ ] Calendar round-trip: summary/desc/location, start/end, allDay,
105 timezone display, RRULE verbatim (masters store duration), overridden
106 instance merges independently (`uid␀recurrenceId` key).
107- [ ] APNs silent push wakes the hub and triggers a PULL (payload carries
108 nothing — verify with a proxy: push body has no vault data/keys).
109
110## 6. Background sync
111
112- [ ] `BGAppRefreshTaskRequest` fires for all three identifiers; each handler
113 re-schedules at the end (system gives no repeating schedule).
114- [ ] Local edit -> one-shot `BGProcessingTaskRequest` pushes within a minute.
115- [ ] Force-quit + relaunch: schedules re-register, cursors intact, no
116 duplicate appends (idempotent `upsertRaw` keyed on `syncId`).
117
118## 7. Loss-prevention spot checks (the three invariants, verbatim)
119
1201. [ ] Failed pull returns null = abort, never empty (unplug network mid-pull
121 on each type; data untouched).
1222. [ ] Failed local read surfaces as failure, never empty (revoke Reminders
123 access mid-cycle; hub aborts that sink, keeps the others).
1243. [ ] Only explicit tombstones delete (delete server-side WITHOUT a
125 tombstone: record resurrects/quarantines — never vanishes).