link-recent-signin: link with an Oficina ID sign-in from the last 5 minutes (review record) open
On branch link-recent-signin
🤖 Review record for branch link-recent-signin (e6a1573, stacked on continue-when-unsafe 81c743c), Claude Opus 5.5, 2026-11-19. It implements Paul's ruling A (see #131). Not merged; production untouched.
Rule: a max_age=300 request (linking, and the directory's fresh consumer) takes the Oficina ID session this browser presents if its gesture time is within 300 s, even when it predates the request. These still go back to sign-in: an older gesture, a future time, a Keymail session with no gesture time, and a recovery sign-in. The intent, subject, nonce and consumer checks are unchanged. connect/linkstore Complete no longer bounds the Home auth_time by the fresh flow's start. In practice only Equipo uses StartFreshOn; Docs and the other apps link through Start, which never had that bound.
Spec (slice 1, step 2 and Linking): the rule, and the accepted risk. Someone who forced this browser into their own ID within the window could link the person's app account to it. The risk is bounded three ways:
- the attacker's ID must have signed in within the last 300 s;
- the app account must have a local sign-in in this browser from the last 5 minutes (
FreshLocalreuses one that recent); - the app's confirmation step names the local account before the link is written.
Tests and gate:
- Home tests cover: - a recent sign-in, and one made before the link, are both accepted; - a sign-in older than 301 s is refused; - a passive Keymail session or a recovery sign-in is still refused; - a link start with the arrival session follows the Continue rule (cross-site stops, same-site hands off).
- linkstore tests cover: - auth times -1 s and -299 s are accepted; - -301 s and +1 s are refused; - an old flow row that still carries
starteddecodes and completes. - The mutation record is regenerated: the retired guards
link new sessionandlink transaction startare replaced bylink five-minute window, which is killed. I broke the linkstore window once by hand and its test failed. make testandmake test-browserare green.
Astra (gpt-6-astra):
- First pass: one Important finding. The spec claimed the local sign-in had to happen inside the same flow; it can be a reused one. I fixed the statement.
- Two Minor findings, both fixed: the mutation record and two missing tests.
- Follow-up verdict: "The correction accurately documents the accepted risk; static review passes." No Critical or Important findings remain.
Canary: v0.1.0-181-ge6a1573 on canary/overnight-home. Both roles report unclassified=0 and no ERROR.
Needs to ship:
- Home: this branch, after
continue-when-unsafe. - Equipo: bump
amadan.net/oficina/home/connectto this commit to get the linkstore half. - No other app needs a bump for A.