continue-when-unsafe: skip ID's Continue page when safe (review record) open
On branch continue-when-unsafe
🤖 Review record for branch continue-when-unsafe (commit 81c743c), written by Claude Opus 5.5 (claude-opus-5-5), 2026-11-19. It follows from #131 and Paul's ruling of 2026-11-19 ("skip it when safe"). Not merged. Nothing has been done to production.
The rule as built (internal/home/exchange.go)
GET /authorize/resume renders the handoff (assertion.html) directly, instead of the Continue page, only when one of these holds:
- (a) The person signed in during this flow.
/authorizenow seals its start time and the hash of any session cookie it saw, for every intent. The session at resume must be a different one, with a known gesture time no earlier than that start. A Keymail session that reported no gesture time does not count. - (b) No other site started the flow. The request to
GET /authorizecarried exactly oneSec-Fetch-Siteofsame-origin,same-siteornone, withSec-Fetch-Mode: navigate,Sec-Fetch-Dest: documentand noSec-Purpose. That is sealed into the intent there and never read from anything later. The resume request must look the same.
Anything else keeps the Continue page. I chose a direct render over a 303 to a new step, so that no new route signs on GET. The Continue POST keeps csrf.Protect, and setConsumerPolicy still allows only the one consumer in form-action. The intent, subject, max_age, consumer and mint-policy checks all run first, unchanged.
Spec changes
docs/superpowers/specs/2026-11-13-oficina-id-slice-1.md, step 2: the new rule, why (b) holds, and the accepted residuals.nonealso covers links opened from other apps, any same-site page counts, and Base (cross-site) still sees Continue.docs/superpowers/specs/2026-11-14-oficina-id-native.md§7: the reference to the Continue page now points at the amended rule.
Tests and gate
- Handler tests (
continue_skip_test.go) cover: - both skips; - cross-site, missing, unknown, empty and repeated values, a frame and a prefetch; - values offered only after/authorize(a resume header, a query, a forged form field); - a cross-site resume, and sign-ins from before the flow; - replay and Back. - Browser tests (Chromium, one loopback server, separate host names): - a same-site launcher skips; - a cross-site launcher, and a same-site page bouncing through a cross-site redirect, still show Continue; - Back restores only the used handoff, which the app refuses.
check-id-mutations.py: 15 new guards, all killed. Two cases were already broken on main:direct receipt capno longer matches its source, anddirect receipt expirysurvives.make test: vet, fmt, build and the tests pass. One race-step failure,TestNativeProofRefusals("future iat"), passed on 3 re-runs.make test-browserpasses. Hub CI passed on81c743c.
Review: gpt-6-astra (codex exec, read-only)
"No demonstrated security regression; the implementation follows the owner's rule". No Critical or Important findings. All three Minor findings are fixed in 81c743c: one value each for Mode and Dest, real Back and redirect-chain browser tests, and precise replay wording in the spec.
Canary: overnight pair, channel canary/overnight-home
- I shipped
v0.1.0-180-g81c743c(make release, sha256ad62599a…fb383,--mail submit), replacingc998720, which is in main. Both hosts report it inX-Carlos-Versionand/api/version. - Boot: credential
schema inventory role=credential known_extra=[] unclassified=0. Directory:known_extra=[home/0001_people home/0002_signin_links passkey/0001_init] unclassified=0andlegacy … result=match, both unchanged. No ERROR or WARN lines. - Transport codes match #101 on both roles: 401
prefilter(no or bad bearer,/operator/v1and/plan), 403browser(Origin or Sec-Fetch), 415media, 405method, and the/operator/confirm303s. - Headless Chromium, signed out: a typed
overnight-docs/auth/start, and a start from a page on127.0.0.1, both reach the id/signinpage. No handoff errors are logged. - Not done: the signed-in half. The skip only shows with a real Oficina ID session on the canary. Sign-in mail goes to a real mailbox through SES, and I will not fabricate a session. Ask (Paul): sign in once at https://overnight-docs.bds.oncarlos.com, then: 1. Type https://overnight-calendar.bds.oncarlos.com/auth/start into the address bar. Expected: you land signed in with no Continue. 2. Click an app from https://overnight-home.bds.oncarlos.com (same-site;
oncarlos.comis not a public suffix). Expected: no Continue. 3. Open that app's/auth/startfrom a link on another site, such as a mail or chat web app. Expected: the Continue page.
Merge and production: waiting
The merge waits for that check and for Paul's approval (AGENTS.md: done, approved, CI green). Production is on ce04e84 on both roles. It would also take 0731690 (mail through FromCarlos, SMTP unchanged) and the adoption docs. There are no migrations.
Commands for each role, credential first, using the canaried binary:
carlos ship --account oficina --app oficina-id --mail submit --version v0.1.0-180-g81c743c --target linux-arm64 --label "main: skip Continue when safe; FromCarlos mail" --no-prompt releases/home-linux-arm64
carlos promote --account oficina --app oficina-id --no-prompt v0.1.0-180-g81c743c edge
carlos restart --account oficina --app oficina-id
curl -s https://id.oficina.works/api/version
carlos logs --account oficina --app oficina-id --since 10m | grep -E 'schema inventory|ERROR|serving'Then the same with --app oficina and https://oficina.works. Check that the directory diagnostic still reads mismatch and unclassified=0.
Rollback, directory first:
carlos promote --account oficina --app oficina --no-prompt ce04e84df6ca61adb98bff4167d8eb5873c0c6a1 edge
carlos restart --account oficina --app oficinaThen the same for oficina-id.
Caveat: for 10 minutes after a deploy or rollback, sign-ins already in progress can fail.
- After the deploy, an intent sealed by the old build has no start time. That is safe: those people see Continue.
- After a rollback, the old build refuses the new
from_herefield (strict JSON). Anyone mid-sign-in sees the failure page and starts again.