Docs: spec §3.2 and §10 for the Team set; the inherited freshness gap
Spec §3.2 gains member display names (sealed) and memberships.added_at (plaintext, day); §10's data model gains added_at, membership_names and the add-by-email tables. fresh-assertion.md's open rastrillo item now names the directory's own fresh checks (operator confirm, the Team page) as inheriting it. team-members.md records Part A as built, with each choice the text left open (§11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+95
−1
docs/superpowers/specs/2026-08-30-home-design.md+21 −1implementation/fresh-assertion.md+2 −0implementation/team-members.md+72 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/specs/2026-08-30-home-design.md b/docs/superpowers/specs/2026-08-30-home-design.md| index 815ad16..8b407a4 100644 |
| --- a/docs/superpowers/specs/2026-08-30-home-design.md |
| +++ b/docs/superpowers/specs/2026-08-30-home-design.md |
| @@ -364,7 +364,9 @@ counted as a fix. |
| ### 3.2 What is at rest, precisely |
| **Sealed:** team display names; provisioning queue payloads; the rekey |
| -journal's new addresses; **sign-in link state** (§5.1). |
| +journal's new addresses; **sign-in link state** (§5.1); **member display |
| +names**, which a team's owners choose and which never contain "@" |
| +(`implementation/team-members.md` §5). |
| **Plaintext, published in the README:** |
| @@ -376,6 +378,9 @@ journal's new addresses; **sign-in link state** (§5.1). |
| it — and it is the new column class §0's cost sentence names. `role` is |
| what makes a published database identify each team's owners. |
| - Team hostnames and sqids — these appear in URLs and were never secret. |
| +- `memberships.added_at`, the day each membership began (day-coarsened at |
| + rest, so §3.3's rule is already met), and which members have a name — |
| + never the name (`team-members.md` §3 rule 5, §5). |
| - Passkey credential ids and **public** keys. |
| - Session rows keyed by **person ref**. Their timestamps are **exact at |
| rest** — expiry is compared against them, so they cannot be coarsened in |
| @@ -1098,6 +1103,21 @@ the person its payload names is the **welcome-mail recipient and that |
| instance's own initial admin**, not a roster write; §7 and §10 agree once |
| that is said. Call 8 reads this table and nothing else. Call 2 cannot write it. |
| +**`memberships.added_at`** — the day (whole days since 1970, UTC) a |
| +membership began; nullable, NULL for every row written before it existed. |
| +Written by the seed verb over the operator endpoint and by the Team page's |
| +confirm, never updated. **`membership_names`** — `(team, person_ref, |
| +sealed_name, updated_at day)`, an owner-chosen display name sealed under |
| +`directory.member-name/v1/<team id>/<person ref>`, 1–64 bytes, never |
| +containing "@", deleted with its membership row, never on an assertion, call |
| +8, a log line or an error string. **`team_add_intents`** and |
| +**`team_resolve_receipts`** — an owner's add-by-email in flight (intent id |
| +hashed, name and resolved person ref sealed, ten minutes) and the receipt |
| +jti ledger; the address itself is typed and resolved only on the credential |
| +origin and never reaches the directory. All four live in the directory's |
| +additive `oficina_directory_team` set, applied by the serving schema |
| +(`team-members.md` §3 rule 5, §4, §5). |
| + |
| Guests are **not** on it. A guest grant is minted in the instance and |
| announced to the directory as `kind = guest`, exactly as before; nothing |
| about guests changes. |
diff --git a/implementation/fresh-assertion.md b/implementation/fresh-assertion.md| index 4b487c8..6be66b9 100644 |
| --- a/implementation/fresh-assertion.md |
| +++ b/implementation/fresh-assertion.md |
| @@ -43,3 +43,5 @@ A Keymail session with no gesture time never satisfies a step-up. Resume refuses |
| Error re-renders (unparseable form, bad address, rate limit, internal error) draw the form through the same helper as the first GET, so a forced form keeps posting to /signin?force=1 after an error (TestForcedFormErrorsKeepTheOverride, failing first). |
| Open, blocked on rastrillo (Astra review of #83 at 1f18405, P1): the guard above runs only when max_age is present. Without max_age, resume still substitutes session At for a Keymail session's missing AuthTime and signs it as auth_time, and a consumer that persisted its own five-minute requirement (handoff StartFresh) accepts it at age 0. The honest assertion for such a session carries no auth_time, which handoff's fresh check (age > freshAuthLifetime) and connect/linkstore's fresh() (at > 0) would both refuse. But rastrillo's assertion.validate, run by Sign and Verify alike, rejects AuthTime <= 0, so Home cannot issue one, and ordinary SSO for these sessions would break if it refused instead. Closing it needs rastrillo to let an assertion carry absent (unknown) auth_time, with every freshness consumer refusing that. Home then falls back to At only for the magic link. Not changed on this branch. |
| + |
| +Inherited by the directory's own fresh checks (2026-10-28): the operator confirm page (team-provisioning-amendment.md §4 step 2) and the Team page's writes (team-members.md §2, `teamFresh` in internal/home/team_page.go) check the directory session's auth_time, which came from whatever assertion minted it. A directory session minted by ordinary SSO (/auth/start, no max_age) from a Keymail session with no gesture inside the last 300 s carries auth_time = At and passes them, exactly as Docs linking does. Writes that arrive through /auth/fresh/start (max_age=300) are not affected: the issuer refuses that session there. It closes when rastrillo lets an assertion carry an absent auth_time. |
diff --git a/implementation/team-members.md b/implementation/team-members.md| index 240f4dd..991ff16 100644 |
| --- a/implementation/team-members.md |
| +++ b/implementation/team-members.md |
| @@ -7,6 +7,9 @@ and 2 (CHANGES REQUIRED). Not approved by that verdict and gated separately: |
| the shared `handoff` change (`ConsumerConfig.StartPath`) before the Team |
| page; each slice (Team page, resolve, each app's roster port) — whole-code |
| review, CI green, verified canary (amendment status, items 1 and 3). |
| +**Part A implemented** on branch `team-page` (base `82d9388`) by Claude |
| +Opus 5.5, 2026-10-28: not reviewed, merged or deployed; its deviations are |
| +§11. |
| Base: Home origin/main `e2ec1ab`; Docs `d867db1`, Sheets `af8deeb`, Slides |
| `ebbb08f`, Calendar `00d8e3d`, Calls (repo `oficina/meet`, `cmd/calls`) |
| `47afcb9`, Memoria `521ae24`. |
| @@ -341,3 +344,72 @@ mountable) → §2: reviewed `handoff` change (`ConsumerConfig.StartPath`), |
| guard cited, sequenced first; recovery-code acceptance stated and |
| cross-referenced; `added_at` nullable and the seed INSERT change (§3); the |
| stopgap allowlist edit retypes the address (§7). None declined. |
| + |
| +## 11. Part A as built (branch `team-page`): deviations and notes |
| + |
| +Recorded in the same branch as the code, for the whole-code review. None |
| +changes a ruling; each is a choice the text left open or could not make. |
| + |
| +1. **The migrations are their own set,** `oficina_directory_team` |
| + (`directorydata/team_migrations/migrations/0001_membership_added_at.sql`, |
| + `0002_membership_names.sql`, `0003_member_add.sql`), applied by |
| + `Runtime.ServingSchema`, not files 0002/0003 in the frozen |
| + `oficina_directory` set — the shape round 4 (#94) ruled for the operator |
| + endpoint's tables, so the compatibility, admission and legacy profiles do |
| + not move. Because 0001 alters a frozen table, the legacy diagnostic now |
| + replays the whole serving schema beside the frozen one; an exact serving |
| + `memberships` stands in for the frozen one, any other change is still a |
| + mismatch. The native command refuses such a database, as it already does |
| + one carrying the operator set. |
| +2. **`added_at` is written by `seed-team` over the operator endpoint only** |
| + ("verbs wrapped"); the native command's path keeps its three-column |
| + INSERT, because its schema has no such column. |
| +3. **The resolve key's inequality set:** on the directory it is checked |
| + against `HOME_ASSERTION_KEYS` and the roster key at load, and added to the |
| + operator endpoint's distinct-key set (Alta's key, the owner-seed public |
| + key, the provisioning key, the roster keys) — the set `NewDirectory`'s |
| + keys come from — rather than as a new `NewDirectory` parameter. On the |
| + credential role it is likewise kept apart from the assertion key and that |
| + role's operator keys. |
| +4. **Both resolve keys are optional.** Without them the page lists and edits |
| + members and offers no Add person; `/team/add`, `/team/resolved`, |
| + `/team/confirm` and `/resolve` answer 404. |
| +5. **The account menu links "Team" once per directory team the person is |
| + on** (at most eight; "Team: <name>" when several). The springboard's |
| + selected team is a `HOME_DASHBOARD_TEAMS` grouping, not a directory sqid, |
| + so "the selected team" has nothing to map to. It costs one indexed read |
| + per signed-in directory page. |
| +6. **One live add per owner** (`team_add_intents.requester` is unique); a |
| + newer add replaces the older. |
| +7. **`/team/resolved` also requires the browser's intent cookie** |
| + (`__Host-oficina-team-add`, set by `/team/add`) to equal the receipt's |
| + intent, beside the receipt's, the intent's and the session's subject. The |
| + jti is recorded inside the resolving transaction. |
| +8. **A stale `GET /team/confirm` redirects to `/auth/fresh/start` back to |
| + `/team/confirm`,** keeping the server-held intent (ten minutes); a stale |
| + confirm POST gets the continuation page to the same. Nothing was in the |
| + form to keep or lose, and the confirm POST still needs a fresh session. |
| + Every other stale write returns to `/team?team=<sqid>` and is not kept. |
| +9. **The receipt:** `base64url(JSON payload) "." base64url(signature)`, the |
| + design's fields, ≤ 2 KiB; `iat` may lead the directory's clock by 5 s |
| + (two processes, perhaps two hosts); `exp` is strict. |
| +10. **The 30-writes budget counts every owner POST,** `/team/add` and |
| + `/team/confirm` included; in memory, per process, like sign-in's. |
| +11. **Small things:** the short ref is four characters ("Member …k7qz"); |
| + the sole owner is drawn no Make member or Remove; the `@` refusal also |
| + covers the fullwidth and small commercial at; the page is plain under |
| + the bar (AGENTS.md: the sky goes on the door, the team home's header and |
| + the front page — "sky only on the team header" read as the team home's). |
| +12. **Spec text:** §3.2's sealed and plaintext lists and §10's data model |
| + are updated. There is no README in this repository to carry "owners can |
| + name members"; §3.2 carries it. |
| +13. **"Call 2 cannot write `memberships` or names"** — call 2 is not built, |
| + so gate 21's clause is a source scan: no production file but |
| + `directorydata/members.go` and `internal/operator/directory.go` writes |
| + either table. |
| + |
| +**The inherited freshness gap** (§2) is recorded where the gap lives, |
| +`fresh-assertion.md`'s open rastrillo item, and on `teamFresh`. |
| + |
| +**Not in Part A:** the roster ports (§7, Part B); the verified canary on |
| +deployed previews; production `HOME_RESOLVE_KEY`/`HOME_RESOLVE_PUBLIC_KEY`. |