Amendment: round 4 — the implementation's deviations and their rulings
Records discussion 94's nine accepted deviations, fixes §3 (inspect required; the role's keys from HOME_OPERATOR_MATERIAL), §4 (409 during an open window), §5 (baseline_attestation in the initialize input; restore through the native command needs a reviewed profile regeneration first), §7 (own migration sets; consumers.app) and §10.4 (the cross-role plan_id refusal is unbuildable), and the retire-consumer team-scope design note for a later amendment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+62
−9
implementation/team-provisioning-amendment.md+62 −9
CI passed — run details
diff --git a/implementation/team-provisioning-amendment.md b/implementation/team-provisioning-amendment.md| index 938c6b6..b96868b 100644 |
| --- a/implementation/team-provisioning-amendment.md |
| +++ b/implementation/team-provisioning-amendment.md |
| @@ -136,12 +136,17 @@ credential role only); ruling 19; ruling 23; `home-operator-seed.md`'s |
| pending plan per role). |
| - **Off unless configured.** `HOME_OPERATOR_HTTP` (JSON ≤ 8 KiB, closed |
| fields) per role: `version`, `role`, `origin`, `installation`, `registry`, |
| - `device`, `public_key`, `key_id`, `actions` (≤ 8), `operator_subject` |
| - (Paul's person ref), `prefilter_token_sha256`; **credential role also** |
| + `device`, `public_key`, `key_id`, `actions` (≤ 8, and **must include |
| + `<role>.inspect`**, which Alta resynchronises from — round 4), |
| + `operator_subject` (Paul's person ref), `prefilter_token_sha256`; **credential role also** |
| `directory_provisioning_public_key` (the directory's |
| `oficina/roster/provisioning/v1` key, which the credential role pins for |
| the first time — §5). Absent → no route mounted (404 like any unknown |
| path). Malformed → boot refuses. |
| +- **The role's own keys** (the MAC key, the owner-seed signer, the |
| + directory's provisioning signer and its roster keys) come from the |
| + existing reviewed `HOME_OPERATOR_MATERIAL`, the material the native |
| + command reads (round 4). |
| - **Separate keys.** Alta's key differs from the assertion, owner-seed, |
| directory-provisioning, roster and resolve keys (`NewDirectory` / |
| `NewCredential` already refuse equality; the HTTP loader extends it). |
| @@ -186,8 +191,9 @@ review land **before** the directory confirm page and the Team page. |
| 3): `seed-team` opens the seal inside its transaction and compares bytes. Credential blind-indexes `owner` with `findOrMintPersonOn`'s |
| normalisation (`links.go:156`, existing-only lookup) and writes |
| `plan_id`, `kind`, `apps`, `owner_index`, `expires_at`. One pending and |
| - one open plan per role; a further submit refuses until the pending one is |
| - confirmed or expires (**up to 15 minutes; no cancel verb** — a convenience |
| + one open plan per role (`UNIQUE(state)`); a further submit refuses until |
| + the pending one is confirmed or expires, and **confirming a pending plan |
| + while a window is open answers 409** until that window expires (round 4) (**up to 15 minutes; no cancel verb** — a convenience |
| we skip). **Expired and refused plan rows are deleted** (`secure_delete` |
| is on), so a blind index for a never-confirmed plan does not linger. |
| 2. **Paul's browser confirms on the directory**: |
| @@ -332,14 +338,17 @@ by two pages; that is the cost of not trusting Alta's rendering. |
| - **`directory.initialize`** keeps its precondition (no generation, no |
| consumer, no tokens, no bootstrap receipt — `directory.go:160-168`) and its |
| `baseline_attestation`, which is Paul's typed confirmation in Alta (§12), |
| - signed in the plan. It must be the directory stream's **first operation**: |
| + carried in the `initialize` operation's input under Alta's signature, as |
| + the existing verb has it — not repeated in the plan, which for |
| + `initialize` carries no label, apps or name (round 4). It must be the directory stream's **first operation**: |
| the engine requires `initial_authority = true` at sequence 1 |
| (`engine.go:160-163`), and every other directory verb refuses `Initial`. |
| - **One stream per role.** The engine stores one operator identity per role |
| and refuses any other once one has acted. Alta will own both streams. |
| **Restore therefore needs Alta's key material** (or a separately reviewed |
| - re-enrolment) until such a design exists — the native Linux command can act |
| - only with Alta's pins and key. |
| + re-enrolment) until such a design exists. Restore through the native |
| + command needs a reviewed profile regeneration first; until then it refuses |
| + a database that has served over HTTP (round 4). |
| **Refused, permanently or until their own design:** any membership write but |
| the seed's first owner (Team page — spec §10, `team-members.md`); rename; |
| @@ -381,7 +390,10 @@ Production `HOME_CONSUMERS` holds 7 entries today (§12); **Alta becomes the |
| 8th env entry** before the table lands. The directory needs nothing new |
| here: `team_instances` and `roster_consumers` are rows already. |
| -**New tables (additive):** credential `consumers`, `operator_plans` |
| +**New tables (additive)**, in their own migration sets |
| +(`oficina_<role>_operator_http`, applied through `Runtime.ServingSchema()`; |
| +round 4): credential `consumers` (with an `app` column, a compiled registry |
| +slug, so `retire-consumer` can check the window's apps), `operator_plans` |
| (plan_id, pending/open, kind, apps, owner_index, expiry); directory |
| `operator_plans` (plan_id, pending/open, kind, label, apps, sealed display |
| name, expiry), `operator_http_teams`; both keep |
| @@ -453,7 +465,9 @@ credentials. |
| under a used sequence; exact replay after expiry returns the stored |
| result and mutates nothing. |
| 4. **Ceremony:** plan signed by another key; a second pending plan |
| - refused; differing `plan_id`s across roles refused at confirm; confirm by |
| + refused; differing `plan_id`s across roles refused at confirm (round 4: |
| + unbuildable across two databases; each confirm POST refuses any id but |
| + the one its GET showed, and Paul compares the prefix on both pages); confirm by |
| a non-operator subject → 404; directory confirm with stale or future |
| `auth_time`; credential confirm with a stale session (a fresh intent is |
| written and the forced sign-in returns to `/operator/confirm` — no loop |
| @@ -549,3 +563,42 @@ nonce, cleared on consumption, reserved consumer refused by |
| `handleAssertion` (§4 step 3, §10.4); §10.4 additions (invalid nonce |
| ignored, cookie cleared). The `lagged-team` blank keys, PLATFORM timing and |
| Docs prefix preflight are applied in `team-provisioning-app.md` §6. |
| + |
| +**Round 4 (implementation, discussion 94).** Whole-code review of branch |
| +`operator-http` by Claude Fable 5.1 (claude-fable-5-1) at `2f1cac8`: CHANGES |
| +REQUIRED (narrow); the three blockers — registration admission equal to the |
| +registry reload's, a test of `retire-consumer`'s app scope, and this entry — |
| +are fixed on the same branch. Deviations from the text above, each with the |
| +review's ruling: |
| + |
| +1. The new tables live in their own migration sets, applied by |
| + `Runtime.ServingSchema()`; `Runtime.Schema()` and the frozen |
| + compatibility, admission and legacy-diagnostic profiles are unchanged, and |
| + the native command refuses a database carrying them (§5's restore |
| + sentence). **Accepted** — restore stays gated and platform 117 does not |
| + exist. The legacy diagnostic skips exactly this set, so a true mismatch is |
| + not hidden behind a standing false one. |
| +2. `consumers.app`, a compiled slug under a `CHECK`. **Accepted** (§7). |
| +3. §10.4's cross-role `plan_id` refusal is unbuildable; each confirm POST |
| + carries the id its GET showed and refuses any other. **Accepted** — the |
| + buildable half of round 2's ask, and tested. |
| +4. `baseline_attestation` stays in `initialize`'s signed input. **Accepted** |
| + (§5). |
| +5. A stale, future, Keymail-without-gesture or recovery session on the |
| + credential page is redirected to sign-in with the fresh intent rather than |
| + shown a refusal page; no window opens. **Accepted.** |
| +6. An open window makes a second confirm answer 409 until it expires. |
| + **Accepted** (§4). |
| +7. The role's own keys from `HOME_OPERATOR_MATERIAL`. **Accepted** (§3). |
| +8. `<role>.inspect` required in `actions`. **Accepted** (§3). |
| +9. `TestNoHandlerSetsItsOwnCSP` exempts `security.go`, whose |
| + `setConsumerPolicy` may only add one registered consumer to form-action. |
| + **Accepted.** |
| + |
| +**For a later amendment (design note, not a deviation):** |
| +`credential.retire-consumer` is app-scoped, not team-scoped — the credential |
| +role sees no labels — so a confirmed `retire-apps` window admits retiring any |
| +table consumer of those apps for any team, and the credential page cannot |
| +show Paul which. The mirror of `register-consumer`'s record derivation would |
| +be a directory-signed `disable` receipt. Weigh it before a second team |
| +exists. |