oficina / home Public

Smart door step 5: id.oficina.works door, ruling 26, gates open

On branch feat/smart-door-id

Smart-door step 5 (spec docs/superpowers/specs/2026-11-19-smart-door.md, approved by Paul 2026-11-19 with option (a)): the door on id.oficina.works.

What it does

  • id.* renders rastrillo's one-way signin partial inside estilo's estilo-signin-screen; Home fills auth.SigninState itself (internal/home/door.go) and builds none of auth's handlers.
  • Jar: lastsignin.New, origin = credential origin, key = HOME_DEK derived under home/lastsignin/v1 (new seal.Sealer.Derive, handoff 3161be2). Remembers link/Keymail with the proved address; passkey (gate and direct/conditional) keeps the address only if its blind index resolves to the passkey owner's person ref.
  • Passkey glue: the partial's own module (passkey.JS() at /static/signin.mjs) against the direct ceremony, which already answers {"ok":true,"to":…}. Picked over adapting Home's passkey.js: conditional UI, abort-on-submit, retry-once-on-refused-finish and the fallback are rastrillo's tested code, so nothing drifts.
  • Forget: POST /signin/forget; chained GET/POST /forget?return= returning only to a registered consumer's /signed-out.
  • Ruling 26 recorded (design §1, §4, gate 5; AGENTS.md); gates 1, 2, 5, 9 driven with a validly sealed canary cookie.

For review / Paul

  • Copy: the id. door now speaks rastrillo's approved strings: submit Continue* (the spec's door table), not estilo's 2026-10-01 "Sign in"; Sent says "We sent a link to your inbox. The link works once and expires soon." in place of estilo's "If that address can sign in here…"; heading "Sign in to Oficina ID". New strings for copy review: "Forget me on Oficina ID too?" (heading), the body line, "Forget me on Oficina ID too" (button), "Not now", tab title "Forget me · Oficina ID".
  • A remembered Keymail shows rastrillo's keymail door ("Continue to Keymail", as {address}); the spec's id.* table lists Keymail under "Continue as".
  • Before shipping: confirm the carlos edge logs neither Cookie headers nor response bodies (ruling 26).

Needs a Fable (or Astra) review before merge. Not deployed.

Pre-ship check from the spec (carlos edge logs): checked on prod oficina-id, 2026-11-20. Edge lines carry only cid, client (a /24 prefix), country, kind, method, path, status, ua class and woke, e.g. '[edge] ... 404 GET /robots.txt ... path=/robots.txt status=404 ua=browser'. No Cookie or Set-Cookie headers and no response bodies. The remembered-address cookie never appears in a URL, so path logging can't carry it.

Fable's APPROVE AFTER FIXES at 9f2bf3f, addressed. New tip 50da2ee (rebased onto main 17cdcaf). make test and make test-browser (Chrome forced light) are green; hub CI passed at 50da2ee after one rerun past the known TestNativeProofRefusals race flake.

  1. Pin (HIGH): Derive landed on main as 17cdcaf via feat/seal-derive (#139, recording Fable's review of Derive; CI passed at 3161be2 after reruns past two unrelated flakes, TestOperatorCommandActualBinaryDispatch and TestNativeProofRefusals). The branch is rebased onto main, and go.mod/go.sum are pinned to v0.0.0-20261120140933-17cdcaff3345 (the old 3161be2 sums are dropped).
  2. Direct return (MEDIUM): for direct, credentialReturn(r.URL.Query().Get("return_to")) wins when it isn't /, otherwise the cookie. TestDoorDirectFinishKeepsTheDoorsReturn covers: no cookie; another tab's cookie; a hostile query falling back to the cookie; a hostile query with no cookie landing on /.
  3. Jar confined (MEDIUM): the aliases are gone. The jar sits behind doorMemory in door.go, and the only writes are rememberEmail, passkeyRemembrance (decided in the transaction, written after commit by the func it returns) and forget. A new guard, doorMemoryUses, refuses .jar, any lastsignin identifier, and the SentTo/Federated/Confirm/Remembered composite-literal keys outside door.go; TestDoorMemoryGuardRefuses shows each shape is refused.
  4. Refused record (LOW-MED): remember clears the cookie when the jar writes nothing. A case for an address over 254 bytes over a previous record is in TestDoorRemembersProvenSignIns.
  5. Wording (LOW): ruling 26 now reads "as text and as a form field's value" in design §1 row 26, §4, gate 5, AGENTS.md and the passkey.go comment. The smart-door spec's option (a) text is left as Paul approved it. Gate 5 now asserts the canary appears only in text nodes and value="…" (outsideTextAndValue, with its own test).
  6. Gate 5 (LOW): it now loops over magic link, Keymail and passkey (the passkey address shows in the chooser's Email row).
  7. Comments (LOW): the directory really has no jar, because newDirectory builds the App without one; the comments now say so, and TestDirectoryHasNoDoorMemory holds it. TestDoorLeavesNoReadableAddressAtRest now says Home has no store objects: its only state at rest is the SQLite DB, WAL and SHM (no object or blob store is imported). AGENTS.md records the carlos edge-log pre-ship check as done, per this discussion.

Copy is unchanged, pending Paul.

Fable (claude-fable-5-2) re-check at 50da2ee: APPROVE. All seven findings fixed and the tests re-run; go mod verify is clean. Left as is, not blocking: the smart-door spec's option (a) text at line 352 keeps the wording Paul was offered, as the historical record. Edge logs: confirmed earlier in this thread (no cookies or bodies). Merge waits on Paul's copy review.

Copy: Paul approved all seven strings as drafted (2026-11-20). The id.* door's submit button is 'Continue', replacing the 10-01 'Sign in' on this door. Sent: 'We sent a link to your inbox. The link works once and expires soon.' The Forget page: heading 'Forget me on Oficina ID too?', body, button 'Forget me on Oficina ID too', link 'Not now', title 'Forget me · Oficina ID'.