🤖 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:
- 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.
- 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. - The directory mounts
/auth/fresh/start. This is the fresh-only consumer: it sends 303 to id's /authorize?consumer=directory&max_age=300. - 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. - 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
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.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.- Note the time; it is the replica restore point (
carlos db pull --at). 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.
- 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. - 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. - 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.