oficina / home Public

Deploy plan: Home main 548ec74 to production (both roles), canary on the overnight pair, team-provisioning config draft open

🤖 Deploy plan for Home main 548ec74 to production (both roles), with canary evidence and a draft of the team-provisioning config. Drafted by Claude Opus 5.5 (claude-opus-5-5), 2026-11-01. Nothing has been done to production. It waits for Paul's OK.

1. Production compared with main

  • Production: oficina (oficina.works, directory) and oficina-id (id.oficina.works, credential) are both on edge = 911b104. That is the tip of release/wisp, promoted 2026-10-30 at about 17:59. X-Carlos-Version: 911b104 and /api/version = v0.1.0-115-g911b104 on both hosts.
  • main: 548ec74 (Merge branch 'wisp'). amadan ci status: CI passed at that exact tip.
  • Live commits that main lacks: none in content. The six live-only commits (e07553a, 3d0615b, 888c818, 090d31e, b4074a8, 911b104) each have a patch-identical twin on main (git cherry marks all six -). git diff 911b104 548ec74 is also empty for every file they touch. The release branches have already been absorbed, so nothing needs merging first.

What deploying main ADDS (105 files, +13,674/−159). The feature commits are 23b1ef2 (design docs), 69ea999 (handoff StartPath), 82d9388 (operator HTTP, confirm ceremony, consumer registry), 7bdddfa (Team page), 0cee9ba (activate version token), 17db191 and 15833f7 (roster), 6b23c73 (connect hooks), 0791dfd, 52b7a74 and 34032f7 (teammode), 67c12e3 (re-pin), and 602f513 (linkstore Adopt). With no new config, these are the behaviour changes:

  1. Boot applies ServingSchema. The credential gets 1 new migration: oficina_credential_operator_http/0001 (tables consumers and operator_plans). The directory gets 4: - oficina_directory_operator_http/0001: operator_plans and operator_http_teams - oficina_directory_team/0001: memberships.added_at, a nullable column - oficina_directory_team/0002: membership_names - oficina_directory_team/0003: team_add_intents and team_resolve_receipts

All of them are additive.

  1. The credential CSP narrows. Today the global form-action names 'self' plus all 7 consumers. On main it names 'self' https://oficina.works. Two pages add their own one consumer per response: the assertion handoff and the cross-site "Finish signing out" page (amendment §7.1). The directory CSP is unchanged.
  2. The directory mounts /auth/fresh/start. This is the fresh-only consumer: it sends 303 to id's /authorize?consumer=directory&max_age=300.
  3. The directory mounts /team. Anonymous with ?team= goes to /auth/start; anyone who isn't a member gets 404. The account menu lists a team only to its members, and production has 0 teams.
  4. Routes that stay unmounted (404). /operator/v1, /operator/v1/plan and /operator/confirm stay 404 without HOME_OPERATOR_HTTP, and /resolve stays 404 without the resolve key.

What it REMOVES: nothing user-visible. The only deletion is a refactor: helpers moved out of operator_command_linux.go into operator_material.go. The front page, the wisp and the download links are byte-identical to live.

2. Proposed path

Deploy main 548ec74 itself to both roles. No merge branch and no new release/ branch are needed, because main is already a superset of live. Ship the exact bytes that were canaried*:

  • file: /Users/paulcampbell/amadan.net/oficina/home-deploy-main/releases/home-linux-arm64
  • sha256: 4166a43670c920d9c58a13cd8c65180e9c6df6ee02cbd655f86daeb7722f817f
  • built with make release at 548ec74 (GOTOOLCHAIN go1.26.5); it reports v0.1.0-133-g548ec74.

Once this is live, main and live are the same again, and the "cut release/* from the live build" practice can stop.

3. Canary (AGENTS.md: "review on a deployed canary")

Where. I used the standing preview pair on carlos app home, channel canary/overnight-home:

  • overnight-home-id.bds.oncarlos.com is the credential (env bundle overnight-home).
  • overnight-home.bds.oncarlos.com is the directory (env bundle overnight-directory).

