oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Oficina ID native adoption
2
3Branch: `native/oficina-id`. Implements step 5 of the approved
4[spec](../docs/superpowers/specs/2026-11-20-equipo-native-oficina-id.md).
5
6## What a person sees
7
8- First Oficina app: the kit's Welcome, passkey or email/code, then the team.
9- One readable Oficina ID and one Equipo team: straight in, with no sign-in
10 form or team address. Several identities use the kit's identity chooser.
11- Several Equipo teams: the kit's Team step. The account menu can change teams.
12- No Equipo teams: the kit's zero-teams help. Other apps' teams are filtered out.
13- Other ways to sign in: the existing address, code and browser approval.
14 Saved pairings still open. This route suspends automatic Oficina ID sign-in;
15 Sign in with Oficina ID returns to it.
16- Sign out: the kit forgets the shared identity and its app sessions; Equipo
17 forgets and best-effort revokes that identity's device credentials, detaches
18 push registration, unregisters remote notifications, clears the badge and
19 ends Live Activities. Use another goes through the kit's confirmation and
20 the same cleanup. Signing out elsewhere also clears Equipo's native account.
21- An outage during renewal keeps the conversation and pending writes, with
22 a retry notice when the kit reports the failure. Foreground and stream
23 retries recover when Home returns.
24
25The existing server contract still requires an Oficina ID linked to an active
26Equipo member. A directory entry alone grants no access; the kit shows the
27server's refusal.
28
29## Implementation
30
31`RastrilloApple` was initially pinned to Docs' `1e36aac95ed252848722926efc8ba8f9dc803216`.
32The current pin is `a18c32b3584ab5cadb8327f8f52a6186721f58dd`; see the kit update below.
33The kit selects an identity/team and mints its session. Equipo posts the session
34cookie, same-origin header, a fresh Curve25519 signing public key and device
35label to the native device endpoint. It persists the returned bearer and key
36in `DeviceAccounts`, as pairing does. Engine requests remain device bearers.
37
38Optional account metadata binds a saved device to its identity, team and the
39hash of its source session. Existing account JSON still decodes. Renewal updates
40the current `EquipoSession` without discarding its conversation or pending
41writes. The kit renews on foreground and a 24-hour clock; an updated session
42registers a replacement device and retires the previous device best effort.
43HTTP 401/403 and rejected event streams re-mint and retry once, retaining the
44original request body, revision and idempotency key. A definite permission
45refusal remains a 403 after the retry. Re-mints are coalesced and
46limited to once a minute. Late answers after leaving cannot restore an account.
47
48Both entitlement files retain the old default Keychain group first,
49`9U4A84C4WK.works.oficina.equipo`, followed by the shared identity group.
50They add the platform's App Group and webcredentials association and retain
51push entitlements. The new signing check verifies the old default group.
52
53Mac packaging already delegates to the kit's bundler, which at the pinned
54revision supports both `--provisioning-profile` and `--entitlements`, embeds the
55profile before signing and strips restricted grants from ad hoc development
56builds. The wrapper now documents these options; the gate exercises profile
57embedding and ad hoc behavior with dummy bytes and mocked signing. The existing
58configuration retains the private profile path. No profile is copied into this
59repository and verification does not read it or invoke a signing identity.
60
61## Verification
62
63Tests use `FakeOficinaIDService`, in-memory identity/device stores and
64`ScriptedTransport`. No test uses a real identity or Keychain. The initial suite
65failed on the absent adoption; additional failing tests exposed native-device
66rejection, cold-launch orphan cleanup, recovery after a Home outage and starting the
67conversation when sign-in completes in an already active scene. A final
68regression test distinguishes definite permission refusals from renewal outages.
69
70The native gate is `native/scripts/check-native.sh`: signing contract, API
71fixtures, strings, web parity, reference scan, Swift tests, Mac build and an
72unsigned iOS Simulator build. The initial gate passed 114 Swift tests, including 20 Oficina ID adoption tests.
73All 28 deliberate mutations below failed their selected check; each change was
74restored before the final gate. Two initially surviving mutations led to stronger
75assertions for local credential removal and absence of fallback Home requests.
76
77Live loopback check:
78
79```sh
80CGO_ENABLED=0 go test ./internal/plan3test -run '^TestPersonAPINativeLiveExchange$' -count=1
81```
82
83Passed. The existing test runs fake Home and the production Equipo router on
84loopback listeners, exchanges an assertion, registers a device, checks the
85session/device expiry match and reads the engine snapshot with the bearer.
86The Swift integration suite tests the app side separately with the kit fake;
87this was not a signed app or passkey UI smoke test.
88
89## Copy reviewed by Luna
90
91Five new English strings; existing Equipo strings are unchanged:
92
93| Key | Text |
94| --- | --- |
95| `oficina.sign_in` | Sign in with Oficina ID |
96| `oficina.connecting` | Connecting to your team |
97| `oficina.device_failed` | Could not connect to this team. |
98| `oficina.retry` | Connect again |
99| `oficina.current_team` | Current team |
100
101The onboarding, Other ways to sign in, Use another Oficina ID, identity/team
102rows, replacement confirmation and identity-labelled Sign out reuse the kit's
103copy. Both existing string catalogs are generated from the English source;
104string and web-parity checks pass. Luna reviewed all five strings; her three
105edits are applied exactly. Her brief and result are copied below.
106
107## Controller follow-up
108
109Review the branch. The five strings have Luna's delegated approval. Signed-device/shared-Keychain and
110Developer ID launch checks remain with the controller: this task does not
111change profiles, identities, App Store Connect or Keychains. Nothing is merged,
112deployed or uploaded.
113
114## Deliberate mutations
115
116Each Swift mutation ran `swift test --package-path native/apple --filter` with
117its protecting test, observing an assertion failure (not a compiler failure).
118The signing mutations ran `python3 native/scripts/check-oficina-id.py`. Kit
119mutations used a temporary module copy because SwiftPM's checkout is read-only.
120
121| Guard broken | Protecting check |
122| --- | --- |
123| Same-origin header | `firstAppShowsWelcomeThenKeepsDeviceAndFreshKey` |
124| Cookie restricted to device registration | `onlyDeviceRegistrationMaySendTheSessionCookie` |
125| Submitted public key matches fresh stored key | `firstAppShowsWelcomeThenKeepsDeviceAndFreshKey` |
126| Device persisted before adoption | `firstAppShowsWelcomeThenKeepsDeviceAndFreshKey` |
127| Directory filtered for Equipo | `oneIdentityGoesStraightInAndSeveralTeamsOrNoneUseKit` |
128| Credential bound to its source session | `renewsAfter24HoursWithoutReplacingConversationSession` |
129| Late device response refused after sign-out | `lateRegistrationCannotRestoreSignedOutDevice` |
130| Orphaned credential removed on cold launch | `nativeCredentialWhoseIdentityWasRemovedCannotSurviveRelaunch` |
131| Old paired account restored | `oldSavedPairingStillLoadsWithoutOficinaID` |
132| Re-mint rate limited | `repeatedRejectionsAreRateLimitedAndKeepConversation` |
133| Device endpoint refusal re-mints | `deviceEndpointRejectionRemintsTheKitSession` |
134| Engine 403 re-mints | `rejectionsRemintOnceAndRetryWithTheNewBearer` |
135| Retry uses replacement bearer | `rejectionsRemintOnceAndRetryWithTheNewBearer` |
136| Clock waits 24 hours | `dailyTimerRenewsWhileAppStaysOpen` |
137| Equipo device revoked | `signOutStopsPushesAndRevokesThisDevice` |
138| Notifications unregistered and badge cleared | `signOutStopsPushesAndRevokesThisDevice` |
139| Kit identity signs out | `signOutStopsPushesAndRevokesThisDevice` |
140| Unavailable team retried on foreground | `foregroundRecoversAfterARejectedSessionMetAnOutage` |
141| Shared sign-out leaves fallback pairing alone | `sharedIdentityRemovalLeavesAnActiveFallbackPairingAlone` |
142| Local device removed on sign-out | `signOutStopsPushesAndRevokesThisDevice` |
143| Fallback suppresses automatic Home requests | `pairingFallbackSuspendsStraightInAndReturnResumesIt` |
144| Old default Keychain group retained | Signing check |
145| Mac profile embedded | Signing check with dummy profile and mocked signing |
146| Ad hoc build strips restricted grants | Signing check with dummy profile and mocked signing |
147| Foreground sign-in starts conversation | `signingInWhileAlreadyForegroundStartsTheConversation` |
148| Push registrar detached on sign-out | `signOutStopsPushesAndRevokesThisDevice` |
149| Definite permission refusal remains a 403 | `aDefinite403StaysARefusalAfterRemint` |
150| Event-stream authentication re-mints | `rejectedEventStreamRemintsAndPreservesCursor` |
151
152
153## Independent review fixes
154
155Astra requested changes at `7f4e1006`: a snapshot released after sign-out could
156save the departed account's bearer and private key while updating its team name;
157a failed re-mint could leave the kit unavailable with no error string and hence
158no recovery notice.
159
160The three new regression tests first failed with six assertions. The snapshot
161was held until after sign-out, then released: the old session became ready and
162saved its credential again. A held renewal plus a queued session update also
163restored metadata. The unavailable test reproduced an engine 401 followed by
164Home offline, with both error strings nil and no notice.
165
166Departing sessions now become permanently invalid before they are released.
167Snapshot completion, direct metadata application and renewal all respect that
168invalidation. Sign-out, replacement, pairing fallback and session expiry use the
169same invalidation. Native device registration retains its existing epoch/state
170check before persistence, tested with a renewal response released after sign-out.
171Pairing sign-out forgets its credential before network cleanup, so a late
172revocation cannot remove a newly saved credential at the same origin. Push
173cleanup remains in place.
174
175The mounted conversation explicitly shows the kit's unavailable title when the
176kit is unavailable, even without error strings. Its Connect again button retries
177the kit and refreshes the conversation. Recovery removes the notice.
178
179Regression commands:
180
181```sh
182swift test --package-path native/apple --filter 'OficinaIDTests/(lateSnapshot|lateRenewal|unavailableRenewal)'
183swift test --package-path native/apple --filter OficinaIDTests
184```
185
186First command before fixes: three tests failed, six assertions. The mutation
187checks remove one guard at a time and run its selected test, requiring an
188assertion failure rather than a compiler error; every mutation is restored.
189
190| Guard broken | Regression test |
191| --- | --- |
192| Invalidate departing session | lateSnapshotCannotRestoreSignedOutDevice |
193| Ignore late snapshot completion | lateSnapshotCannotRestoreSignedOutDevice |
194| Ignore direct metadata on invalid session | lateRenewalCannotRestoreSignedOutDevice |
195| Refuse renewal of invalid session | lateRenewalCannotRestoreSignedOutDevice |
196| Reject native device response from departed epoch | lateRenewalCannotRestoreSignedOutDevice |
197| Show unavailable notice without an error | unavailableRenewalShowsRecoveryWithoutAnErrorString |
198| Invalidate when switching to pairing | departingSessionCannotPersistAfterItsReplacement |
199| Invalidate when replacing team | departingSessionCannotPersistAfterItsReplacement |
200| Forget paired credential before revocation awaits | latePairingRevocationCannotRemoveANewCredential |
201
202The review gate passed `native/scripts/check-native.sh`: 119 Swift tests in
20314 suites (25 Oficina ID tests), Mac build, unsigned iOS Simulator build,
2047 fixtures, 169 strings, 23 parity entries and a clean reference scan. All nine
205review mutations above failed their intended assertion and were restored. The
206loopback native exchange test also passed again. Logs are under the ignored
207`native/build/logs` directory: `review-red.log`, `review-mutations`,
208`review-native-gate.log` and `review-loopback.log`.
209
210## Luna's brief and verdict
211
212The controller supplied this review from `gpt-5.6-luna`, with Paul's instruction
213to apply the verdicts as approved copy. Source: the controller's `luna-oid`
214brief and result, copied verbatim below. All three changes are applied in
215`strings.json` and both generated catalogs. None has a web parity mapping.
216
217### Brief
218
219# Copy review brief: Equipo's apps sign in with Oficina ID (native, 2026-11-20)
220
221Paul delegates copy review for this work to you. You are the copy editor. Your
222edits will be applied as approved copy.
223
224## Context
225
226Equipo is Oficina's team app, on iPhone and Mac. It now signs in with Oficina
227ID, the one account behind every Oficina app. It uses a shared sign-in kit
228whose own screens (Welcome, "Sign in with a passkey", email and code, choosing
229a team, "Other ways to sign in…", "Sign out", "Try again") are reviewed
230already and are not yours to change. The strings below are Equipo's own and
231appear next to the kit's. With an Oficina ID already on the device, the app
232goes straight in. The person never types anything. "Other ways to sign in…"
233opens the older pairing (type the team's address, approve a code in the
234browser).
235
236## The strings (ids are fixed, text is yours to change)
237
238- `oficina.sign_in`: a button at the bottom of the pairing screen, which
239 takes the person back to signing in with Oficina ID. Draft: `Sign in with Oficina ID`
240- `oficina.connecting`: the label of a spinner, shown after Oficina ID has
241 signed the person in while the app gets its own access to the chosen team
242 (normally a second or less). Draft: `Signing in to your team`
243- `oficina.device_failed`: an error shown on that same screen when the app
244 could not get access to the team (network or server failure). Below it are
245 a retry button, "Other ways to sign in…" and "Sign out". Draft:
246 `Could not sign in to this team. Try again.`
247- `oficina.retry`: the retry button under that error. Draft: `Try again`.
248 The kit already has a "Try again" string of its own.
249- `oficina.current_team`: the accessibility label (VoiceOver) of a checkmark
250 next to the team the app is using, in the account menu's list of teams.
251 Draft: `Current team`
252
253## House rules (Paul's, all binding)
254
255- No em dashes, ever. No exclamation marks.
256- Plain words. No jargon a reader would not know. Short. Sentence case.
257- Say what happened and what to do.
258- Use the product names exactly: Oficina ID, Equipo.
259- Do not change the facts. If something looks wrong, flag it.
260
261## Output
262
2631. A table of every string: `id | current | new (or "unchanged") | why`.
2642. A list of flagged rows: `id | problem`.
2653. One line of counts: changed, flagged, left alone.
266
267### Verdict
268
269| id | current | new | why |
270|---|---|---|---|
271| `oficina.sign_in` | Sign in with Oficina ID | unchanged | Clear and accurate. |
272| `oficina.connecting` | Signing in to your team | Connecting to your team | Oficina ID has already signed the person in. |
273| `oficina.device_failed` | Could not sign in to this team. Try again. | Could not connect to this team. | Describes the app's access problem. The retry button gives the next step. |
274| `oficina.retry` | Try again | Connect again | Avoids repeating the sign-in kit's “Try again” label. |
275| `oficina.current_team` | Current team | unchanged | Clear accessibility label. |
276
277Flagged rows:
278
279| id | problem |
280|---|---|
281| `oficina.connecting` | “Signing in” suggests the person is signing in again. |
282| `oficina.device_failed` | “Sign in” describes the wrong failure, and the sentence duplicates the retry button. |
283| `oficina.retry` | Duplicates the sign-in kit's “Try again” label. |
284
285Changed: 3. Flagged: 3. Left alone: 2.
286
287
288## Shared sign-in lifetime review
289
290Astra's re-review of `f90cf412` found two further crossings of the sign-in
291boundary: cancelled pairing could persist a late exchange or `/me` answer,
292and a departed card-answer retry could borrow the bearer of a later sign-in
293to the same identity and team.
294
295Before implementation, the new reproductions failed with 19 assertions across
296two tests (the pairing test has four cases: exchange or `/me`, each with and
297without signing out after switching to Oficina ID). The persistence source
298check also failed because there was no common guarded commit boundary.
299
300`SignInLifetime` now represents authority for one sign-in. `SignInLifetimes`
301is shared through `DeviceAccounts` by pairing, Oficina ID and the app model.
302Beginning another sign-in ends the previous token. Pairing captures its token
303synchronously when Start is tapped, before scheduling its task. An approved
304pairing hands that same token to the conversation. Native renewal retains its
305token; identity/team/origin changes, cancellation, replacement and sign-out end
306it. A token cannot be reactivated.
307
308Every Equipo-owned write of a device, private key, account index or sign-in
309route goes through `DeviceAccounts.commit`. The raw store is private. Commit
310requires the captured token to be both active and the current token. Its check
311and writes are synchronous on MainActor. Removal also matches the saved private
312key, so cleanup cannot remove another sign-in's saved account at the same
313origin. The pinned kit continues to own its shared identity store and its own
314epoch checks; Equipo does not write that store directly.
315
316Bound async flows:
317
318- Pairing start, challenge retries, exchange polling, credential persistence,
319 authenticated `/me`, and metadata persistence.
320- Native startup/restore, selection callbacks, Home renewal, rejection recovery,
321 native device registration and credential installation.
322- Snapshot/task/Needs you refresh, metadata persistence, stream setup and
323 consumption, reconnects and queued refreshes.
324- Message and thread sends, waiting-message delivery, card answers, Set aside
325 and Undo retries, and turn cancellation.
326- Retained clients and credential providers. Both the transport and its provider
327 capture the original token; matching the same identity/team after another
328 sign-in cannot authorize them.
329- Session renewal/adoption, foreground continuation and push attachment. Push
330 registration passes also retain the lifetime alongside their existing
331 generation check. A queued old attachment cannot replace the new session.
332
333A scene's daily clock is an app-level scheduler: each renewal it starts captures
334the then-current token, while an already running renewal retains its original
335token. Old registration/renewal tasks cannot clear a newer task's coalescing
336slot because those slots have distinct task IDs.
337
338Late pairing exchanges and native device mints are decoded so their abandoned
339credentials can be revoked best effort. Revocation is the sole network cleanup
340allowed after a lifetime ends: `DeviceRevocation` uses only the abandoned
341credential, never a current credential provider, and never persists anything.
342Cancelling after a pairing credential arrived also schedules revocation at once.
343
344Additional regressions cover cancellation without a replacement sign-in,
345ended/foreign persistence tokens, late transport responses and later requests,
346both write retry loops stopping without a sleep, a retained provider refusing a
347later sign-in's bearer, late push attachment, and abandoned native revocation.
348`check-sign-in-lifetime.py` is part of the native gate. It rejects raw store or
349Keychain writes outside the approved boundary and rejects an unguarded commit.
350
351Mutation commands use `swift test --package-path native/apple --filter` with
352the listed regression, or `python3 native/scripts/check-sign-in-lifetime.py`.
353Each mutation must produce an assertion failure, not a compiler error, and is
354restored before the gate:
355
356| Mutation | Regression |
357| --- | --- |
358| Pairing cancellation leaves token active | cancellingPairingAloneEndsItsLifetime |
359| New lifetime leaves previous token active | endedTransportRefusesLateResponsesAndNewRequests |
360| Commit skips lifetime validation | endedOrForeignLifetimesCannotPersistAnything |
361| Provider ignores captured lifetime | departedWriteCannotRetryWithALaterSignInsBearer |
362| Answer/visibility retries ignore ended lifetime | endedWriteLoopsDoNotWaitOrRetry |
363| Abandoned pairing is not revoked | cancelledPairingCannotOverwriteNativeSignIn |
364| Abandoned native device is not revoked | lateRenewalCannotRestoreSignedOutDevice |
365| Push attach accepts an ended lifetime | lateAttachCannotReplaceTheNextSignIn |
366| Transport ignores lifetime | endedTransportRefusesLateResponsesAndNewRequests |
367| Source has unguarded commit | check-sign-in-lifetime.py |
368| Source adds raw secret-store write | check-sign-in-lifetime.py |
369| Source adds another writer inside DeviceAccounts | check-sign-in-lifetime.py |
370| Native sign-out leaves onboarding token active | signOutBeforeRegistrationEndsThePendingLifetime |
371| App sign-out leaves onboarding token active | signOutBeforeRegistrationEndsThePendingLifetime |
372| Session removal ends the gate before forgetting | signingOutAfterTheSessionEndsStillForgetsItsCredential |
373
374The early sign-out regression first failed at both entry points, then passed.
375Cancellation-alone also tests signing out while pairing is pending, ensuring
376its staged key is removed before the token ends. All fifteen deliberate
377mutations failed their assertions and were restored. Evidence is in the ignored
378`native/build/logs/lifetime-*` logs, including the two mutation result files.
379
380No user-facing strings changed in this review. Luna's approved copy above is
381unchanged. Signed-device and shared-Keychain launch checks remain with the
382controller; this work does not touch actual profiles, identities or Keychains.
383
384The final audit also reproduced sign-out after session removal: ending the token
385before forgetting could correctly reject the later cleanup write. Session removal,
386account switching and pairing fallback now forget through the still-valid token,
387then end it. Terminal engine authentication failure likewise removes its saved
388credential before invalidation. No stale-token exception was added to commit.
389
390
391Final lifetime gate: `native/scripts/check-native.sh` passed with 128 tests in
39215 Swift suites, both native builds, the lifetime persistence scan, 7 fixtures,
393169 strings, 23 parity entries and a clean reference scan. The loopback native
394exchange test passed again. The existing push sign-out regression also passes:
395notification cleanup still runs when sessionEnded is called with no session,
396while a nested coordinator callback is handled only once.
397
398
399## Shared kit stale-grant fix
400
401Both Package.swift and Package.resolved now pin rastrillo/native main at
402`a18c32b3584ab5cadb8327f8f52a6186721f58dd`, as supplied by the controller.
403The kit binds grant-ended handling to its epoch and the grant and stamps
404identity items with their grant ID, protecting a newer sign-in from a stale
405refreshTeams response. No shared-kit source was changed in this worktree.
406
407Equipo has no custom OficinaSecureStore conformances or wrappers. Its sign-in
408tests use the kit's OficinaMemoryStore directly; the pinned implementation
409supports tagged and referenced conditional writes. No adapter changes are
410needed. The existing Equipo lifetime regressions remain in place; no additional
411Equipo regression or guard was introduced in this dependency-only update.
412No user-facing strings changed.
413
414Validation: `native/scripts/check-native.sh` passed at this pin: 128 Swift tests
415in 15 suites, Mac build, unsigned iOS Simulator build, lifetime persistence
416scan, old-default-Keychain-group and profile-embedding checks, 7 fixtures,
417169 strings, 23 parity entries and the reference scan (2527 files, 2846 matches,
4180 failures). Evidence: `native/build/logs/kit-pin-native-gate.log`.
419
420
421## Fable final-review follow-up
422
423The first two P3 findings are fixed. Leaving Oficina sign-in now removes every
424saved DeviceAccount with an oficinaIdentity and best-effort revokes each bearer,
425even before the bridge synchronizes or the kit loads an identity. Pairing-made
426accounts remain saved. The bridge observes the kit identity during onboarding,
427so confirmed Use another also performs this cleanup from Continue as and
428unavailable. Cleanup tasks retain earlier revocations when a second leave has
429nothing left to remove. All persistence still uses the lifetime-guarded commit.
430
431The app distinguishes the kit leaving from the server ending a session. A local
432sign-out or confirmed identity replacement clears endedTeam. A server-ended
433session retains the existing team notice when pairing opens. Push cleanup and
434lifetime invalidation still run in both cases. No strings changed.
435
436Tests were added before the fixes. Running
437`swift test --package-path native/apple --filter 'leavingBeforeBridgeSynchronizes|onlyServerSessionEnd|permissionRefusalDuringHomeOutage'`
438failed with 28 assertions: all eight combinations of Continue as/unavailable
439and app sign-out/bridge sign-out/replacement/pairing, the three deliberate-leave
440notice cases, and the lost kit session. The tests also retain a pairing-made
441account and require revocation of both native accounts, including another
442identity. A further three-case regression covers leaving before any identity
443has loaded. Evidence: `native/build/logs/fable-p3-red.log`,
444`fable-p3-green.log` and `fable-p3-boundaries.log` in the same log directory.
445
446### Remaining kit limitation: 403 during Home outage
447
448The third P3 is reproduced but cannot be safely fixed through the current kit
449API. At the pinned revision, OficinaIDModel.sessionRejected deletes the stored
450session before calling open. open can fall back during an outage only to the
451stored session it reads, which has already been deleted. renewIfNeeded retains
452sessions on outage but refuses to mint until the stored session is 24 hours
453old. choose/retry reuse a fresh session, so they cannot force a re-mint for a
454possibly stale 403. Equipo must not manufacture kit timestamps or restore
455session records outside the kit's grant/epoch guards.
456
457No kit source, pin or 403 behavior was changed. The needed kit change is an
458API for forced renewal that preserves a still-usable session until a replacement
459is available, or until authoritative evidence says the session/grant has ended.
460The controller must arrange that shared-kit change before this third finding
461can be closed.
462
463permissionRefusalDuringHomeOutageKeepsTheKitSession remains an executable
464reproduction using FakeOficinaIDService and ScriptedTransport. Only its missing
465stored-session assertion is marked with Swift Testing's withKnownIssue; it
466reports one known issue and fails on unexpected success when the kit is fixed.
467The surrounding assertions still require the actual 403 and the mounted
468conversation. This is documented outstanding work, not a fixed or mutation-checked
469guard. The initial unmarked assertion failure is recorded in the red log.
470
471
472Eight deliberate mutations were caught by assertion failures, then restored:
473
474| Mutation | Regression |
475| --- | --- |
476| Remove only the tracked identity's accounts | leavingBeforeBridgeSynchronizesForgetsEveryNativeAccount |
477| Stop observing identity before synchronization | leavingBeforeBridgeSynchronizesForgetsEveryNativeAccount |
478| Gate bridge sign-out on a loaded identity | leavingBeforeIdentityLoadsForgetsTheSavedBearer |
479| Gate pairing fallback cleanup on a loaded identity | leavingBeforeIdentityLoadsForgetsTheSavedBearer |
480| Route app sign-out away from the bridge before identity loads | leavingBeforeIdentityLoadsForgetsTheSavedBearer |
481| Skip saved native bearer revocation | leavingBeforeBridgeSynchronizesForgetsEveryNativeAccount |
482| Report kit leave as server-ended | onlyServerSessionEndShowsTheEndedTeamNotice |
483| Clear the notice for a real server-ended session | onlyServerSessionEndShowsTheEndedTeamNotice |
484
485Each mutation ran `swift test --package-path native/apple --filter` with the
486listed regression. All eight returned an assertion failure, not a build failure.
487Evidence: `native/build/logs/fable-p3-mutations/results.json` and its sibling logs.
488
489
490Final native gate: `native/scripts/check-native.sh` passed with 132 tests in
49115 suites and the one explicitly recorded kit issue described above. The Mac
492and unsigned iOS Simulator builds, lifetime persistence scan, old default
493Keychain group and profile checks, 7 fixtures, 169 strings, 23 parity entries
494and reference scan all passed. Evidence: `native/build/logs/fable-p3-native-gate.log`.
495The original fifteen lifetime mutations and regressions remain in place.
496No actual Keychain, provisioning profile or signing identity was changed.
497