feat/oficina-id-native-connect
🤖 Oficina ID native slice A: Docs wiring for the consumer (connect) half. Docs is the first app (Q7). It uses Home branch feat/oficina-id-native-connect (hub oficina/home), whose description holds the full change list and the wire notes. Home spec: docs/superpowers/specs/2026-11-14-oficina-id-native.md §7, §8 and §13, which Paul approved and cleared to build on 2026-11-14. Do not merge without review. No deploy.
What changed
- Pins.
amadan.net/oficina/home/connectand/handoffare pinned to Home maine03a01a, the landed native connect slice. - Members choose (team mode). connect's new
Config.Admitis wired toRuntime.AdmitUnlinked(homeRoutes.admit), which allocates nothing. A roster member with no account here gets "Welcome to the team" atGET/POST /account/home/choose, with "Connect my existing account" and "I'm new here — continue with Oficina ID", instead of an automatic Home-only principal.Unlinked/EnsureHomerun only after "I'm new here". Non-members and an undecidable roster answer exactly as before. The page isviews/home_link.htmlwith aChoicebranch: two POSTs carrying connect's form token. The copy is inCatalogasdocs.home.choose_*, worded as the spec has it. - Native sign-in. Docs mounts
connect.Bridge.NativeExchangeatPOST /native/oficina-id. Its session is minted throughMintNativeSessionwith the same rastrillo session store and cookie name, no cookie set, and methodhome-assertion-native. This works outside team mode too, for linked accounts. IsHomeDerivedadoption. The identity resolver, admission's address fallback, the "missing adapter fails closed" guard, the team account-group guard and the "Connect your Oficina account" menu label all askconnect.IsHomeDerived. The resolver also refuses a native or native-web session 7 days after it was minted (connect.Expired). Docs resolves sessions itself, so it must refuse what connect refuses.implementation/team-mode-integration.mdgains a dated amendment: ordinary completion no longer allocates.
Tests
- Router level,
home_native_test.go: a linked account's native session opens the JSON list; the session is refused after 7 days; a browser-shaped POST is refused; in team mode a member gets 409choosewith nothing allocated, thenchoice:"new"signs in and opens the list; non-members get the identical 403 whatever they send; an undecidable roster gives 503. - Team tests follow a member's first browser entry through the choose page (
chooseNew). TestTeamAdmitDecidesAndAllocatesNothingandTestChooseCopyIsTheSpecs.
For Paul
- Button order on the choose page: "Connect my existing account" is primary and first, in spec order; "I'm new here" is the ghost button. Say if it should be the other way round.
Not here
- The Swift client, which another agent is building. The app must send the exchange without an
Originheader (wire note 2 on the Home branch). - An unlink path. Docs has none, and its triggers forbid deleting links.
- The other four apps (slice C).
Gate
.amadan/ci.d/10-gate prints gate: ok at the tip. I ran it with TMPDIR=/tmp/dg (a short socket path for cmd/docs) and GOTOOLCHAIN=go1.26.5. I did not run 20-native (Swift tests), because this branch changes no Swift.
Review
Fable reviewed e9b8932: APPROVE AFTER FIXES. Fixes:
origin/main(f663e9f) is merged in.- New router tests in
home_choose_test.go: - "Connect my existing account" spends the proof, resumes the local link, and the member's Oficina ID then opens Alice's account. - "I'm new here" is refused while the browser holds a session, and the proof survives. - A cross-origin choose POST is stopped by the realcsrf.Protectand allocates nothing. - Repinned to Home main
e03a01aat9f1354c: go mod tidy and verify are clean,10-gateprintsgate: ok, and hub CI passed.
Commits
7
Discussions
0
0 open
Tasks
4/5
done
Discussions
- No discussions on this branch yet.
Tasks 4/5 done
- Wire connect Admit + choose page; IsHomeDerived + 7-day refusal in the resolver Done
- Mount NativeExchange with MintNativeSession; router tests Done
- Highest-capability review (Fable): APPROVE AFTER FIXES on e9b8932; fixes pushed Done
- Paul: choose-page button order (Connect primary vs I'm new here primary) Not started
- Repinned connect+handoff to Home main e03a01a (9f1354c); hub CI passed Done
Activity
- paul@keymail.dev pushed 9f1354c Repin home/connect and home/handoff to Home main e03a01a (the landed native connect slice)
- paul@keymail.dev pushed a9f435a Router tests for the member choice: connect, new over a session, cross-origin
- paul@keymail.dev pushed aadc5c2 Merge origin/main (f663e9f) into feat/oficina-id-native-connect
- claude agent, operated by paul@keymail.dev opened Repinned connect+handoff to Home main e03a01a (9f1354c); hub CI passed
- claude agent, operated by paul@keymail.dev opened Highest-capability review (Fable): APPROVE AFTER FIXES on e9b8932; fixes pushed
- claude agent, operated by paul@keymail.dev opened Paul: choose-page button order (Connect primary vs I'm new here primary)
- claude agent, operated by paul@keymail.dev opened Mount NativeExchange with MintNativeSession; router tests
- claude agent, operated by paul@keymail.dev opened Wire connect Admit + choose page; IsHomeDerived + 7-day refusal in the resolver
- paul@keymail.dev pushed e9b8932 Repin home/connect and home/handoff to a4da657 (challenge hashes the verifier string)
- paul@keymail.dev pushed 994ad80 Repin home/connect and home/handoff to the Home branch tip (6204570)
- paul@keymail.dev pushed 9849040 Native Oficina ID sign-in: mount connect's NativeExchange at POST /native/oficina-id
- paul@keymail.dev pushed 43e00ca Members choose: connect's Admit, the choose page, IsHomeDerived (Oficina ID native slice A)