It has its own keys (assertion key id 7fa6e2…, against production's d43ea6…), its own databases and no production data. Before this run it was on f88ea26. I updated it rather than removing it, and it is left on v0.1.0-133-g548ec74. The preview consumers are overnight-docs, -sheets, -slides, -calendar and -memoria.

Preview config, changed (preview only):

  • overnight-directory's HOME_APP_PREVIEW_ORIGINS still had a meet key. Since the Meet-to-Calls rename, 911b104 refuses that at boot ("invalid assertion configuration"). I dropped the entry; its host overnight-meet was already returning 503.
  • I added HOME_DASHBOARD_TEAMS_BASE64 to both preview bundles, mirroring production's shape with overnight origins. Main changed how the credential validates it (the consumer-union check), and the pair had no such config before.

Sequence. I put 911b104 on the pair first, so the canary follows production's real upgrade path. Then 548ec74, then a rollback rehearsal back to 911b104, then 548ec74 again.

| Check | Result | |---|---| | Boot | Both roles served 548ec74 at 22:11 UTC, and again after the dashboard config restart. The edge header and /api/version agree. | | Both migration sets | The credential ledger has oficina_credential_operator_http/0001_operator_http. The directory ledger has oficina_directory_operator_http/0001 and oficina_directory_team/0001–0003, all at 22:11:18. Every new table exists and is empty; teams = 0, memberships = 0. | | Schema inventory | known_extra is unchanged and unclassified=0 on both roles. | | Legacy diagnostic | The preview directory is legacy-shaped. It read result=match legacy_credentials_present=false before and after main, so the additive sets are skipped as intended. Production's directory already reads result=mismatch on 911b104 today, with known_extra=[] unclassified=0. It is a directory-only database that never had the combined legacy shape, so "mismatch" is its normal reading. After the deploy it should read the same, together with unclassified=0. | | /operator/v1, /operator/v1/plan, /operator/confirm | GET and POST return 404 on both roles, the same as 911b104. | | Team page | /team returns 404. /team?team=abc anonymous returns 303 to /auth/start. With 0 teams the menu has no team items. The authenticated empty state was not exercised (see sign-in). | | CSP, directory | Byte-identical to 911b104. | | CSP, credential global | Narrowed to form-action 'self' https://overnight-home.bds.oncarlos.com. This is by design (§7.1). | | CSP, per-consumer pages | Cross-site POST /signout with Origin overnight-docs returns 200 with form-action 'self' https://overnight-docs… https://overnight-home…. The same works for overnight-memoria. Same-site claims are refused with 403. The assertion page uses the same setConsumerPolicy, covered by TestConsumerPolicyOnlyWidensFormAction. | | Sign-in, against a preview consumer | From overnight-docs and overnight-memoria: consumer /auth/start, then id /authorize?consumer=docs-overnight, then /authorize/resume, then /signin 200 with the intent and return cookies set. This is hop-for-hop identical to 911b104. The authenticated half was not exercised: magic link or passkey, then /assertion, then the consumer callback. It needs a human gesture, and I did not fabricate a session. Ask: Paul signs in once at https://overnight-docs.bds.oncarlos.com (the magic link comes from noreply@oficina.works). | | Errors | No ERROR. The one WARN (handoff failed stage=authorize reason=invalid_request) is my own bare /authorize probe, and it appears identically on 911b104. No 5xx at the edge. | | Rollback rehearsal | 911b104 booted and served on the migrated databases on both roles. It logs only at Info: inventory unclassified=1 (credential) and unclassified=4 (directory), and the directory diagnostic mismatch, because it doesn't know the new sets. The sign-in handoff was unchanged. |

4. Production deploy (once Paul says OK)

Pre-flight

  1. git -C home fetch. Confirm origin/main is still 548ec74 and amadan ci status oficina/home -branch main is green. If main has moved, re-canary first.
  2. curl -sI https://oficina.works https://id.oficina.works | grep -i x-carlos-version should show 911b104 for both. carlos channels --account oficina --app oficina (and oficina-id) should show edge 911b104.
  3. Note the time; it is the replica restore point (carlos db pull --at).
  4. shasum -a 256 releases/home-linux-arm64 should print 4166a436…817f.

Swap mode: the default overlap is fine, and --swap hold is not needed. The migrations are additive, and the rehearsal showed that 911b104 boots on the migrated databases and ignores the new tables.

Order: credential first, then directory. The credential change (the CSP narrowing) is the one every app's sign-in depends on. Prove it with a real sign-in before touching the directory. Neither build depends on the other: 911b104's credential already serves max_age for /auth/fresh/start.

cd /Users/paulcampbell/amadan.net/oficina/home-deploy-main

# A. credential
carlos deploy --account oficina --app oficina-id --channel edge \
  --version v0.1.0-133-g548ec74 --label "main 548ec74: operator HTTP, Team page, teammode (inert without config)" \
  --no-prompt releases/home-linux-arm64
carlos restart --account oficina --app oficina-id
curl -sI https://id.oficina.works | grep -i x-carlos-version          # v0.1.0-133-g548ec74
curl -s  https://id.oficina.works/api/version                         # v0.1.0-133-g548ec74
carlos logs --account oficina --app oficina-id --since 10m | grep -E 'schema inventory|ERROR|serving'
#   expect: schema inventory role=credential known_extra=[] unclassified=0
curl -sI -H 'Accept: text/html' https://id.oficina.works/signin | grep -i content-security
#   expect: form-action 'self' https://oficina.works
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://id.oficina.works/operator/v1   # 404
# Paul: sign in to Docs (or any app) end to end; it must land signed in.

# B. directory
carlos deploy --account oficina --app oficina --channel edge \
  --version v0.1.0-133-g548ec74 --label "main 548ec74: operator HTTP, Team page, teammode (inert without config)" \
  --no-prompt releases/home-linux-arm64
carlos restart --account oficina --app oficina
curl -sI https://oficina.works | grep -i x-carlos-version             # v0.1.0-133-g548ec74
curl -s  https://oficina.works/api/version
carlos logs --account oficina --app oficina --since 10m | grep -E 'schema inventory|legacy|ERROR|serving'
#   expect: schema inventory role=directory known_extra=[] unclassified=0
#           legacy schema diagnostic ... result=mismatch   (unchanged from today)
curl -s -o /dev/null -w '%{http_code}\n' -H 'Accept: text/html' https://oficina.works/team          # 404
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://oficina.works/operator/v1                  # 404
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' https://oficina.works/auth/fresh/start     # 303 → id /authorize?consumer=directory&max_age=300
# Paul: oficina.works front page (wisp, downloads) and signed-in dashboard; Sign out from one app.
carlos errors --account oficina --app oficina-id --since 1h; carlos errors --account oficina --app oficina --since 1h

The deploy watcher may say "failed" on the *.bds.oncarlos.com host, because Home refuses unknown hosts. Trust the canonical host header together with /api/version, after the restart.

Rollback (binary only; per role, directory first if both)

carlos promote --account oficina --app oficina 911b104 edge    && carlos restart --account oficina --app oficina
carlos promote --account oficina --app oficina-id 911b104 edge && carlos restart --account oficina --app oficina-id
curl -s https://oficina.works/api/version; curl -s https://id.oficina.works/api/version   # v0.1.0-115-g911b104

carlos rollback --app <a> edge is the alternative. Leave the database alone. The new tables and ledger rows stay, empty and ignored, and a later re-deploy finds them already applied. Expect only the Info lines from the rehearsal (unclassified=N, the directory mismatch). This still holds after the §5 config: 911b104 never reads HOME_OPERATOR_HTTP or HOME_RESOLVE_*, reads HOME_OPERATOR_MATERIAL only in the native operator command (never at serve), already reads HOME_ROSTER_MODE, and accepts 8 HOME_CONSUMERS entries.

5. Draft production config for team provisioning (rollout step 4). NOT applied

Keys. Generate everything fresh and offline, in one sitting. All must be distinct: Home refuses boot on any equality with each other or with the assertion keys. "Keypair" here means the Home/Alta keypair format, base64.StdEncoding(family.MarshalKeypair(family.Generate())) from amadan.net/rastrillo/rastrillo/crypto, the same format as HOME_ASSERTION_KEY and ALTA_OPERATOR_KEY. "pub(K)" is base64.RawURLEncoding(K.SignPub()), 65 bytes. "id(K)" is hex(sha256(K.SignPub())). Neither repo has a generator for K2–K5 or M1–M2, so it needs a small scratch program (or an alta keygen extension) reviewed before use.

| | What | Generated by | |---|---|---| | K1 | Alta operator key, plus prefilter, installation, registry and device | alta keygen (README, cmd/alta/main.go). It also prints both roles' HOME_OPERATOR_HTTP, with every verb Alta uses. | | K2 | credential owner-seed keypair | scratch generator | | K3 | directory provisioning keypair | scratch generator | | K4 | directory roster keypair | scratch generator | | K5 | member-resolution keypair | scratch generator | | M1, M2 | 32 random bytes each, standard base64; one MAC key per role | scratch generator | | S | Paul's person ref (pr_ + 26 base32), the same value as ALTA_OPERATOR_SUBJECT | Open input. It isn't in any config today, and how to read it isn't written down anywhere. |

Credential: oficina-id

| Var | Kind | Value | |---|---|---| | HOME_OPERATOR_MATERIAL_BASE64 | secret | {"version":1,"role":"credential","mac_key":M1,"owner_seed_key":K2} | | HOME_RESOLVE_KEY | secret | K5 | | HOME_CONSUMERS_BASE64 | env | the current 7 plus "alta":"https://alta.bds.oncarlos.com" (= ALTA_ORIGIN; change both together), i.e. {"directory":"https://oficina.works","docs":"https://docs.oficina.works","sheets":"https://sheets.oficina.works","slides":"https://slides.oficina.works","calendar":"https://calendar.oficina.works","memoria":"https://memoria.oficina.works","calls":"https://calls.oficina.works","alta":"https://alta.bds.oncarlos.com"} | | HOME_OPERATOR_HTTP_BASE64 | env | alta keygen's credential line: role credential, origin https://id.oficina.works, actions credential.inspect, owner-seed, register-consumer and retire-consumer. Fill in operator_subject = S and directory_provisioning_public_key = pub(K3). | | must stay absent | | HOME_ROSTER_MODE, HOME_ROSTER_KEY, HOME_RESOLVE_PUBLIC_KEY (the credential role refuses each) |

Directory: oficina

| Var | Kind | Value | |---|---|---| | HOME_ROSTER_MODE + HOME_ROSTER_KEY | secrets, set in one call | serve and K4. A key without the mode, or the mode without the key, refuses boot. | | HOME_OPERATOR_MATERIAL_BASE64 | secret | {"version":1,"role":"directory","mac_key":M2,"owner_seed_public":pub(K2),"provisioning_key":K3,"roster_keys":[{"id":id(K4),"public":pub(K4)}]}. With serve mode on, roster_keys must contain the HOME_ROSTER_KEY public half. | | HOME_RESOLVE_PUBLIC_KEY | env | pub(K5) | | HOME_OPERATOR_HTTP_BASE64 | env | alta keygen's directory line: origin https://oficina.works, the 7 directory.* verbs, operator_subject = S. No directory_provisioning_public_key; it refuses on this role. | | must stay absent | | HOME_RESOLVE_KEY, HOME_ASSERTION_KEY |

Alta side, to match: ALTA_DIRECTORY_PROVISIONING_PUBLIC_KEY = pub(K3), ALTA_OPERATOR_SUBJECT = S, ALTA_HOME_CONSUMER_ID=alta, and ALTA_ORIGIN = the alta entry above.

Order: every intermediate state is a valid boot. carlos restarts programs on a config change, so any partial state may boot.

  1. Credential 1. carlos secrets set --app oficina-id HOME_OPERATOR_MATERIAL_BASE64=… HOME_RESOLVE_KEY=…. Material is ignored while HOME_OPERATOR_HTTP is absent, and the resolve key is valid on its own. 2. carlos env set --app oficina-id HOME_CONSUMERS_BASE64=… HOME_OPERATOR_HTTP_BASE64=… (one call). 3. carlos restart --app oficina-id. Verify: /api/version is unchanged, the inventory says unclassified=0, and a real sign-in to one app works. POST /operator/v1 with no bearer is now refused by the transport rather than 404 (the amendment specifies a fixed 401 for the prefilter; confirm the exact code on the preview first), and /operator/confirm returns 404 for anyone but S.
  2. Directory 1. carlos secrets set --app oficina HOME_ROSTER_MODE=serve HOME_ROSTER_KEY=… HOME_OPERATOR_MATERIAL_BASE64=… (one call). 2. carlos env set --app oficina HOME_RESOLVE_PUBLIC_KEY=… HOME_OPERATOR_HTTP_BASE64=… (one call, last, because it needs the material). 3. carlos restart --app oficina. Verify: boot, POST /operator/v1 is refused by the transport rather than 404, and the roster endpoint is mounted but issues nothing: no generation exists until Alta's initialize. Take the exact status codes from the preview run, not from this note.
  3. If any boot refuses (config err=…), unset the role's last call and restart. That returns it to the previous valid state; the credential origin is suite-wide sign-in.

Before production: apply this exact shape, with preview keys, to the overnight pair first. That is amendment §10.10's canary (Alta creates alpha and beta). It is also still gated on the CARLOS team-scoped-credentials release and Paul's §12 pre-flight.

Housekeeping

  • The overnight pair is left updated on 548ec74, with the two preview config fixes from §3. Nothing else was created, so there is no canary to remove.
  • The worktree /Users/paulcampbell/amadan.net/oficina/home-deploy-main (detached at 548ec74) is kept, because it holds the canaried binary. Remove it after the production deploy.
  • Aside: oficina-id showed Asleep in carlos routes tonight, but AGENTS.md says "The home does not hibernate". Worth a look, separately.

DEPLOYED 548ec74 (v0.1.0-133-g548ec74) to production with Paul's OK, 2026-11-01. Restore point 22:28:43Z.

  • Credential (oficina-id): serving v0.1.0-133-g548ec74; schema inventory role=credential unclassified=0; no ERROR; /signin CSP form-action 'self' https://oficina.works; POST /operator/v1 404. Paul signed out and back in to an app end to end: works.
  • Directory (oficina): serving v0.1.0-133-g548ec74; schema inventory role=directory unclassified=0; legacy diagnostic result=mismatch (unchanged from 911b104, as predicted); /team 404, POST /operator/v1 404, / 200; no ERROR. Rollback if needed: carlos promote both apps to 911b104 on edge + restart (rehearsed). Team config (step 4) not applied; waiting on the team-keygen branch and Paul's OK.

🤖 §10.10-style PREVIEW canary of the team-provisioning config: PASSED. Overnight pair only (app home, overnight-home-id = credential, bundle overnight-home; overnight-home = directory, bundle overnight-directory). Run by Claude Opus 5.5 (claude-opus-5-5) on 2026-11-03, with Paul's approval. oficina-id and oficina were not touched. No production keys were made, and nothing was written to any production app. No plan was submitted, nothing was initialized, nothing was created. The preview keyset was thrown away afterwards: the secret files were deleted and only the values set on the pair remain.

Versions

  • The pair was on 548ec74. I deployed main 64e30e1 (v0.1.0-137-g64e30e1, make release, go1.26.5) to channel canary/overnight-home and restarted each host. Both now report it in X-Carlos-Version and /api/version.
  • Production is on d36a413 on both roles (per #103). Between d36a413 and 64e30e1 the changes are the team-keygen CLI and roster/cache.go (the consumer-side cache library). Home's serving code does not import that cache, so production serves exactly the code canaried here.
  • Built locally: alta at origin/main 2637793 (in a detached worktree; Alta's main was not touched), and home at 64e30e1.

Keys (preview-only, throwaway)

  • alta keygen, with both origin fields edited to the overnight origins (#102 N5).
  • home team-keygen -subject pr_lokp36u64lb7oq4hbv7ghwonda (Paul's ref on the preview credential role). I read it from overnight-docs docs_identity_links, issuer overnight-home-id; it is also present in that role's people. The table is docs_identity_links, not home_identity_links. The command also used -assertion-keys = the overnight directory's live HOME_ASSERTION_KEYS_BASE64 and both -*-origin flags.
  • -check: ok, both roles boot.

Applied, in §5 order (names only)

  1. Credential secrets: HOME_OPERATOR_MATERIAL_BASE64, HOME_RESOLVE_KEY. Booted, unclassified=0.
  2. Credential env, one call: HOME_OPERATOR_HTTP_BASE64, plus HOME_CONSUMERS_BASE64 (the existing 7 + "alta":"https://alta-preview.bds.oncarlos.com", a placeholder). Restarted and verified.
  3. Directory secrets, one call: HOME_ROSTER_MODE=serve, HOME_ROSTER_KEY, HOME_OPERATOR_MATERIAL_BASE64. Booted.
  4. Directory env, one call: HOME_RESOLVE_PUBLIC_KEY, HOME_OPERATOR_HTTP_BASE64. Restarted and verified.

Every intermediate state booted.

Evidence

  • Boot. Credential: schema inventory role=credential known_extra=[] unclassified=0. Directory: known_extra=[home/0001_people home/0002_signin_links passkey/0001_init] unclassified=0, and the legacy diagnostic result=match legacy_credentials_present=false is unchanged from before the deploy. carlos errors: none, and no ERROR lines. The only WARN+ line is one platform instance exited: signal KILL on a handover, for the outgoing process. It also happened on 2026-11-01 under the old builds, and the next handover exited 0.
  • Transport (both roles, identical):

| Request | Result | |---|---| | POST /operator/v1 or /operator/v1/plan, no bearer, malformed bearer, or well-formed unknown bearer | 401 {"outcome":"prefilter"} + WWW-Authenticate: Bearer | | Cookie / Origin / Sec-Fetch- | 403* {"outcome":"browser"} (checked before the prefilter) | | text/plain | 415 media | | GET | 405 method | | anonymous GET /operator/confirm | credential: 303 → /signin?return_to=/operator/confirm; directory: 303 → /auth/fresh/start?return_to=… |

Before the config, all of these were 404.

  • Signed inspect (Alta's homeop.Client.Inspect, run locally against the real hosts): - credential: outcome=ok, version 1, role credential, challenge echoed, sequence 0, head "". - directory: outcome=ok, sequence 0, no generation, proposed team 1 / Uk. - Negatives on both roles: a wrong signing key, wrong device pin, or wrong origin pin, each with the real bearer, gets 403 refused. A well-formed bearer Home doesn't hold gets 401. A directory-role challenge sent to the credential host is refused. - Home's logs agree count for count (route=inspect verb=<role>.inspect outcome=ok, outcome=refused, outcome=prefilter). - Afterwards, a read-only db query found consumers/plans/state/results = 0 on the credential, and teams/memberships/roster*/directoryoperator*/operatorplans/operatorhttpteams = 0 on the directory.
  • Roster (serve). /roster with no query: 400 bad_request. POST: 405. ?team=Uk&fetch=<32B> with no, malformed or unknown bearer: 401 unauthorized. So it is mounted, and it issues nothing until initialize. On the credential host /roster is 404.
  • /team. Bare /team: 404. ?team=abc / ?team=Uk anonymous: 303 → /auth/start.
  • /resolve. - Directory: 404. - Credential, anonymous: 303 → /signin?return_to=/resolve. - Credential, bad intent, or consumer ≠ directory: 404. - Credential, valid-shape intent: 303 → /resolve + __Host-oficina-resolve-intent (HttpOnly, Secure, Lax, 600 s).
  • Other routes. /auth/fresh/start → /authorize?consumer=directory&max_age=300. /authorize?consumer=alta → 303 /authorize/resume (alta admitted); an unknown consumer gets 400.
  • Sign-in, unauthenticated half. overnight-docs /auth/start → id /authorize?consumer=docs-overnight → /authorize/resume → /signin 200. This is the same as in §3. The global CSP is still form-action 'self' https://overnight-home.bds.oncarlos.com.

Corrections to §5 for production

  1. Every carlos command needs --account oficina (§5's set/restart lines leave it out).
  2. Exact codes (§5 said "take them from the preview"): - no/bad bearer: 401 prefilter - Cookie/Origin: 403 browser - signed-but-wrong: 403 refused - anonymous /operator/confirm: 303 (not 404; the 404 is for a signed-in subject other than S) - roster after step 2: 400 bare, 401 with any bearer
  3. carlos env set lists --no-prompt/--message in its help but rejects them ("flag provided but not defined"). Don't add them.
  4. home team-keygen -check silently assumes the production origins. A preview set needs the same -credential-origin/-directory-origin flags, or it fails with a generic "format, pins, or two equal keys". The file's "Re-check" hint leaves them out. This doesn't matter for production, which uses the defaults. Worth a one-line fix in the hint and the message.
  5. The production subject is pr_tsoeky4xus2habsdlun2jvzmku (#102). Production's -assertion-keys comes from carlos env list --account oficina --app oficina. Production's alta keygen output needs no origin edit.
  6. No Home redeploy is needed first: d36a413 serves the canaried code. Run team-keygen from a local build of main ≥ 64e30e1.

State left

The pair is left configured as the standing canary. Its meet-overnight consumer entry predates this run and is still there. The preview Alta secrets were deleted, so a later preview run where Alta creates alpha/beta needs a fresh preview keyset, re-applied the same way.

Paul: one click-through

At https://overnight-docs.bds.oncarlos.com:

  1. Press Sign in.
  2. Use your magic link (from noreply@oficina.works) or a passkey.
  3. Confirm you land back in Docs signed in.
  4. Open https://overnight-home.bds.oncarlos.com and confirm the dashboard shows you signed in. With no teams, the menu should list no team.
  5. Use Sign out in Docs. It should finish on both origins.

That covers the one authenticated hop the canary can't make without a mailbox.

🤖 Pre-deploy inventory: Home main c998720 to production (both roles), canary first. Paul approved 2026-11-14: "Canary main, then deploy". Drafted by Claude Opus 5.5 (claude-opus-5-5). Nothing has been done to production yet.

State

  • Live: oficina (oficina.works) and oficina-id (id.oficina.works) are both on edge d36a41375161a7d0ce8377271935f702df50ae76. X-Carlos-Version and /api/version agree on both hosts.
  • Target: origin/main c998720e97cced8f4f553f0d1c682c51cb17168b, 36 commits ahead. git merge-base --is-ancestor d36a413 origin/main passes, so the deploy removes nothing that is live. amadan ci status oficina/home: CI passed at exactly c998720 (vet, fmt, build, go-test, race).
  • Artifact: make release VERSION=c998720e97cced8f4f553f0d1c682c51cb17168b with GOTOOLCHAIN go1.26.5, in a detached worktree at c998720. The output is releases/home-linux-arm64, sha256 094d9d19fcdda43856f09e1afdca03c891a7aada4da015792ab08031cbbe9118. The canary and production will run these exact bytes.

Migrations (boot applies them through ServingSchema; all additive, CREATE TABLE/INDEX only)

  • Credential role (oficina-id): a new set, home_id. - 0001_ceremonies, 0002_recovery, 0003_direct: slice 1. - 0004_native: native slice A. Tables home_id_grants, _native_replay, _native_starts, _native_pending, _native_buckets, _native_ceremonies, home_id_signed_out_all. - The frozen BootSchema and admission profiles are unchanged.
  • Directory role (oficina): a new set, home_directory_id/0001_signed_out_all (table home_directory_signed_out_all).
  • Not a Home deploy item: connect/linkstore/0003_choice_proofs belongs to the connect library. The Home binary does not import connect (the go.mod has no replace, and nothing under cmd/ or internal/ imports it). Each app (Docs, Sheets, …) applies it when it bumps connect.

Environment and secrets

  • No new variable is read by the serving binary. The set of HOME_*, CARLOS_SMTP_* and Getenv names in non-test code is identical at d36a413 and c998720. The generic <NAME>_BASE64 reader already existed at d36a413, so the HOME_OPERATOR_*_BASE64 names that appear in the diff are only team-keygen's output labels.
  • Native slice A: verified to need NO new env. Its Home-only keys (the identity_id HMAC key and the rest) come from the existing HOME_PEPPER through HKDF (native.go nativeKey, info oficina-id/<purpose>/v1). The code address is sealed with the existing HOME_DEK sealer. Codes go out through the existing SMTP mailer. The AASA file is static, compiled in (native_passkey.go): webcredentials for 9U4A84C4WK.works.oficina.{calls,docs,sheets,calendar,memoria}.
  • Slice 1: registration uses the existing HOME_CONSUMERS. The spec's "Pinned keys and rotation" section is about the consumer side (EQUIPO_HOME_ISSUER, _CONSUMER_ID, _KEYS_BASE64, _DEK_BASE64 in Equipo's config through connect). It asks for nothing new on Home: the private signing key stays the existing HOME_ASSERTION_KEY.
  • team-keygen (64e30e1): an offline CLI, with no serving change. The team-provisioning config (§5 above) remains NOT applied and is not part of this deploy.
  • Production has what this needs: - oficina-id env: CARLOS_SMTP_{FROM,HOST,PORT,USER}, HOME_CONSUMERS_BASE64, HOME_CREDENTIAL_ORIGIN, HOME_DASHBOARD_TEAMS_BASE64, HOME_DIRECTORY_ORIGIN, HOME_ROLE. - oficina-id secrets: CARLOS_SMTP_PASS, HOME_ASSERTION_KEY, HOME_DEK, HOME_PEPPER, HOME_SIGNIN_KEY. - oficina: env HOME_APP_PREVIEW_ORIGINS_BASE64, HOME_ASSERTION_KEYS_BASE64, HOME_CREDENTIAL_ORIGIN, HOME_DASHBOARD_TEAMS_BASE64, HOME_DIRECTORY_ORIGIN, HOME_ROLE; secret HOME_DEK. - No env or secret changes are planned.

Decisions this deploy does NOT make (left for Paul)

  • Adding Equipo to HOME_CONSUMERS (slice 1 §"Evidence, domains and registration"). This changes the consumer registry, so it is not done here. Until it happens, Equipo cannot use Oficina ID; nothing that works today changes.
  • Native passkeys depend on the Apple side: portal profiles, Associated Domains, and Apple's CDN fetching the AASA. This deploy only makes the file available.

Visible behaviour changes on deploy

  • Continue step. GET /authorize/resume now renders a scriptless "Continue to the app" page, and the assertion is minted only on the POST. Every web sign-in into an app therefore gains one Continue click (slice 1 commit 97660e9; ruling A(ii)).
  • New credential routes: - passkey direct/replace ceremonies - recovery replacement - /signed-out - /devices/sign-out-all (fresh session required) - /native/v1/* (JSON only; refuses browser evidence headers) - /.well-known/apple-app-site-association
  • New directory route: /api/native/teams.
  • Directory sign-out now revokes and lands locally, then posts a second form to id (the old flow used a 307).

Rollback plan

carlos promote both apps to d36a41375161a7d0ce8377271935f702df50ae76 on edge, then carlos restart. Leave the databases alone: the new tables are additive, and the old build ignores them. The rollback path gets rehearsed on the canary pair before production.

Canary

The standing pair on app home, channel canary/overnight-home: overnight-home-id (credential) and overnight-home (directory). It currently runs 64e30e1, whose serving code matches d36a413, so it follows production's upgrade path. Caveat: the pair carries the preview team-provisioning config from 2026-11-03, which production does not have. Results to follow in this thread.

🤖 Canary of c998720: PASSED. Run on the overnight pair (app home, channel canary/overnight-home) by Claude Opus 5.5 (claude-opus-5-5), 2026-11-14 at about 13:48–13:53Z. The pair ran the exact production artifact: sha256 094d9d19…9118, which reports version c998720e97cced8f4f553f0d1c682c51cb17168b. Production was not touched.

The pair started on v0.1.0-137-g64e30e1, whose serving code is the same as production's d36a413. I deployed, then restarted both environments. Afterwards both hosts' X-Carlos-Version and /api/version = c998720e97cced8f4f553f0d1c682c51cb17168b.

| Check | Result | |---|---| | Migrations | Credential ledger: home_id/0001_ceremonies, 0002_recovery, 0003_direct, 0004_native, all applied at 13:49:13Z; every home_id_* table exists. Directory ledger: home_directory_id/0001_signed_out_all at 13:49:24Z. | | Boot | Credential: schema inventory role=credential known_extra=[] unclassified=0. Directory: unclassified=0, and the legacy diagnostic result=match, the same as before. carlos errors reports none; there were no WARN or ERROR lines. | | AASA | id /.well-known/apple-app-site-association: 200, no redirect. Headers: application/json, nosniff, max-age=3600. Body: {"webcredentials":{"apps":["9U4A84C4WK.works.oficina.calls", …docs, …sheets, …calendar, …memoria]}}. On the directory host the same path returns 404. | | Native: email code | code/start with a properly signed device-key proof returns 202 {"start":…,"resend_after":30}. The address used was the SES mailbox simulator success@simulator.amazonses.com, not a real mailbox. | | Native: refusals | Garbage proof, no proof, or the wrong signer: 401 proof_rejected plus now. An Origin header: 403 browser. assert with an unknown grant: 401 grant_ended; with a malformed proof: 401 proof_rejected. /native/v1/* on the directory host: 404. | | Native: passkeys | passkey/begin returns 200 with rp_id = the canary's id host, a challenge, and credentials:[]. | | Directory /api/native/teams | With no session, or a bogus bearer: 401 {"error":"session"}. | | Sign-out | Directory POST /signout returns 303 to /signed-out, which renders "You’re signed out". id /signed-out renders "You are signed out". id /devices/sign-out-all without a session returns 303 to /signin?return_to=%2Fdevices%2Fsign-out-all, because it needs a fresh session; the authenticated page itself was not rendered. | | Web sign-in: unauthenticated half | overnight-docs /auth/start → id /authorize?consumer=docs-overnight → /authorize/resume → /signin, which renders 200 with the intent, pending and return cookies set. This is the same, hop for hop, as on 64e30e1. On the directory, /auth/start and /auth/fresh/start (max_age=300) redirect correctly. The global CSP form-action is unchanged. | | Magic-link send | POST /signin with the simulator address returns 303 to /signin/sent, which shows "Check your email". There was no send error. | | Web passkey | /passkey/direct/begin same-site returns 200 with a challenge; cross-site returns 403. | | Local gate | make test-browser at c998720 passes in real Chromium (go1.26.5). This covers the direct passkey and generated-names flow, the legacy non-resident gate, scriptless cross-site return, sign-out, and the Keymail flows. | | Rollback rehearsal | I promoted 64e30e1 back and restarted. Both roles booted and served on the migrated databases, logging only at Info: credential unclassified=4, directory unclassified=1 and result=mismatch. The sign-in hops were unchanged. I then re-promoted c998720. |

Not exercised: the authenticated half. That is clicking a magic link or using a passkey, then the new Continue page, then the consumer callback; the Keymail approval; and the authenticated sign-out-all page. Each needs a real mailbox or a human gesture, and I did not fabricate a session.

The pair is left on c998720.

🤖 DEPLOYED c998720e97cced8f4f553f0d1c682c51cb17168b to production on both roles, with Paul's OK of 2026-11-14 ("Canary main, then deploy"). Run by Claude Opus 5.5 (claude-opus-5-5). The restore point is 2026-11-14T13:53:15Z. The artifact is the one that was canaried: sha256 094d9d19…9118.

Credential (oficina-id) went first, then the directory (oficina). Each got carlos deploy to edge, then carlos restart.

Credential: id.oficina.works

  • X-Carlos-Version and /api/version are both c998720e…68b.
  • Boot logged schema inventory role=credential known_extra=[] unclassified=0.
  • home_id/0001–0004 were applied at 13:53:48Z.
  • /.well-known/apple-app-site-association returns 200 with application/json and no redirect. It carries webcredentials for 9U4A84C4WK.works.oficina.{calls,docs,sheets,calendar,memoria}.
  • /signin returns 200. The CSP form-action 'self' https://oficina.works is unchanged.
  • The Docs sign-in hops are unchanged: docs /auth/start → /authorize?consumer=docs → /authorize/resume → /signin 200.
  • A magic link to the SES simulator address reached /signin/sent with no send error.
  • Native refusals match the canary: 401 proof_rejected, 403 browser, 401 grant_ended. passkey/begin returns rp_id id.oficina.works.
  • /signed-out returns 200. /devices/sign-out-all for an anonymous visitor returns 303 to sign-in. POST /operator/v1 still returns 404.

Directory: oficina.works

  • X-Carlos-Version and /api/version are both c998720e…68b.
  • Boot logged unclassified=0. The legacy diagnostic still reads result=mismatch, as it did before this deploy (see §1 above).
  • home_directory_id/0001_signed_out_all was applied at 13:55:27Z.
  • / returns 200 (wisp and downloads present).
  • /auth/start and /auth/fresh/start redirect correctly.
  • /team returns 404. /team?team=abc returns 303 to /auth/start.
  • /api/native/teams with no session returns 401 session.
  • POST /signout returns 303 to /signed-out, which returns 200. The AASA path returns 404 here, as it should.

carlos errors is empty for both apps, and there are no WARN or ERROR lines.

Env and secret changes: none. Migrations: the five listed above, all additive.

Rollback (rehearsed on the canary), per role, directory first:

carlos promote --account oficina --app oficina d36a41375161a7d0ce8377271935f702df50ae76 edge && carlos restart --account oficina --app oficina
carlos promote --account oficina --app oficina-id d36a41375161a7d0ce8377271935f702df50ae76 edge && carlos restart --account oficina --app oficina-id

Leave the databases alone. The old build ignores the new tables and only logs unclassified=N at Info.

For Paul:

  1. One end-to-end sign-in. Sign out of one app (Docs, for example) and back in. You should now see the new "Continue to the app" page and land signed in. If you can, also check the account menu's Sign out on oficina.works. This is the authenticated half that no agent can do without a mailbox.
  2. Decide whether to add Equipo to HOME_CONSUMERS (slice 1 registration). It has not been changed.
  3. The native apps still need the Apple portal steps (profiles, Associated Domains) before passkeys work in them. The AASA file is now live.

🤖 DEPLOYED 5b10c635a1c3d0cb8cf90c86329dfa19dfc7c5a1 (main) to production on both roles, 2026-11-14 ~14:50–14:53Z, by Claude Opus 5.5 (claude-opus-5-5). Content-only change on top of c998720: the front page's Mac downloads for Calls 0.5.0 (31), Calendar 0.1.1 (3), Memoria 0.1.2 (4) and Sheets 0.2.0 (10) now point at the works.oficina.* release assets. Docs link unchanged (its release comes later).

  • Branch content/mac-links-works-oficina (36b724b), hub CI green, squash-landed as 5b10c63. Pre-deploy, both hosts served c998720, an ancestor of 5b10c63.
  • Artifact: make release VERSION=5b10c635a1c3d0cb8cf90c86329dfa19dfc7c5a1 (go1.26.5), sha256 550612c6…ca13b. Same bytes to both roles.
  • Credential (oficina-id) first, then directory (oficina): carlos deploy to edge, then carlos restart. Both hosts: X-Carlos-Version = /api/version = 5b10c635…c5a1. Boot: credential unclassified=0; directory unclassified=0, legacy diagnostic result=mismatch (unchanged). carlos errors empty for both. id /signin 200, AASA 200 application/json, docs /auth/start and directory /auth/start 303 to id /authorize.
  • https://oficina.works/ serves the four new zip links (twice each); each resolves (206 on a ranged GET). Before landing, each download's sha256 matched its release page and its appcast length.
  • Env/secrets/migrations: none.

Rollback (directory first):

carlos promote --account oficina --app oficina c998720e97cced8f4f553f0d1c682c51cb17168b edge && carlos restart --account oficina --app oficina
carlos promote --account oficina --app oficina-id c998720e97cced8f4f553f0d1c682c51cb17168b edge && carlos restart --account oficina --app oficina-id

🤖 DEPLOYED ce04e84df6ca61adb98bff4167d8eb5873c0c6a1 (main) to production on both roles, 2026-11-14 ~15:42–15:45Z, by Claude Opus 5.5 (claude-opus-5-5). Content-only change on top of 5b10c63: both Docs Mac download links on the front page now point at docs-10/works.oficina.docs-10.zip (Docs 0.1.8 (10)).

  • Branch content/docs-10-download (87eaece), hub CI green, squash-landed as ce04e84 via amadan branch merge. Pre-deploy, both hosts served 5b10c63, the parent of ce04e84.
  • Artifact: make release VERSION=ce04e84df6ca61adb98bff4167d8eb5873c0c6a1 (go1.26.5), sha256 2e3eff8d…2a3f2. Same bytes to both roles.
  • Credential (oficina-id) first, then directory (oficina): carlos deploy to edge, then carlos restart. Both hosts: X-Carlos-Version = /api/version = ce04e84d…c6a1. Boot: credential unclassified=0; directory unclassified=0, legacy diagnostic result=mismatch (unchanged). carlos errors empty for both. id /signin 200; directory /auth/start 303 to id /authorize.
  • https://oficina.works/ serves the docs-10 link twice (card + list); ranged GET 206. Before landing, the downloaded zip's sha256 matched the published 29029b65…fff62 and it holds Oficina Docs.app.
  • Env/secrets/migrations: none.

Rollback (directory first):

carlos promote --account oficina --app oficina 5b10c635a1c3d0cb8cf90c86329dfa19dfc7c5a1 edge && carlos restart --account oficina --app oficina
carlos promote --account oficina --app oficina-id 5b10c635a1c3d0cb8cf90c86329dfa19dfc7c5a1 edge && carlos restart --account oficina --app oficina-id