native/oficina-id-slice-a
Docs is the first native app on Oficina ID (Home docs/superpowers/specs/2026-11-14-oficina-id-native.md, slice A), on rastrillo/native main f1c7a14 (a6bc64b): c989034 plus the landed kit branch native/oficina-id-team-refresh (refreshTeams, 69e7c88). It also takes the shared menu-name fix and the screenshot gate. Fable reviewed d143194: APPROVE AFTER FIXES. All MUST and SHOULD items are fixed in fe88428, 523cb59 and 808018e; the re-review of d143194..808018e returned APPROVE, and its two small follow-ups are in 61e06d0. Not merged. No deploys, Sparkle publishing, portal changes or device installs.
What changed
- Pin (
6d327dc): rastrillo/nativec989034in Package.swift/.resolved, both XcodeGen projects, the notice provenance and the Colophon (regenerated). - Entitlements (
7313cde):macos/DeveloperID.entitlements(Sparkle),macos/AppStore.entitlements,ios/DocsPhone.entitlements. Each haskeychain-access-groups[9U4A84C4WK.works.oficina.docsfirst,9U4A84C4WK.works.oficina.id], an app group (9U4A84C4WK.works.oficinaon Mac,group.works.oficinaon iOS) andwebcredentials:id.oficina.works.mac-updates.jsonnames the entitlements and the profile by its local path,~/private_keys/oficina/profiles/Oficina-Docs-macOS-Developer-ID.provisionprofile(mac_updates.py expands~).--provisioning-profileoverrides it at release, and an ad hoc build never reads it. The profile is not committed. The file also lists the twelvelocalizations, and both Xcode projects declareCFBundleLocalizations. - Sign-in (
45d7e53): -DocsOficinaSessionwrapsOficinaIDModel.live(configuration: docs/Docs, appGroup:). There is one per app, started once. - Workspaces are keyedoficina-id.<identity>.<team>and read their team's latest session on every request. The offline store and outbox therefore survive the 24-hour re-mint and the 401 re-mint. - A 401 or 303 from the instance callssessionRejected(), at most once a minute per account, and then restores the drainer.renewIfNeeded()runs whenever a scene becomes active. -OficinaOnboardingViewis the first screen. "Other ways to sign in…" is the old server-address and browser sign-in, with "Sign in with Oficina ID" beneath it. -DocsSignInRoutekeeps anyone already signed in the old way on that route until an Oficina ID replaces it (Appendix C). - The toolbar's Accounts button becomes Teams.DocsTeamPickerlists the kit's cached teams that have Docs, then "Other ways…", then "Sign out of <label>". Sign-out is refused while anything is unsent or while a document window of any of that identity's teams is open. - The passkey nudge sits under the workspace. - Mac chrome (
45d7e53):PlainAppNameCommands()is first in.commands.Settings { … }shows the account and the version, with.navigationTitle("Docs")(localisednative.docs). - Launch check (
45d7e53):DocsMac --oficina-id-launch-checkis the spec's §13 launch gate. It reads the entitlement order, both keychain groups (decoding identity records throughOficinaIDStore) and the App Group. It prints counts only, and exits 0 only if every check works. - Screenshot gate (
79ad073, baselinesdbd53999a2500e7909ee8c929ef5): -Tests/DocsSnapshotsruns on Mac andDocsPhoneSnapshotson iPhone, sharing the same file. - Screens: library (with documents, and empty), onboarding welcome/code/teams, other ways, the team picker, and Mac Settings (Oficina ID and server). - Variants: 18 Mac images and 28 iPhone images (iOS 27.0 sim, AX3 included). -native/scripts/snapshots.sh [compare|record] [mac|iphone|all]runs it. It is deliberately not in ci.d. - Bundled fonts are registered first. The editor is left out: web and Metal content draws blank, and TextKit's first layout can outlast the settle window. - Quiet updates (
59b047b):"install": "automatic"in mac-updates.json,NativeUpdater(policy: .quiet),NativeUpdateNoticeunder the Home window only whilecanInstallPendingUpdate(as Calendar a90867e).localizationslists exactly the twelve.lprojlanguages. - Lint (
d143194):skipDirskips.build. 10-gate failed locally once the native build had madenative/apple/.build/checkouts/native/server(rastrillo/native's Go server, pre-move imports); a fresh hub clone passed. - Docs: BUILDING.md has a section on Oficina ID, profiles, the launch check and the snapshot gate (
332992f). Ten new strings are translated into all twelve languages. The kit's own strings stay English until its review.
Review fixes (Fable on d143194)
- B1: teams refresh at launch, when the picker opens (the kit refreshes at most every 5 min) and on any 403 from the instance (at most once a minute). The kit side is rastrillo/native
native/oficina-id-team-refresh69e7c88:OficinaIDModel.refreshTeams(maxAge:)with 4 tests, andmake cigreen there. - B2: store keys survive an origin change. An Oficina ID account's sealed-store key is filed under a fixed origin. A label move, rename or self-host DNS change therefore keeps the store and the unsent outbox. Server accounts still key by host.
- B3: document windows use the current session. Sharing, export, images, Jump and the editor context take a
NativeTransportresolved when used: the watched supplier, falling back to the window's client. - S1: route. It changes only on a sign-in made here (
DocsOficinaSession.signIns), never on a restore. - S2: workspace stays mounted.
mountedkeeps the team on screen while the model is atunavailablefor that same team. The "Can't reach Oficina ID" line and Try again show over it. A failed team switch showsmodel.errorin the same place and in the picker. "Use another" is cancelled, with the reason, when Docs' guard refuses. - S3: launch check. It now checks the App Group and associated-domains entitlements via SecTask.
- S4/S5: guards.
DocsLeaveBlock.checkis identity-wide: open document windows of any team, then every team's outbox, including crash-left ones on disk. Sign-out, Use another, the picker and Settings (Change team… and Sign out) all use it and show one line saying why. The two new strings are in all twelve languages. - Also fixed: - Account-ID parts that aren't base64url-safe are encoded. - The disabled sign-out in the picker no longer looks enabled. - New snapshots:
team-picker-blockedandsettings-blocked. - S7: tests added. Purge on identity replacement; a re-mint restarting a stopped outbox; a 401 with Home down; restore vs sign-in; the 24 h renew; refresh at launch, on the menu and on a 403; the store surviving an origin change; crash-left unsent changes blocking sign-out; guard order; the launch check failing unsigned; the Mac identity-wide window guard. Mutations of the key origin, the mounted case, the sign-in count and the live client each fail their test.
- Later (noted, not done): kit string translations (S6). The light iPhone library toolbar contrast needs checking on a real device before changing.
Gates at d143194
.amadan/ci.d/10-gate:gate: ok..amadan/ci.d/20-native:Native checks passed, with 109 XCTest tests (4 skipped, 0 failures) plus the Swift Testing suites. Both ran locally (GOTOOLCHAIN=go1.26.5, rustup cargo).- Hub CI passed.
native/scripts/snapshots.sh compare allis green: 18 Mac and 28 iPhone images.
What ran for real (this Mac, macOS 27, 2026-11-14)
- The Developer ID Sparkle build with the profile embedded launches and stays up.
taskgated-helperlogged "allowing entitlement(s) for works.oficina.docs due to provisioning profile".codesignshows the three entitlements in order. The launch check passes. - An ad hoc build fails the launch check: entitlements are dropped and the result is -34018.
- Shared keychain across apps: a Developer ID probe signed as
works.oficina.sheets(rastrillo'stools/oficina-id-probe) wrote a Secure-Enclave identity to the shared group. The real Docs artifact then read and decoded it ("1 identities"), and could not see Sheets' session in its own group ("0 sessions"). The probe removed the identity afterwards. OficinaIDAdoptionTests(8 tests) run the whole flow againstFakeOficinaIDService: sign-in, the session supplier, re-mint after a refused session plus the rate limit, team switch, and sign-out leaving no transport. Mutations of the rate limit and of the sign-out clear make them fail.- Snapshot compare is green on Mac and iPhone. Changing "Teams" to "Teamz" fails it (35/41 px).
- Builds succeeded: iOS simulator
DocsPhoneand Mac App StoreDocsMacStore, both unsigned.
Not exercised
- Correction: Home's native endpoints are deployed (prod
c998720). Read-only probes:code/startanswers 400 to an empty body,assertanswers 401, the AASA onid.oficina.workslists9U4A84C4WK.works.oficina.docs, and/api/native/teamsanswers 401. A real sign-in (email code from Paul's inbox) was not run: this session can't drive the GUI.paulca.docs.oficina.worksdidn't answer TLS: the Docs server deploy of main9de84e4is still in progress by another agent. - The app GUI driven on screen: screen capture and Accessibility are not permitted in this session.
- iOS on a device. Notarisation. A Sparkle update from the old build.
Release dry run (built and notarised from 61e06d0; not published)
build-mac.sh --configuration release --updates-config mac-updates.json --version 0.1.8 --build 10with the Team Tito Developer ID, thenrelease_mac.pywith the declared entitlements and profile (--team 9U4A84C4WK --notary-profile slopbox-notary).- Output:
/Users/paulcampbell/amadan.net/oficina/sparkle-worktrees/releases/docs-0.1.8-10/works.oficina.docs-10.zip, 14 739 653 bytes, sha25629029b65ca568b79b4b65975862dbc012c770da9fb102350fc879ee8565fff62. Notarization IDff12f32d-cc5e-419a-ab86-a0e8bb04b2b4; profile UUIDe031a486-2b28-41d5-b922-aa21422de4fb. - Checks on the app unzipped from that archive: - stapler validate passes. -
spctl: accepted, "Notarized Developer ID". - The profile is embedded. ---oficina-id-launch-checkprints all five lines ok and exits 0. - The app launches;taskgated-helperlogs "allowing entitlement(s) for works.oficina.docs due to provisioning profile". - Publisher plan-only (no
--publish): releasedocs-10, download…/-/releases/docs-10/works.oficina.docs-10.zip, feeddocs/appcast.xml. The native-releases clone is untouched. - The published feed is at 0.1.7 (9). Sparkle installing over the
net.amadan.oficina.docsapp is untested; the fallback is the manual reinstall.
Open questions / for Paul
- A 401 in a document window of a team that is not active can't be re-minted without switching team. That window shows the session as ended until its team is chosen again.
- Snapshot findings to check on a device. On the Mac, the home sidebar's "Recent" label draws dark on dark blue in dark mode. On iPhone, the glass toolbar icons and the search field draw almost white on light. Either may be the off-screen renderer.
Docs becomes the first native app on Oficina ID (slice A): rastrillo/native c989034, entitlements and profiles for the shared keychain, the kit's onboarding as the primary sign-in with the old server-address sign-in under Other ways to sign in, PlainAppNameCommands and a Settings window, and the RastrilloSnapshots gate. Work in progress.
Discussions
- No discussions on this branch yet.
Tasks 9/13 done
- Pin rastrillo/native to c989034 Done
- Entitlements (Mac Sparkle, Mac App Store, iOS) and Developer ID profile wiring Done
- Oficina ID onboarding as primary sign-in, old sign-in under Other ways Done
- PlainAppNameCommands, localizations, Settings window titled Docs Done
- RastrilloSnapshots gate: library, onboarding, settings baselines Done
Activity
- paul@keymail.dev pushed 61e06d0 Settings: a server account's Accounts… is not guarded; say why an unreadable outbox is skipped
- paul@keymail.dev pushed a6bc64b Pin rastrillo/native to main f1c7a14 (refreshTeams landed)
- claude agent, operated by paul@keymail.dev opened Review fixes B1-B3, S1-S5, S7 (Fable on d143194)
- claude agent, operated by paul@keymail.dev opened Repin rastrillo/native to the merge of native/oficina-id-team-refresh once landed
- paul@keymail.dev pushed 808018e Docs snapshot baselines: team picker and Settings when leaving is blocked
- paul@keymail.dev pushed 523cb59 Slice A review fixes: team refresh, origin-proof store keys, live clients, guards that say why, the workspace stays mounted
- paul@keymail.dev pushed fe88428 Pin rastrillo/native to native/oficina-id-team-refresh 69e7c88 (refreshTeams), until it lands
- claude agent, operated by paul@keymail.dev opened Paul: publish Docs 0.1.8 (10) — archive built, notarised and launch-checked at sparkle-worktrees/releases/docs-0.1.8-10
- paul@keymail.dev pushed d143194 Lint walks skip .build: SwiftPM's checkout of rastrillo/native is not Docs' code
- paul@keymail.dev pushed 59b047b Quiet Mac updates, as Calls and Calendar: install automatic, NativeUpdater(policy: .quiet), the one-line notice while an update waits
- claude agent, operated by paul@keymail.dev opened Translate the kit's OficinaID strings (rastrillo/native) after review
- claude agent, operated by paul@keymail.dev opened Paul: sign in against deployed Home (code, passkey, team) once id.oficina.works native endpoints are live
- claude agent, operated by paul@keymail.dev opened Fable whole-branch review
- paul@keymail.dev pushed 332992f BUILDING: Oficina ID entitlements, the Developer ID profile, the launch check and the screenshot gate
- paul@keymail.dev pushed c929ef5 Docs snapshot baselines (iPhone, part 4 of 4)
- paul@keymail.dev pushed 7909ee8 Docs snapshot baselines (iPhone, part 3 of 4)
- paul@keymail.dev pushed 9a2500e Docs snapshot baselines (iPhone, part 2 of 4)
- paul@keymail.dev pushed dbd5399 Docs snapshot baselines (Mac, part 1 of 4)
- paul@keymail.dev pushed 79ad073 Screenshot gate for Docs: library, onboarding, other ways, team picker, Settings
- paul@keymail.dev pushed 45d7e53 Oficina ID is Docs' sign-in (slice A); PlainAppNameCommands; a Settings window titled Docs; a launch check
- paul@keymail.dev pushed 7313cde Oficina ID entitlements on all three builds; Sparkle build declares them and its Developer ID profile; twelve localizations
- claude agent, operated by paul@keymail.dev opened Gates 10-gate and 20-native green
- claude agent, operated by paul@keymail.dev opened Signed Sparkle build launches with profile; shared keychain checked
- claude agent, operated by paul@keymail.dev opened RastrilloSnapshots gate: library, onboarding, settings baselines
- claude agent, operated by paul@keymail.dev opened PlainAppNameCommands, localizations, Settings window titled Docs
- claude agent, operated by paul@keymail.dev opened Oficina ID onboarding as primary sign-in, old sign-in under Other ways
- claude agent, operated by paul@keymail.dev opened Entitlements (Mac Sparkle, Mac App Store, iOS) and Developer ID profile wiring
- claude agent, operated by paul@keymail.dev opened Pin rastrillo/native to c989034
- paul@keymail.dev pushed 6d327dc Pin rastrillo/native to main c989034 (Oficina ID kit, PlainAppNameCommands, RastrilloSnapshots)