Spec: Oficina ID native, one identity signs straight in (Paul's ruling 2026-11-19)
Amends §9 slice A: with exactly one usable Oficina ID on the device an app signs straight in with no screen; two or more ask; failure landings enumerated; the spinner's ~8 s fallback to "Continue as"; "Other ways to sign in…" reachable throughout; rule 0 (an app whose last route was Other ways keeps that account). Reviewed by Claude Fable (APPROVE at 849a8e3; nit applied in 9db301d). Implemented in rastrillo/native 1e36aac.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+23
−2
docs/superpowers/specs/2026-11-14-oficina-id-native.md+23 −2
CI cancelled — superseded by a newer push — run details
CI log
amadan: .amadan/timeout: this job's budget is 20m0s (this runner allows up to 30m0s) === vet === CGO_ENABLED=0 go vet ./... CGO_ENABLED=0 go vet -tags browser ./internal/home/ cd handoff && CGO_ENABLED=0 go vet ./... cd roster && CGO_ENABLED=0 go vet ./... cd dashboard && CGO_ENABLED=0 go vet ./... cd connect && CGO_ENABLED=0 go vet ./... cd teammode && CGO_ENABLED=0 go vet ./... === fmt === === build === CGO_ENABLED=0 go build ./... CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build ./cmd/home ./cmd/oficina ./internal/operatorlaunch cd handoff && CGO_ENABLED=0 go build ./... cd roster && CGO_ENABLED=0 go build ./... cd dashboard && CGO_ENABLED=0 go build ./... cd connect && CGO_ENABLED=0 go build ./... cd teammode && CGO_ENABLED=0 go build ./... === go-test === CGO_ENABLED=0 go test -count=1 ./... ? amadan.net/oficina/home/cmd/home [no test files] ok amadan.net/oficina/home/cmd/home-placeholder 0.703s ? amadan.net/oficina/home/cmd/oficina [no test files] ok amadan.net/oficina/home/internal/guardstest 0.066s ok amadan.net/oficina/home/internal/home 51.208s ok amadan.net/oficina/home/internal/home/directorydata 1.440s ok amadan.net/oficina/home/internal/home/logtest 0.003s ok amadan.net/oficina/home/internal/home/seal 0.006s ok amadan.net/oficina/home/internal/home/sealtest 0.003s ok amadan.net/oficina/home/internal/home/wisp 0.047s ok amadan.net/oficina/home/internal/operator 6.392s ok amadan.net/oficina/home/internal/operatorlaunch 4.131s ok amadan.net/oficina/home/internal/provisioner 49.451s cd handoff && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/handoff 0.671s ok amadan.net/oficina/home/handoff/seal 0.002s cd roster && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/roster 5.121s cd dashboard && CGO_ENABLED=0 go test ./... ok amadan.net/oficina/home/dashboard (cached) cd connect && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/connect 1.353s ok amadan.net/oficina/home/connect/linkstore 0.425s cd teammode && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/teammode 0.102s ? amadan.net/oficina/home/teammode/teammodetest [no test files] === race === go test -race -count=1 ./internal/home/ ./internal/operator/ ./internal/operatorlaunch/ ./internal/home/directorydata/ amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/specs/2026-11-14-oficina-id-native.md b/docs/superpowers/specs/2026-11-14-oficina-id-native.md| index 95dcbe6..35c177b 100644 |
| --- a/docs/superpowers/specs/2026-11-14-oficina-id-native.md |
| +++ b/docs/superpowers/specs/2026-11-14-oficina-id-native.md |
| @@ -1,6 +1,6 @@ |
| # 🤖 Oficina ID: the native slice |
| -Status: revision 6: Fable's fifth-pass finding applied; ready for Paul. Author: Claude (`claude-opus-5-5`) against Home `e9829fd`. Fable reviewed revisions 1–5 (`4cc21a8`, `7acf2a1`, `575e824`, `1b74278`, `b6aea35`). Each pass returned READY AFTER FIXES, and every finding is applied; the fifth pass found one defect, fixed here. No implementation, deployment or merge approval. |
| +Status: revision 6: Fable's fifth-pass finding applied; ready for Paul. Author: Claude (`claude-opus-5-5`) against Home `e9829fd`. Fable reviewed revisions 1–5 (`4cc21a8`, `7acf2a1`, `575e824`, `1b74278`, `b6aea35`). Each pass returned READY AFTER FIXES, and every finding is applied; the fifth pass found one defect, fixed here. No implementation, deployment or merge approval. Amended 2026-11-19 by Paul's straight-in ruling (§9, §16), doc only; built in rastrillo/native `native/oficina-id-straight-in`. |
| ## 1. Decision and boundary |
| @@ -163,7 +163,26 @@ The browser `Finish` keeps today's shape (`handoff/http.go` `Finish`: `Store.Fin |
| `works.oficina.id.changed` tells the other apps to reread. |
| -**Slice A (Docs):** one identity; onboarding: Welcome, then "Sign in with a passkey" or Email → Code, then a passkey if required, then Team (skipped when there is one; the empty state when there are none). A second app finds the identity and offers "Continue as <label>" or "Use another"; the "Make a passkey" nudge; the zero-teams help text. |
| +**Slice A (Docs):** one identity; onboarding: Welcome, then "Sign in with a passkey" or Email → Code, then a passkey if required, then Team (skipped when there is one; the empty state when there are none). A second app finds the identity and goes straight in (amended by Paul's ruling of 2026-11-19, below; it used to offer "Continue as <label>" or "Use another"); the "Make a passkey" nudge; the zero-teams help text. |
| + |
| +**Straight in (Paul's ruling, 2026-11-19).** Launch decides, in this order: |
| +0. **This app's own sign-in comes first.** If the app's last route was "Other ways to sign in…" (a self-hosted or local account), that account opens and nothing goes straight in; straight in applies only when the app's last route was Oficina ID, or there was none. Opening "Other ways…" at any point stops straight in the same way (a launch in flight is abandoned) until the person comes back to Oficina ID; any Oficina ID action (email, passkey, Continue, picking an identity or a team, confirming "Use another") counts as coming back. Signed in, opening and closing "Other ways…" disturbs nothing: the session stays as it is. |
| +1. **This app's own last (identity, team)** is still on the device: back to that team, no screen. Unchanged. If that identity is still here but its team is gone, the app keeps that identity and goes on as rule 2 with it, even with other identities on the device. |
| +2. **Exactly one identity this app can read:** straight in, **no screen at all**: the directory's teams, then the Team step's rules unchanged (one team: signed in; several: the Team step; none: the zero-teams help text). A record only a newer app can read does not count, here or in rule 3; with nothing else on the device the app shows Welcome with "update the app". |
| +3. **Two or more:** "Choose an Oficina ID", a list of them (the device's last used first), plus "Use another Oficina ID" (which adds one) and "Other ways to sign in…". Picking one goes on as rule 2. Back from a later step returns here, in the same order. If identities are removed while it shows, the list follows: one left is "Continue as <label>", none is Welcome. |
| +4. **None:** Welcome. |
| + |
| +**While going straight in** the app shows a spinner ("Signing in") with "Other ways to sign in…" under it, usable from the start. If it has not finished after about **8 seconds** it shows "Continue as <label>" with "Oficina ID is taking a while to answer. You can keep waiting or try again." That screen stays fully usable, with its notice, while the attempt carries on underneath: if the attempt then succeeds the app signs in, unless the person has chosen something on that screen meanwhile (Continue, Use another, Other ways), which abandons it; however it ends, the notice goes. |
| + |
| +**Where a failure lands:** |
| +- **Home says the grant has ended** (signed out elsewhere, expired, revoked): the record is removed, Welcome with "You were signed out of Oficina ID on this device." (§3, §6). |
| +- **The instance is unavailable** with no session to fall back on: "Can't reach Oficina ID" with Try again and "Other ways…" (§11). |
| +- **Not a member** of the team, and **a member with no link yet**: their own screens (§8), as from the Team step. |
| +- **Anything else** (Oficina ID refusing the proof, offline with no cached teams, the keychain refusing): "Continue as <label>" with the error, Try again, "Use another Oficina ID" and "Other ways to sign in…". |
| + |
| +**An app waiting on Welcome** follows another app's sign-in only when an identity is **added** that was not on the device when it arrived at Welcome; it then makes the launch decision above, once however many notifications arrive. It follows nothing while a sign-in of its own is under way (a passkey, an email code), while its own sign-in ("Other ways…") is open, or after **this app's own sign-out** or Home ending its grant, until the app is next launched or the person takes an Oficina ID action here (email, passkey, Continue, picking an identity or a team, or confirming "Use another"): one of several identities signing out never signs the app straight in as another, and a record that cannot be deleted never loops. If the person has left Welcome by the time the decision runs, nothing happens. |
| + |
| +**"Use another Oficina ID" lives in the account menu** of the signed-in app: in slice A it still replaces the identity, so it confirms ("Sign out of <label> and use another Oficina ID?"), signs it out properly for every app on the device (§10), and goes to Email. Asking changes nothing until the person confirms: the session, a renewal in flight and anything on screen carry on, so cancelling changes nothing. **Signing out** returns this app to Welcome, and every app that was using that identity; nothing signs back in until someone does (above), even with another identity on the device. A sign-out the keychain refuses says so ("Oficina ID couldn’t be removed from this device…") and this app stays signed out. |
| **Slice A2 adds:** up to 5 identities; the account menu (identities, the teams under each, Add, Manage, "Sign out of <label>"), with ⌃⌘1…9 on Mac and a per-window (identity, team), blocked mid-call or with unsaved edits; the Keymail sheet: ephemeral `ASWebAuthenticationSession` (`prefersEphemeralWebBrowserSession = true`, so no Safari cookies). The approval mints **no Home browser session**, only a one-time `start` returned to a fixed `works.oficina.<app>://id` callback, which the app redeems with its proof; the Devices page. |
| @@ -250,6 +269,8 @@ A(i): native sign-in skips Continue. A(ii)(a): one Continue tap signs that brows |
| No questions remain open. |
| +**2026-11-19, straight in (amends §9 slice A).** When the device holds exactly one Oficina ID an app signs straight in with no screen at all; "Use another Oficina ID" lives in the account menu; with two or more the app asks which. Identities only a newer app can read don't count. The Team step's rules are unchanged. §9 carries the exact behaviour. |
| + |
| ## Appendix A. Evidence |
| **Today:** no device holds an identity; "accounts" are host-plus-cookie (`native-levelup/reports/calls.md` §B3, `docs.md` §3). rastrillo/native's browser approval keeps a pending map in memory (5 minutes, 256 entries; `rastrillo-native/server/auth.go:23-37`). Calls has a one-slot store (`calls.md` §C). Keychain items have no access group (`sheets.md` §3). |