| index e8d0af6..ae8def9 100644 |
| --- a/docs/equipo-adoption.md |
| +++ b/docs/equipo-adoption.md |
| @@ -10,6 +10,8 @@ executed against production with writes during implementation. |
| - Land and deploy the reviewed Home `native/equipo-in-directory` change to |
| **both** `oficina` and `oficina-id`; verify their `X-Carlos-Version`. |
| - Land this Alta change and build `make adopt` on the operator Mac. |
| + Before deleting Home's source branch after a squash merge, re-pin Alta's |
| + test-only `homecompat` module to the Home merge commit and pass `make ci`. |
| - The separately implemented Equipo adoption contract below must be |
| deployed at `https://equipo.oficina.works`, with its existing instance, |
| storage and access policy preserved. Its native exchange must also be |
| @@ -78,6 +80,7 @@ prints no credentials. Do not run concurrently with another manifest edit. |
| ```sh |
| python3 - <<'PY' |
| import base64, json, subprocess |
| +from pathlib import Path |
| base = ['carlos', 'env'] |
| args = ['--account', 'oficina', '--app', 'oficina-id'] |
| text = subprocess.check_output(base + ['list'] + args, text=True) |
| @@ -94,15 +97,43 @@ if manifest.get('equipo') == origin: |
| print('Equipo already has the exact canonical env registration') |
| else: |
| assert len(manifest) < 16, 'Env registry is full' |
| + backup = Path.home() / '.oficina-id-consumers-before-equipo.b64' |
| + with backup.open('x', encoding='ascii') as saved: |
| + saved.write(values['HOME_CONSUMERS_BASE64'] + '\n') |
| + backup.chmod(0o600) |
| manifest['equipo'] = origin |
| encoded = base64.b64encode(json.dumps(manifest, separators=(',', ':')).encode()).decode() |
| subprocess.run(base + ['set'] + args + ['HOME_CONSUMERS_BASE64=' + encoded], check=True) |
| print('Added equipo -> https://equipo.oficina.works; restart the credential service') |
| PY |
| carlos restart --account oficina --app oficina-id |
| +curl --fail --silent --show-error -D - https://id.oficina.works/healthz |
| ``` |
| |
| -Re-run the two public checks. Expected: Equipo and Docs both 303 after the |
| +Expected health: 200 and `X-Carlos-Version` naming the reviewed Home release. |
| +The backup is public consumer metadata; the exclusive create prevents |
| +overwriting the previous manifest. If it already exists, inspect it before |
| +another attempt. Keep it until health and consumer checks pass. |
| + |
| +If this manifest change makes the credential service unhealthy, restore the |
| +saved value immediately (only if no intervening manifest edit occurred), |
| +restart, and check health before investigating. This rolls back the manifest |
| +change, not an adoption or deployment: |
| + |
| +```sh |
| +python3 - <<'PY' |
| +import base64, json, subprocess |
| +from pathlib import Path |
| +old = (Path.home() / '.oficina-id-consumers-before-equipo.b64').read_text().strip() |
| +assert isinstance(json.loads(base64.b64decode(old, validate=True)), dict) |
| +subprocess.run(['carlos', 'env', 'set', '--account', 'oficina', '--app', |
| + 'oficina-id', 'HOME_CONSUMERS_BASE64=' + old], check=True) |
| +PY |
| +carlos restart --account oficina --app oficina-id |
| +curl --fail --silent --show-error -D - https://id.oficina.works/healthz |
| +``` |
| + |
| +On success, re-run the two public checks. Expected: Equipo and Docs both 303 after the |
| process restarts. Home's native `assert` then accepts exactly |
| `https://equipo.oficina.works`, with no port, slash, suffix or case variants. |
| A complete native check still needs a real device grant and the deployed |
| @@ -137,7 +168,9 @@ this session, as the original adoption runbook requires. |
| |
| Expected status: the `oficina` team is seeded, the original six apps' |
| register steps are done, calendar has completed activation, and Equipo has |
| -no steps yet. If Equipo is already registered, skip Plan A below. If it is |
| +no steps yet. No `oficina` run may be `planned`, `running` or `parked`: |
| +finish or resolve it before opening another Plan A, which supersedes an |
| +unfinished run. If Equipo is already registered, skip Plan A below. If it is |
| already active, stop here: no repeat adoption is needed. |
| |
| Add the reviewed release's digest to `artifacts`, preserving every other |
| @@ -171,6 +204,8 @@ on other instances, team-mode config, unreviewed release, or an unexpected |
| operations response stops the run. Fix the reported cause, never remove the |
| gate or edit the journal. All Equipo config and release preparation belongs |
| before the first `configure`, which captures an immutable baseline. |
| +An unscoped `preflight` now includes Equipo and will refuse until its |
| +separate contract is deployed; use the explicit `--app equipo` above. |
| |
| ## 3. Register Equipo against the already seeded team |
| |