Adoption recipe: use 522 vd1 digests; record Plan 2 waiver
Paul ruled on 2026-11-16 (Home 103, platform 522) on two points. The observation recipe now names the 522 Plan 1 doors and fields the observer uses (GET /config, GET /config/effective, PUT with if_version and its receipt) and replaces random-key HMACs of secret plaintext with vd1: per-key digests over the sealed envelope, with the reason that is enough. 522 Plan 2 is waived for this Oficina adoption only. The gate's delivery evidence is a Paul-witnessed manual check per app after restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+87
−10
implementation/existing-team-adoption.md+87 −10
CI cancelled — superseded by a newer push — run details
diff --git a/implementation/existing-team-adoption.md b/implementation/existing-team-adoption.md| index ea44407..7e26c5a 100644 |
| --- a/implementation/existing-team-adoption.md |
| +++ b/implementation/existing-team-adoption.md |
| @@ -3,7 +3,8 @@ |
| Status: Home capability design approved by independent GPT-6 Astra, |
| 2026-11-02, after rollback, observation and scope revisions. Production |
| activation remains gated on the reviewed observation runner and confirmations. |
| -Base: d82341c. Implements agent-access task 5 and Home discussion 103. |
| +Base: d82341c. Amended 2026-11-16 for 522 Plan 1 digests and the Plan 2 |
| +waiver (see the observation recipe). Implements agent-access task 5 and Home discussion 103. |
| The six existing canonical instances need directory membership and routing |
| without creating replacement instances, changing their keys, or converting |
| @@ -103,27 +104,101 @@ The adoption runner must obtain two supported CARLOS snapshots, before any |
| configuration write and after the process adopts the intended configuration. |
| Each snapshot records account/app/instance ID, canonical alias and its |
| target, named/default environment identity, persistent storage identity, |
| -Home issuer/consumer ID, and the complete effective configuration. Secrets |
| -are held only in memory; the saved evidence contains a random-key HMAC-SHA256 |
| -commitment to each existing secret, so later comparison detects changed |
| -identity/data keys without printing or persisting their values. The HMAC |
| -key is kept with the run's encrypted operator journal, never in the report. |
| -The before snapshot is captured once, sealed before durable storage, and |
| -never rebaselined on retry. After must preserve every old setting except the |
| +Home issuer/consumer ID, and the complete effective configuration. |
| + |
| +The runner reads configuration only through carlos/platform 522 Plan 1 |
| +(spec `2026-11-02-config-receipts-design.md`, approved rev 6), under an |
| +account-owner `Operate` or `Admin` credential. The doors, all under |
| +`/api/cli/apps/{account}/{app}`: |
| + |
| +- `GET /config?environment=<name>` (omit `environment` for the default |
| + bundle). Returns the layer `version` (`cv1:` plus SHA-256 of the stored |
| + bytes; `none` for an absent layer) and, for every var, `key`, `kind` and |
| + `digest`. Plain vars also carry `value`; secrets never carry their |
| + envelope. |
| +- `GET /config/effective?host=<canonical host>`. Returns the three layer |
| + versions (`default`, `environment`, `overlay`) and the merged vars, each |
| + with `digest`, `from` and `shadows`. This is the snapshot of the complete |
| + effective configuration and shows if a higher layer covers a key. It shows |
| + stored layers only, not an exec route's `<host>.env` file. |
| +- `PUT /config` with `if_version` set to the baseline layer version, |
| + setting only `AGENT_ISSUER` and `AGENT_TEAM`. Answers with a `receipt`: |
| + `version_before`, `version_after`, `changed`, exact `set`, `unset`, |
| + `unset_absent`, and `digests` for the keys just set. The console must |
| + support atomic conditional puts (S3); otherwise it refuses `if_version` |
| + with 400 and the runner stops. A 412 is a refusal with nothing written. |
| + `if_version` is one non-empty JSON string in the body; there is no |
| + `If-Match`, and it cannot be combined with `exec_delivery`. |
| + |
| +Preservation is proved with 522's `vd1:` per-key digests, not with |
| +HMACs of secret plaintext. A `vd1:` digest is SHA-256 over a var's stored |
| +kind, value, sealed envelope and sealed-to fingerprint. For a secret the |
| +input is the sealed envelope, so the digest says nothing about the plaintext, |
| +and the runner never holds or hashes any secret plaintext. This is sufficient |
| +because the question the gate asks is "has this key changed since the |
| +runner observed it", not "does it equal a value the runner holds". Any write |
| +to an identity or data key stores a new envelope and so a new digest; an |
| +unchanged digest means those stored bytes were not written. Sealing is |
| +randomised, so even re-setting the same plaintext reads as a change, and the |
| +check fails closed. The cost is that the runner cannot confirm that the |
| +stored key is the right key, only that it is the one it first saw. The |
| +before snapshot establishes which key that is, and adoption does not claim |
| +more. Digests of plain vars are as sensitive as their values, since they |
| +let someone test a guess; they stay in the operator journal and are not |
| +pasted into reports or tickets. |
| + |
| +The baseline is the before snapshot's per-key digests and layer versions. |
| +It is captured once, sealed before durable storage, and never rebaselined on |
| +retry. The write and every retry follow 522 spec §4.7. After a 200, require |
| +the receipt's `set` to be exactly `AGENT_ISSUER` and `AGENT_TEAM`, `unset` |
| +empty, and each receipt digest equal to the digest of what was sent. After a |
| +lost answer or a 412, read again and take the first matching branch: all |
| +preserved digests equal the baseline and the new keys equal what was sent |
| +(landed, done); preserved equal and new keys absent (retry with the version |
| +just read); any preserved key changed or gone (stop); new keys partly |
| +present or with another digest or kind (stop and report, do not overwrite). |
| +The after snapshot must preserve every old setting's digest except the |
| explicitly enumerated AGENT_ISSUER and AGENT_TEAM additions. No TEAM_* |
| setting may be active before or after; no instance creation or storage swap. |
| +The 522 receipt and digests describe the stored layer. They do not show that |
| +the process has them; see the delivery evidence below. |
| Compute environment_binding as base64url SHA256 of a canonical JSON array: |
| context `oficina/existing-app-observation/v1`, exact account/app/instance, |
| environment and storage identities, canonical alias target, sorted before |
| -configuration entries with secret HMACs, sorted after entries with secret |
| -HMACs, actual team SQID, connection issuer, reviewed artifact SHA256, and |
| +configuration entries with their `vd1:` digests, sorted after entries with |
| +their `vd1:` digests, the layer versions of each snapshot, actual team SQID, connection issuer, reviewed artifact SHA256, and |
| observed version. Require the canonical HTTPS /api/version body and |
| X-Carlos-Version to equal that reviewed version, without redirects, and |
| /healthz success. Fetch the existing credential manifest digest through the |
| verified adoption registration result. The signed activation retains these |
| digests and the current bounded verification attempt. |
| +#### Delivery evidence: 522 Plan 2 waived for this adoption |
| + |
| +522 Plan 2 (evidence from the running instance that it has the stored |
| +configuration) is not built. Paul ruled on 2026-11-16 (oficina/home |
| +discussion 103 and carlos/platform 522) that it is waived for this Oficina |
| +existing-team adoption only. It is not a precedent for any other adoption, |
| +which still needs Plan 2 or its own ruling. Nothing else in the gate is |
| +waived: Plan 1 snapshots, digests, receipts and the negative checks below |
| +still apply. |
| + |
| +In its place, delivery evidence is a manual check per app, witnessed by Paul, |
| +after the app restarts with the new configuration: |
| + |
| +- `/api/version` body and `X-Carlos-Version` are unchanged from the before |
| + snapshot, with no redirect. |
| +- `/healthz` succeeds. |
| +- Sign-in still works. |
| +- `GET /api/v1/operations` moves from 404 to 401 or 200, which shows that |
| + the app now runs the delegated-access code with the new configuration. |
| + |
| +The runner records, per app, Paul's confirmation and the observed values as |
| +part of the signed observation. Production activation of an app is blocked |
| +until its check is witnessed and recorded. The runner may not attest it |
| +on its own. |
| + |
| The runner additionally checks that a real Home member lacking local app |
| permission remains refused, and that revoking directory membership refuses |
| an existing delegated connection without removing normal local access. |
| @@ -170,6 +245,8 @@ attest observations; that trust is explicit and bounded by confirmation. |
| demonstrate old-reader incompatibility after activation and verify the |
| forward-compatible rollback build. Observer rejects changed storage, |
| identity keys, agent team, TeamMode and version body/header mismatch. |
| +- Per app, Paul's witnessed post-restart check (version body/header, healthz, |
| + sign-in, /api/v1/operations 404 to 401/200) recorded in place of 522 Plan 2. |
| - Independent source/evidence review, meaningful adverse mutations, full |
| required CI, deployed isolated canary and exact canonical version checks. |