connect/MIGRATING: correct the Docs and Sheets notes; add Admit and the lessons
Three apps in (Docs, Sheets, Slides), the step-6 notes were wrong in places: - Docs' and Sheets' auth SigninPath was already /signin; - Docs already drew signed-out through connect; - Sheets had no pre-/signin admission check. They also missed that team mode now needs Config.Admit (Slides failed to boot without it). Adds the probe pattern, 5xx as undecided, and the reviewed implementations to copy, with the bugs their reviews found. Docs only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+33
−10
connect/MIGRATING.md+33 −10
CI passed — run details
CI log
amadan: .amadan/timeout: this job's budget is 20m0s (this runner allows up to 30m0s) === vet === CGO_ENABLED=0 go vet ./... CGO_ENABLED=0 go vet -tags browser ./internal/home/ cd handoff && CGO_ENABLED=0 go vet ./... cd roster && CGO_ENABLED=0 go vet ./... cd dashboard && CGO_ENABLED=0 go vet ./... cd connect && CGO_ENABLED=0 go vet ./... cd teammode && CGO_ENABLED=0 go vet ./... === fmt === === build === CGO_ENABLED=0 go build ./... CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build ./cmd/home ./cmd/oficina ./internal/operatorlaunch cd handoff && CGO_ENABLED=0 go build ./... cd roster && CGO_ENABLED=0 go build ./... cd dashboard && CGO_ENABLED=0 go build ./... cd connect && CGO_ENABLED=0 go build ./... cd teammode && CGO_ENABLED=0 go build ./... === go-test === CGO_ENABLED=0 go test -count=1 ./... ? amadan.net/oficina/home/cmd/home [no test files] ok amadan.net/oficina/home/cmd/home-placeholder 0.936s ? amadan.net/oficina/home/cmd/oficina [no test files] ok amadan.net/oficina/home/internal/guardstest 0.344s ok amadan.net/oficina/home/internal/home 57.125s ok amadan.net/oficina/home/internal/home/directorydata 1.401s ok amadan.net/oficina/home/internal/home/logtest 0.003s ok amadan.net/oficina/home/internal/home/seal 0.002s ok amadan.net/oficina/home/internal/home/sealtest 0.003s ok amadan.net/oficina/home/internal/home/wisp 0.047s ok amadan.net/oficina/home/internal/operator 6.507s ok amadan.net/oficina/home/internal/operatorlaunch 4.113s ok amadan.net/oficina/home/internal/provisioner 49.024s cd handoff && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/handoff 0.672s ok amadan.net/oficina/home/handoff/seal 0.002s cd roster && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/roster 5.120s cd dashboard && CGO_ENABLED=0 go test ./... ok amadan.net/oficina/home/dashboard 0.011s cd connect && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/connect 1.411s ok amadan.net/oficina/home/connect/linkstore 0.474s cd teammode && CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/home/teammode 0.103s ? amadan.net/oficina/home/teammode/teammodetest [no test files] === race === go test -race -count=1 ./internal/home/ ./internal/operator/ ./internal/operatorlaunch/ ./internal/home/directorydata/ ok amadan.net/oficina/home/internal/home 340.432s ok amadan.net/oficina/home/internal/operator 82.822s ok amadan.net/oficina/home/internal/operatorlaunch 22.396s ok amadan.net/oficina/home/internal/home/directorydata 23.733s ok amadan.net/oficina/home/internal/provisioner 400.213s cd handoff && CGO_ENABLED=1 go test -race -count=1 ./... ok amadan.net/oficina/home/handoff 12.882s ok amadan.net/oficina/home/handoff/seal 1.014s cd roster && CGO_ENABLED=1 go test -race -count=1 ./... ok amadan.net/oficina/home/roster 6.965s cd dashboard && CGO_ENABLED=1 go test -race -count=1 ./... ok amadan.net/oficina/home/dashboard 1.063s cd connect && CGO_ENABLED=1 go test -race -count=1 ./... ok amadan.net/oficina/home/connect 6.260s ok amadan.net/oficina/home/connect/linkstore 6.358s cd teammode && CGO_ENABLED=1 go test -race -count=1 ./... ok amadan.net/oficina/home/teammode 1.950s ? amadan.net/oficina/home/teammode/teammodetest [no test files]
diff --git a/connect/MIGRATING.md b/connect/MIGRATING.md| index 2f3585a..5513fba 100644 |
| --- a/connect/MIGRATING.md |
| +++ b/connect/MIGRATING.md |
| @@ -67,14 +67,21 @@ drawn by estilo's `estilo-signin-screen`: |
| cookie as signed in. Wrap both in the check the app already runs before |
| `/signin` (Docs' `admitted` plus `withoutCookie`; Calendar's |
| `homeSignin`/`teamSignin`; Slides' and Memoria's offboard; Calls' |
| - `lookupPerson`/`teamSignin`; Sheets has none yet). Without it, a removed |
| + `lookupPerson`/`teamSignin`). Sheets' guards sign a refused session out |
| + but ran nothing before `/signin`, so Sheets added an admission probe |
| + that runs its real signed-in guard on a throwaway request; Slides did |
| + the same with `requireSession` then `currentUser`. Without it, a removed |
| member's session loops between `/signin` and the page that refuses it. |
| + Treat any 5xx from the guard as undecided (no refusal shown, nothing |
| + remembered, nothing forgotten), never as a refusal. |
| 3. **auth's SigninPath.** Set rastrillo `auth.Config.SigninPath` to |
| - `connect.SigninPath`. Docs (`signinAgainPath`, auth.go), Sheets |
| - (`signinFormPath`, signin.go) and Calendar (`newAuthPlugin`, auth.go) set |
| - it to `/signin/local` while Home is on. Left there, every outcome, chooser |
| - link and Forget goes to the email-only door, and the chooser never has an |
| - Oficina ID row. Slides, Memoria and Calls already use `/signin`. |
| + `connect.SigninPath`. Calendar (`newAuthPlugin`, auth.go) sets it to |
| + `/signin/local` while Home is on; Docs' and Sheets' auth already used |
| + `/signin` (only their own "send another link" hrefs pointed at |
| + `/signin/local`, and those must follow too). Left at `/signin/local`, |
| + every outcome, chooser link and Forget goes to the email-only door, and |
| + the chooser never has an Oficina ID row. Slides, Memoria and Calls |
| + already use `/signin`. |
| 4. **The federated door.** In the door handler, if `connect.OficinaHref(r)` is |
| not `""`, set `st.Federated = &auth.FederatedDoor{Provider: |
| lastsignin.ProviderOficina, Href: href, Label: "Oficina ID", Icon: |
| @@ -87,9 +94,25 @@ drawn by estilo's `estilo-signin-screen`: |
| jar. A failure to remember must not fail the sign-in. |
| 6. **Signed out.** Set `RoutesConfig.ForgetPath` to where `auth.Forget` is |
| mounted, and draw `chrome.SignInNotice{…}.SignedOut(p.Action).Forgetting(p.ForgetAction, "")` |
| - from `connect.PageFor(r, "signedout", …)`. Docs, Slides and Memoria draw |
| - the signed-out page from their own path today and must switch to |
| - `PageFor`, or pass their ForgetPath themselves. |
| -7. **Tests** that expect `/signin` to answer `303 /auth/start` now expect the |
| + from `connect.PageFor(r, "signedout", …)`. Docs already drew it through |
| + connect's `SignedOut`; Slides and Memoria draw the signed-out page from |
| + their own path today and must switch to `PageFor`, or pass their |
| + ForgetPath themselves. |
| +7. **Team mode needs `Config.Admit`.** Since connect's member choice page |
| + landed, `connect.New` refuses to boot a team-mode instance that sets |
| + `HomeOnly`/`Unlinked` without `Admit`. An app jumping from an old |
| + connect (Slides was on d82341c) must add a `teamAdmit` (Sheets' and |
| + Docs' are the model) and mount the choose page (`/account/home/choose`). |
| +8. **Copy Docs, Sheets and Slides, not this list alone.** They are the |
| + reviewed implementations (docs 2e21630 / #139, sheets 66e5391 / #71, |
| + slides d2e830f / #49). Their review records list the bugs found the |
| + first time; build their fixes in up front: Oficina ID remembered only |
| + for an admitted session; the refusal only on the plain door, so |
| + Other ways still works; a refused session's cookie cleared on the |
| + door's own response; the return memory not overwritten by a plain |
| + `/signin/local`, reset by a post without `return_to`, stripped even on |
| + a parse error, `/signed-out` read as `/`, cleared by Forget and |
| + sign-out; an end-to-end step-up test; the widest states at 320px. |
| +9. **Tests** that expect `/signin` to answer `303 /auth/start` now expect the |
| door. Tests that expect the link step-up to land on `/signin/local` now |
| expect `/signin/local?reauth=1`. |