carlos / platform Public

offline-move-runbook: the operator runbook for offline moves with stage

Rewrites the v0.28.5 roll-and-first-moves runbook as the current runbook
for an operator offline move on v0.28.7 or later, with the pre-copy
(carlos move offline stage), and renames it to
docs/superpowers/plans/2026-10-21-offline-move-runbook.md.

Folds in what the moves of 2026-10-20 and 2026-10-21 taught: harness
Runs 9 and 10 (M2-M15), the dev rehearsals on v0.28.6 and v0.28.7, and
the flagship moves without and with stage. New: logging discipline
(write as it runs, ABOUT TO RUN before each door, status first after a
restart), target pre-checks (the stale /opt/carlos/live link that failed
a flip, /data leftovers, route, parked dir, UK prefixes, capabilities,
disk, switches), staging until caught up and once more before start,
doors judged by exit code with real timings, client-measured downtime,
the row fingerprint, finish, the nesting stop, replica cleanup by exact
key keeping lock.json, rollback (abort before open, no move back after),
and the known gaps (#339, #338, root-owned leftovers). The roll sections
give way to pointers at the release notes, and a history section records
the v0.28.5 and v0.28.6 rolls and the first moves. Docs only; no tenant
names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev aafb67dd5ee63d2be8a813e28b65c8fd922b102f parent 040b95c
2 files changed, +894 −1,414
  • docs/superpowers/plans/2026-10-20-v0.28.5-roll-and-first-moves.md +0 −1,414
  • docs/superpowers/plans/2026-10-21-offline-move-runbook.md +894 −0

CI passed — run details

diff --git a/docs/superpowers/plans/2026-10-20-v0.28.5-roll-and-first-moves.md b/docs/superpowers/plans/2026-10-20-v0.28.5-roll-and-first-moves.md
deleted file mode 100644
index ada910244..000000000
--- a/docs/superpowers/plans/2026-10-20-v0.28.5-roll-and-first-moves.md
+++ /dev/null
@@ -1,1414 +0,0 @@
-# Rolling v0.28.5 to dev and flagship, and the first offline moves: operator runbook
-
-Written 2026-10-20 for Paul, attended. Docs only: this file runs nothing and authorizes nothing. Every step that writes to a real box, bucket or account sits behind a line that starts **Paul's go**. Steps without one are read-only.
-
-Sources: the harness rehearsal (`platform-harness-build`, `harness/RUNLOG.md`, "Run 9: v0.28.5 roll" to the end, with "Run 9 corrections" R9-1 to R9-4 and M1 to M10); the dev claim runbook (`claim-dev-cohort1-runbook` @ 5860108f in `platform-cohort1`, called "the claim runbook" below); the README "Releasing the platform" and "Checking dev"; the offline move plan's "Morning runbook outline" (`2026-10-20-offline-operator-move.md`, unedited; M1 to M10 are applied here, not there); the roll recipe and roll order notes; the read-only flagship reports of 2026-10-20 (`own/after236/`); the release artefacts in `~/.cache/release-v0.28.5/`.
-
-Conventions:
-- Harness names map to dev's: kathleen-juggling is leo-climbing (leo), ada-letterpress is sophie-knitting (sophie, the console box), noor-marquetry is dennis-stenciling (dennis). Harness "v0.28.6" is the real v0.28.5; harness "v0.28.5" played dev's v0.28.4.
-- `STOP` means: do nothing else, keep the evidence, tell Paul. Nothing is retried in place unless the step says so.
-- A block marked "DOCS-T1" runs on the operator's shell. A block marked "on sophie" (and so on) runs as root on that box, either through `ssm.sh` (Appendix A) or in an attended root shell, as each step says.
-- Scratch lives in `$TMPDIR/v0285` and is removed by exact path at the end (section 5). Nothing here starts a server or a background process.
-- Never print a secret. Key checks print a presence flag and the first 16 hex digits of a SHA-256, never the value.
-
----
-
-## 0. Status and gates
-
-### 0.1 The release
-
-| Fact | Value |
-|---|---|
-| Tag | `v0.28.5` (tag object `7619729d29513e9d2220aa95ec93f0767ea1d61e`) |
-| Commit | main `54ae7fb93820f37f123bbdcbcb57f4f2efb25dc9` (short `54ae7fb9`); `~/.cache/release-v0.28.5/src` is a clean detached checkout of it |
-| State | published and latest (GitHub release, signature verified publicly, Homebrew tap, apt `v0.28.5-1`). Rolled nowhere |
-| Signed sums | `SHA256SUMS.txt` sha256 `42f267f076699253da94d5279fa9d06a2fb4ee6e51540c360bd5a63845b30b25` (the public download is byte-equal to `~/.cache/release-v0.28.5/dist/`, checked 2026-10-20); `.sig` sha256 `7983502bb45cc58ace79bbb33c3896fa6cfa02157f9159a1dc56dae57fd85899` |
-| Router (linux-arm64) | `carlos-linux-arm64` `858342a3202aa5a5bbac2b8404b0a6c47a8414fe4af514d78809c2e6412a968b` |
-| Operator CLI (linux-amd64) | `carlos-linux-amd64` `505dfc4ffc5eb5fd6ff437d37468a3238a43e4bf2b3d4bfc4a838326a92dec0b` (equals `~/.local/bin/carlos`, which prints `carlos v0.28.5`) |
-| Prebuilt console | `~/.cache/release-v0.28.5/console-linux-arm64`, sha256 `3ad7ab50b0adb736c5cace95e82fd9687869185499a5ad3cd87b2028a4ac3c9c`, 47317154 bytes, `version.Build=v0.28.5`. Use this exact file; never rebuild it and never run it |
-| Console ship version `CV` | `54ae7fb9` |
-| Release notes | `~/.cache/release-v0.28.5/NOTES.md` (approved). Flagship is on v0.28.0, so the operator notes of v0.28.1 to v0.28.4 apply too (section 3.1) |
-
-### 0.2 The harness rehearsal (Run 9, 2026-10-20)
-
-Harness host `i-06a1ec144aa5226fb`; the build is 54ae7fb9 plus the harness patch (`b2f1ad8f...`), stamped v0.28.6. Snapshots `pre-0285`, `e-refused-0285`, `post-0285`, `pre-move-r9`. Evidence: `harness/evidence/run9/`.
-
-| Part | Result | Run ID and time (UTC) |
-|---|---|---|
-| (a) signing session, C2 first | PASS | session `cohort1-20261020T161315Z`, 16:13:09 to 16:13:46 |
-| (b) leo by the ruled re-arm | PASS | 16:19:47 to 16:23:32 (apply 19 s, edge restarted 16:20:21) |
-| (c) dennis by normal `system update` | PASS | 16:23:40 to 16:23:58 |
-| (d) sophie's router by the re-arm on canary | PASS | 16:30:36 to 16:33:24 |
-| (e) sophie's guarded console by `install-console` | FAIL (defect 5) at 16:33:34; passes by E1 | E1 at 16:35:14 |
-| (f) the dev check | PASS on the console box; leo's pinned check differs from the README (R9-1) | 16:35:36 |
-| Normal road to the next release | PASS, no hand step | 16:38:08 to 16:48:26 |
-| Offline move of a flagship-shaped app, sophie to dennis | PASS: 366 s offline, about 23 s of steps | 17:20:31 to 17:31:01 |
-| Abort after flip | PASS: back serving in 23 s, nothing lost | 17:32:49 to 17:33:13 |
-| Post-open nesting | PASS at the 1-hour grace, a 24 s second stop | 18:26:40 |
-
-Roster revision in Run 9: 9 to 10 to 11 for leo's roll, 11 to 12 to 13 for sophie's, 13 to 15 for the normal road (C4 holds).
-
-### 0.3 Known blockers and pending fixes
-
-| Item | What it is | What this runbook does about it |
-|---|---|---|
-| Defect 5 (blocks 1.e) | `system claims install-console` refuses to replace an installed protected console (`activation_artifacts_linux.go:359-360`, `consoleSlotHolds`), dry run included | E1, the attended recovery ruled by platform-1c, for v0.28.5 only. `install-console --upgrade` (platform-1c, in progress) retires it |
-| Defect 6 (section 2, 4) | Config sync never retries a `config.env` write that failed because the nested instance directory did not exist yet (`agent.go:1349-1356`). A new nested instance can run without its settings for up to about 70 minutes | M5: check `config.env` before the first wake, and force a new bundle generation on the rehearsal apps only |
-| Defect 7 (sections 2, 4) | `flip` and `open` refuse for most of each moves-pass cycle: the doors trust a box report for 2 minutes, boxes rewrite theirs only on a door-triggered pass or every 5 to 6 minutes (`apiinstancemove_offline.go:57`, `agent.go:3262`). `flip` then says "still runs a process", which is the wrong sentence for a stale report | M2: run `flip` and `open` straight after the previous door, or retry every 15 s. Budget: about 6 minutes offline today, under 1 minute once fixed |
-| Defect 8 (sections 2, 4) | After `open`, the source box's scheduler re-creates the parked instance's `<host>.env` in `/data/.instances/<host>/` (`schedule_wiring.go:154-180`) | M6: check after `finish`; move the file into the park directory, never delete it |
-| Fixes | 6, 7 and 8 are being fixed for a later release. Paul has been asked about them | The moves below are run on v0.28.5 as it is |
-
-### 0.4 What the harness could not show
-
-- Real IAM. MinIO users are read-write, so the staging-lane checks (P0.4) prove reachability, not the IAM statements.
-- The real store backend (AWS IAM users under a boundary). Run 9 bound the store as app settings (H18); the dev rehearsal here uses `carlos store create`.
-- Real SSM, real DNS and EIPs, the real signing host, and real scale (the flagship ie box has 118 instance slices).
-- Instances as large as the customer's. Run 9 moved 4 MB. The customer's nested directories are 20M, 538M and 308M (section 4.0).
-
-### 0.5 The go register
-
-| Go | Step | What it writes |
-|---|---|---|
-| G1 | 1.a.3 open the signing session | an IAM role, profile, security group and instance in the dev account; reads the release key |
-| G2 | 1.a.2 console ship and promote (C2) | dev bucket `apps/bab/console/`, `canary/console` pointer; sophie stages the build |
-| G3 | 1.a.4 `publish-identity` | one create-only object, `control/system/router/releases/v0.28.5.json` (cannot be replaced) |
-| G4 | 1.b leo re-arm | promotes `router/stable`; leo applied by hand; dennis rolls from the same promote |
-| G5 | 1.d sophie re-arm | promotes `router/canary`; sophie applied by hand |
-| G6 | 1.e E1 | stops the dev console for about a minute and replaces its protected binary |
-| G7 | 2.2 rehearsal apps | two apps, a store and records in the dev account |
-| G8 | 2.3 the rehearsal move | `start` to `finish` on `moverehearsal` |
-| G9 | 2.6 the abort rehearsal | `start` to `abort` on `rollbackrehearsal` |
-| G10 | 2.8 remove E1's aside directory | one exact directory on sophie |
-| G11 | 3.2 flagship boxes | `carlos system update` on the stable channel |
-| G12 | 3.4 `bootstrap/carlos` copy | only if status asks for it |
-| G13 | 3.5 flagship console | `roll-console.sh <checkout> flagship` |
-| G14 | 4.1 moves unfrozen (D8) | a decision, no write |
-| G15 | 4.2 the return lane | UK's staging grant on the IE data bucket (infra) |
-| G16 | 4.5 canada | one move |
-| G17 | 4.5 ips | one move |
-| G18 | 4.5 kpmg | one move |
-
-### 0.6 The order, and why
-
-Dev boxes, then the dev console, then check dev, then the dev rehearsal, then flagship boxes, then the flagship console, then the moves (the roll order ruling of 2026-10-13: dev first, boxes before their console). Within dev, the console shipped to `canary/console` (C2) comes first because `publish-identity` reads it, and `publish-identity` comes first because, once a floor is published (dev's is, since 2026-10-19), every console-driven update reserves itself in the signed roster and resolves the release's identity by tag (`reserveHostUpdate`).
-
-The third-party deployment is never rolled from here.
-
-### 0.7 Common values
-
-On DOCS-T1:
-
-```bash
-export TAG=v0.28.5 CV=54ae7fb9
-export REL=$HOME/.cache/release-v0.28.5
-export CONSOLE_ART=$REL/console-linux-arm64
-export PINFRA=$HOME/amadan.net/carlos/platform-infrastructure
-export DEVC=https://platform.dev.carlosframework.com DEVB=carlos-dev-640012953448
-export LEO=i-046c7fe43620944bc SOPHIE=i-05498eada6f0afd23 DENNIS=i-009d593f451cfd562
-export FLAGC=https://console.carloku.com FLAGB=carlos-flagship-271376211898
-export FIE=i-092c0c1eea75723cb FUS=i-0ed0641d8e476f1b8 FUK=i-03c310ceaf50a9bab FAU=i-022288023f5e7496d
-export W=$TMPDIR/v0285; mkdir -p "$W"
-export EVID=$REL/evidence-roll-20261020; mkdir -p "$EVID"
-```
-
-| Deployment | Profile | Bucket | Console | Boxes |
-|---|---|---|---|---|
-| dev | `kass` | `carlos-dev-640012953448` | `https://platform.dev.carlosframework.com` | leo `i-046c7fe43620944bc` (eu-west-1, stable, armed); sophie `i-05498eada6f0afd23` (eu-west-1, canary, armed, console box); dennis `i-009d593f451cfd562` (eu-west-2, region `uk`, stable, unarmed) |
-| flagship | `keymail` | `carlos-flagship-271376211898` | `https://console.carloku.com` (the same console as `platform.carlosframework.com`) | ie `i-092c0c1eea75723cb` (eu-west-1, the console box, `annie-welding`); us `i-0ed0641d8e476f1b8` (us-east-1); uk `i-03c310ceaf50a9bab` (eu-west-2); au `i-022288023f5e7496d` (ap-southeast-2) |
-
-Helpers (`ssm.sh`, `leo`, `sophie`, `dennis`, `fie`, `fuk`, `rosterview`, `box_inspect`) are in Appendix A. Set them up now.
-
-### 0.8 Pre-flight, read-only (DOCS-T1)
-
-Verify the release from the public side, as the README does:
-
-```bash
-D=$(mktemp -d "$TMPDIR/v0285-pub.XXXXXX"); cd "$D"
-rel=https://github.com/carlosframework/releases/releases/download/$TAG
-curl -sSLO $rel/SHA256SUMS.txt
-curl -sSLO $rel/SHA256SUMS.txt.sig
-curl -sSLO $rel/carlos-linux-arm64
-printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00' > pub.der
-echo 'R+EO3qQ47VsuKl9Qq/pkDXBucPYvzp5lU2ut4zpnJPc=' | base64 -d >> pub.der
-base64 -d SHA256SUMS.txt.sig > sig.bin
-openssl pkeyutl -verify -pubin -inkey pub.der -keyform DER -rawin -in SHA256SUMS.txt -sigfile sig.bin
-sha256sum -c --ignore-missing SHA256SUMS.txt
-sha256sum SHA256SUMS.txt SHA256SUMS.txt.sig
-cmp SHA256SUMS.txt "$REL/dist/SHA256SUMS.txt" && echo sums-equal
-grep ' carlos-linux-arm64$' SHA256SUMS.txt
-sha256sum "$CONSOLE_ART"
-grep -c 3ad7ab50 SHA256SUMS.txt
-go version -m "$CONSOLE_ART" | grep -o 'internal/version.Build=[^ "]*'
-sha256sum "$(command -v carlos)"
-carlos version
-curl -sS https://apt.carlosframework.com/latest.txt
-cd "$W"
-```
-
-Pass: `Signature Verified Successfully`; `carlos-linux-arm64: OK`; the two sha256 lines equal 0.1's; `sums-equal`; the router line is `858342a3...968b`; the console sha256 is `3ad7ab50...3c9c` and `grep -c` prints `0` (the console is not in the sums, as for v0.28.4); `Build=v0.28.5` once; the CLI sha256 is `505dfc4ffc5eb5fd6ff437d37468a3238a43e4bf2b3d4bfc4a838326a92dec0b`; `carlos v0.28.5`; `v0.28.5`. Keep `$D` until the signing session has its copies (1.a.3), then remove it by exact path.
-
-Sign in to the two consoles (Paul at the keyboard; the roll commands need saved logins):
-
-```bash
-carlos system status --console "$DEVC"
-carlos system status --console "$FLAGC"
-```
-
-Pass: a table of boxes, not a login prompt or a 401. If either asks for a login, Paul runs `carlos auth login --console <console>` himself.
-
----
-
-## 1. Dev roll
-
-### 1.0 Before anything (read-only)
-
-```bash
-carlos system status --console "$DEVC"
-leo '/opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1; systemctl is-active carlos-system-update.path; ls /opt/carlos/system/guard/identities'
-sophie '/opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1; systemctl is-active carlos-system-update.path; ls /opt/carlos/system/guard/identities'
-dennis '/opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1; systemctl is-active carlos-system-update.path; ls /opt/carlos/system/guard 2>&1 | head -2'
-rosterview
-```
-
-Pass:
-- all three boxes `current` at v0.28.4;
-- leo and sophie: `carlos v0.28.4` twice, path unit `active`, identities `v0.28.4.json` (and older ones);
-- dennis: `carlos v0.28.4`, `.prev` `carlos v0.28.3`, `active`, no guard directory;
-- `rosterview` prints `{"rev":<N>,"activations":[]}`. Write N down as `REV0` (9 at the end of the claim runbook's step 7). A held activation (`activations` not empty) is a STOP: promote and rollback of stable are refused until it is released.
-
-Sophie's console mail check, the claim runbook's "P9. Sophie's console has console mail off", run as written (Appendix A saves its box command as `$W/p9.box.sh`): `sophie "$(cat "$W/p9.box.sh")"`. Pass: the last line is `console mail: OFF (none of the 7 names is set)`. Any `SET` line is a STOP.
-
-The dev console's state, for the rollback record:
-
-```bash
-curl -sI "$DEVC/healthz" | grep -i -E '^(HTTP|x-carlos-version)'
-sophie 'p=$(systemctl show -p MainPID --value console.service); echo "pid $p"; readlink /proc/$p/exe; sha256sum < /proc/$p/exe | cut -c1-16; tr "\0" "\n" < /proc/$p/environ | grep "^CARLOS_HOST_CLAIM="'
-```
-
-Record the `x-carlos-version` (the claim runbook saw `f3bf1214` at the pause on 2026-10-19), the pid and the sha. `CARLOS_HOST_CLAIM=` must be empty.
-
-The wakecheck baseline: `curl -sS -w '\n[%{http_code}]\n' https://wakecheck.dev.carlosframework.com/` and record `hits=`.
-
-The claim runbook's "pre-roll emptiness check for the roster-binding fix" is not part of this roll: it applies to the release that carries the binding fix (v0.28.6 or later), not to v0.28.5.
-
-### 1.a Signing session: publish-identity (C2 first)
-
-#### 1.a.1 Read-only checks before the console ship (the claim runbook's 5.0a item 1)
-
-```bash
-dev() { AWS_PROFILE=kass AWS_REGION=eu-west-1 CARLOS_DEPLOYMENT_BUCKET=$DEVB "$@"; }
-aws --profile kass s3 ls "s3://$DEVB/apps/bab/console/channels/"
-dev carlos channels --app console --account-id bab
-aws --profile kass s3 ls "s3://$DEVB/apps/bab/console/releases/$CV/"
-dev carlos channels digests --account-id bab
-```
-
-Pass: exactly one key, `canary/console.json`; `canary/console f3bf1214 ... yes` (the rollback version); the `releases/54ae7fb9/` listing is empty (exit 1); `pointer digests: on for bab since 2026-10-18T10:11:25Z` and no `written after digests were turned on` row. If `releases/54ae7fb9/` already holds objects, STOP and ask.
-
-#### 1.a.2 Ship and promote the prebuilt console (C2)
-
-> **Paul's go: G2.** Writes `apps/bab/console/releases/54ae7fb9/` and moves `canary/console` in the dev bucket. Sophie stages the build at `/opt/carlos/versions/54ae7fb9/console`. Sophie's console is guarded, so the running console stays the protected v0.28.4 build (Run 9: pid 308 before and after C2). Rollback: `carlos promote -app console f3bf1214 canary/console` with the release key, as 5.0a's "Rollback" block.
-
-```bash
-CARLOS_BIN=$(command -v carlos) "$PINFRA/scripts/ship-app.sh" kass "$DEVB" console "$CV" canary/console binary "$CONSOLE_ART"
-dev carlos channels --app console --account-id bab
-dev carlos channels digests --account-id bab
-sophie 'S=/opt/carlos/versions/54ae7fb9/console; stat -c "%n %U:%G %a links=%h size=%s" $S; sha256sum $S; systemctl is-active console.service; echo pid $(systemctl show -p MainPID --value console.service)'
-curl -sI "$DEVC/healthz" | grep -i -E '^(HTTP|x-carlos-version)'
-```
-
-Expected: `shipped console 54ae7fb9 (1 artifacts)` then `promoted console 54ae7fb9 -> canary/console`; `canary/console 54ae7fb9 ... yes`; no `console canary/console` row in the digests listing; the staged file is `root:root 755 links=1 size=47317154` with sha256 `3ad7ab50...3c9c` (allow up to a minute for the stage); `console.service` active. The pid should be the one recorded in 1.0; if the console restarted, it is still running the old protected binary (confirm with the exe sha from 1.0) and healthz is 200. Any other sha256 on the staged file is a STOP.
-
-Do this before the session opens: the release key reads of the session are counted from its start time.
-
-#### 1.a.3 Open the signing session
-
-> **Paul's go: G1.** Creates the signer host (`signing-host.md`, "Create") and reads `/carlos/release-key` onto its tmpfs.
-
-Follow the claim runbook's "The signing session" order of work and `signing-host.md` ("Create", "Getting jq and the carlos CLI there", "Getting the key there"), with these v0.28.5 values:
-- The role's inline policy: `WriteIdentity` names exactly `arn:aws:s3:::carlos-dev-640012953448/control/system/router/releases/v0.28.5.json`. Run the policy check line from "Create" with `v0.28.5` in place of `v0.28.4`. The other statements are as widened on 2026-10-19 (`ReadControl` includes `status/consoles/dev-console.json`).
-- Tools, verified on DOCS-T1 before upload: the router `carlos-linux-arm64` `858342a3...968b` from the public download in `$D` (0.8), jq 1.7.1 `4dd2d8a0661df0b22f1bb9a1f9830f06b6f3b8f7d91211a1ef5d7c4f06a8b4a5`. Upload to `s3://carlos-dev-640012953448/claim-signer/<run-id>/` with `aws s3 cp`: the CLI, jq, `SHA256SUMS.txt` and `SHA256SUMS.txt.sig` exactly as downloaded, `release.pub` (from leo's `CARLOS_RELEASE_PUBKEY`; its sha256 prefix is `960d03ff`), and `helpers.sh`.
-- `<run-id>` is `v0285-` and the UTC date and time. Record the session start time (`date -u +%FT%TZ`) before the key fetch.
-- `helpers.sh` is the claim runbook's 5.1 first helper block (`CARLOS=/usr/local/bin/carlos`, `KEY=/run/claim-signer/release.key`, no `AWS_PROFILE`) followed by 6.1's `phase_out`, both extracted verbatim.
-
-Session checks on the signer: both `sha256sum -c` lines `OK`; `carlos v0.28.5`; `jq-1.7.1`; no swap; `/run` is tmpfs; `/usr/local/bin/carlos system claims help` matches the text quoted in the claim runbook (the v0.28.5 build prints it unchanged: `inspect`, `run [--out FILE]`, `install-console`, and the last line about `--out`); the key file is `root 600 1 45`. A mismatch on any is a STOP.
-
-Then `refresh` on the signer and expect `REV` equal to `REV0` with `activations` empty. No phase has run.
-
-#### 1.a.4 publish-identity
-
-> **Paul's go: G3.** One create-only write of `control/system/router/releases/v0.28.5.json`. A wrong identity can never be replaced; it would need a new release tag. Check every value below before the apply.
-
-On the signer, in `/root/claim-trial`:
-
-```bash
-CV=54ae7fb9
-jq -n --rawfile sums SHA256SUMS.txt --rawfile sig SHA256SUMS.txt.sig --arg cv "$CV" \
- '{identity:{release_tag:"v0.28.5",moves_protocol:1,sha256sums:$sums,sha256sums_sig:$sig,
- console:{account:"bab",app:"console",channel:"canary/console",version:$cv}}}' > identity-phase.json
-phase_out publish-identity identity-phase.json /root/claim-trial/identity.v0.28.5.json publish-identity-result.json
-jq '{identity_key, release}' publish-identity-result.json
-jq -er .output_sha256 publish-identity-result.json
-```
-
-Run the dry run on its own first (the claim runbook's 6.1 does) and check it field by field. Expected:
-- the dry run, then the apply, succeed; `writes` lists one create-only put (`before_etag` empty) of `control/system/router/releases/v0.28.5.json`;
-- `release.version` and `release_tag` `v0.28.5`, `moves_protocol` `1`;
-- `artifacts.linux-arm64.sha256` is `858342a3202aa5a5bbac2b8404b0a6c47a8414fe4af514d78809c2e6412a968b` (the sums' router line);
-- `console_artifacts.linux-arm64.sha256` is `3ad7ab50b0adb736c5cace95e82fd9687869185499a5ad3cd87b2028a4ac3c9c` (the prebuilt console, read through the pointer's signed digest, manifest and artefact, whose `version.Build` is `v0.28.5`);
-- `channel stable`, `spread 0s`, `source release:v0.28.5` (as for v0.28.4).
-
-Any other value is a STOP. Run 9 passed this as one create-only write of `control/system/router/releases/v0.28.6.json` at 16:13Z, REV 9.
-
-Then, on DOCS-T1, fetch the published object and compare it with the signer's file:
-
-```bash
-aws --profile kass s3 cp --quiet "s3://$DEVB/control/system/router/releases/$TAG.json" "$W/identity.$TAG.json"
-sha256sum "$W/identity.$TAG.json"
-```
-
-The sha256 must equal the signer's `output_sha256`. The roll commands below need nothing else from the signer, so close the session now (1.a.5). If Paul prefers to keep it open through the roll, `refresh` on the signer replaces `rosterview`; the key then stays on the host longer.
-
-#### 1.a.5 Close the signing session
-
-No go needed. The claim runbook's "Closing the signing session": on the signer `shred -u /run/claim-signer/release.key && rmdir /run/claim-signer`; from DOCS-T1 terminate the instance, remove the exchange objects by exact key, delete the role, instance profile and security group; then the CloudTrail check with the session start time. Pass: every `GetParameter` on `/carlos/release-key` since the start comes from `assumed-role/carlos-claim-signer/<the signer's instance id>`, there are as many as key fetches, no signer instance is listed, `get-role` says `NoSuchEntity`. Anything else is reported on #250 before any further step. Then `rm -r "$D"` (the public-download directory, by exact path).
-
-### 1.b Leo by the ruled re-arm
-
-Why not `system update`: leo's installed v0.28.4 updater reads a candidate's stderr as part of the answer and refuses every candidate on an armed box. The release carries the stdout-only fix (8a313548), which helps once installed. This road is for the v0.28.4 to v0.28.5 step only; a box on v0.28.5 takes the next release through its own updater (R9-2; Run 9's normal road, 16:38 to 16:48Z).
-
-Set up the box script on DOCS-T1. It is the claim runbook's G4 recovery as a box script, from Run 9's `rearm-strict.leo.sh` with one change: the real box has no file pushed to it, so step 4 copies the agent's fetched cache to `/root/carlos-v0.28.5`, and the checks against both signed values make the source irrelevant.
-
-```bash
-SUMS_SHA=$(grep ' carlos-linux-arm64$' "$REL/dist/SHA256SUMS.txt" | cut -d' ' -f1)
-IDENT_SHA=$(aws --profile kass s3 cp --quiet "s3://$DEVB/control/system/router/releases/$TAG.json" - | python3 -I -c '
-import json,sys,base64
-d=json.load(sys.stdin)
-if "payload" in d and isinstance(d["payload"],str): d=json.loads(base64.b64decode(d["payload"]))
-c=d.get("current") or d.get("release") or d
-print(c["artifacts"]["linux-arm64"]["sha256"])')
-echo "SUMS_SHA=$SUMS_SHA IDENT_SHA=$IDENT_SHA"
-test "$SUMS_SHA" = "$IDENT_SHA" && test "$SUMS_SHA" = 858342a3202aa5a5bbac2b8404b0a6c47a8414fe4af514d78809c2e6412a968b && echo values-agree
-cat > "$W/rearm.box.sh" <<'EOF'
-set -euo pipefail
-TAG=__TAG__; SUMS_SHA=__SUMS_SHA__; IDENT_SHA=__IDENT_SHA__
-case "${1:-}" in
-stop)
- systemctl stop carlos-system-update.path
- systemctl show carlos-system-update.path -p ActiveState
- ;;
-apply)
- for i in $(seq 1 120); do [ -f "/data/system/router/$TAG/carlos" ] && break; sleep 5; done
- if [ -f "/data/system/router/$TAG/carlos" ]; then echo "cache: fetched by the agent"; else echo "cache: MISSING, staging by hand is needed"; exit 3; fi
- test "$(sha256sum < "/data/system/router/$TAG/carlos" | cut -d' ' -f1)" = "$IDENT_SHA"
- install -m 0700 -o root -g root "/data/system/router/$TAG/carlos" "/root/carlos-$TAG"
- test "$(stat -c '%U:%G %a %h' "/root/carlos-$TAG")" = 'root:root 700 1'
- H=$(sha256sum < "/root/carlos-$TAG" | cut -d' ' -f1)
- test "$H" = "$SUMS_SHA"
- test "$H" = "$IDENT_SHA"
- echo "staged /root/carlos-$TAG $H = signed sums = identity"
- systemd-run --wait --pipe -p EnvironmentFile=-/etc/carlos/host.env -p UMask=0022 "/root/carlos-$TAG" system apply
- cat /opt/carlos/system/router/applied.json; echo
- cat /opt/carlos/system/router/result.json; echo
- grep -q '"outcome": "applied"' /opt/carlos/system/router/result.json
- test "$(grep -o '"version": "[^"]*"' /opt/carlos/system/router/applied.json)" = "\"version\": \"$TAG\""
- ls -la /opt/carlos/system/guard/identities; test -f "/opt/carlos/system/guard/identities/$TAG.json"
- echo "completed.json: $(cat /opt/carlos/system/guard/completed.json)"
- sleep 3
- P=$(systemctl show -p MainPID --value carlos-edge.service)
- test "$(sha256sum < /proc/$P/exe | cut -d' ' -f1)" = "$IDENT_SHA" && echo "edge pid $P exe = the release"
- systemctl show carlos-edge.service -p NRestarts -p ActiveState -p ExecMainStartTimestamp
- test "$(systemctl show -p NRestarts --value carlos-edge.service)" = 0
- /opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1
- systemctl start carlos-system-update.path
- systemctl show carlos-system-update.path -p ActiveState
- shred -u "/root/carlos-$TAG"; test ! -e "/root/carlos-$TAG" && echo "shredded /root/carlos-$TAG"
- ;;
-esac
-EOF
-sed -e "s/__TAG__/$TAG/" -e "s/__SUMS_SHA__/$SUMS_SHA/" -e "s/__IDENT_SHA__/$IDENT_SHA/" "$W/rearm.box.sh" > "$W/rearm.ready.sh"
-```
-
-Pass: `values-agree`. If the cache copy fails the `root:root 700 1` or sha checks, the block stops before the apply and `/root/carlos-v0.28.5` is the only thing left on the box (remove it with `shred -u /root/carlos-v0.28.5`).
-
-> **Paul's go: G4.** Promotes `router/stable` to v0.28.5. Leo is applied by hand. Dennis, on the same channel, rolls from the same promote within the 5 minute spread. If the apply fails, STOP: the `router/stable` activation stays held, promote and rollback of stable are refused until a recovery ruling, so do not attempt a rollback. Leo and dennis keep serving v0.28.4. Report the activation ID and leo's refusal line. (A refused roll on an armed box records no completion; Run 1.)
-
-The seven steps, in this order (the claim runbook's G4):
-
-```bash
-# 1. on leo, BEFORE the promote
-leo "set -- stop; $(cat "$W/rearm.ready.sh")"
-# 2. operator: promote, then refresh the roster revision
-carlos system update --console "$DEVC" --channel stable --version "$TAG" --yes
-rosterview
-# 3 to 7. on leo: wait for the agent's cache, stage, apply, evidence, restore the path unit
-leo "set -- apply; $(cat "$W/rearm.ready.sh")"
-```
-
-Expected on the promote (Run 9): "2 boxes over 5m" (leo and dennis), a "has not been on canary" warning, `router/stable` pointed, roster `rev` REV0+1 with one activation. The box block prints, in order: `cache: fetched by the agent` (49 s in Run 9), `staged /root/carlos-v0.28.5 858342a3... = signed sums = identity`, the `system apply` result `Finished with result: success` (about 19 s), `applied.json` and `result.json` reading `applied` for `v0.28.5`, identities `v0.28.4.json` and `v0.28.5.json`, `edge pid ... exe = the release`, `NRestarts=0`, `carlos v0.28.5` then `carlos v0.28.4` (the `.prev`), the path unit `active`, and `shredded /root/carlos-v0.28.5`.
-
-Then the operator side (C4: `rosterview` after each console-driven update):
-
-```bash
-aws --profile kass s3 cp --quiet "s3://$DEVB/status/boxes/leo-climbing.json" - | jq -c '{generated_at, release: .metrics.release, binary: (.metrics.binary_sha256[0:16]), activation_id: .metrics.activation_id, activation_complete: .metrics.activation_complete}'
-rosterview
-carlos system status --console "$DEVC"
-```
-
-Pass: a report written after the apply with `release v0.28.5`, binary `858342a3...` and `activation_complete true` (Run 9: 16:21:22Z); `rosterview` back to `"activations":[]` with `rev` REV0+2 (3 min 44 s after the promote in Run 9); leo `current` at v0.28.5. Save each output to `$EVID`.
-
-### 1.c Dennis by its normal `system update`
-
-Nothing to run: dennis is unarmed and on stable, so the promote in 1.b is its roll. It takes the release inside the 5 minute spread, through its own `carlos-system-update.service`. Run 9: 16:23:40 to 16:23:58Z, edge restarted, `NRestarts` 0.
-
-```bash
-dennis 'systemctl show carlos-system-update.service -p Result -p ExecMainStartTimestamp; cat /opt/carlos/system/router/result.json; echo; /opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1; systemctl show carlos-edge.service -p NRestarts -p ExecMainStartTimestamp'
-carlos system status --console "$DEVC"
-```
-
-Pass: `result.json` outcome `applied` for v0.28.5, `carlos v0.28.5` with `.prev` `carlos v0.28.4` (it was v0.28.3 before this roll), `NRestarts=0`, dennis `current` at v0.28.5. If dennis has not rolled after 10 minutes, read `journalctl -u carlos-system-update.service -n 40` on it and STOP; do not hand-apply.
-
-### 1.d Sophie's router by the re-arm on canary (R9-2)
-
-Sophie follows canary and is armed, so it takes the same seven steps with `--channel canary`. Its console keeps running the protected v0.28.4 console throughout: a router apply does not touch it.
-
-> **Paul's go: G5.** Promotes `router/canary` to v0.28.5; sophie is the only canary box ("1 box, already mirrored" in Run 9). Same failure rule as G4: STOP, no rollback.
-
-```bash
-# 1. on sophie, BEFORE the promote
-sophie "set -- stop; $(cat "$W/rearm.ready.sh")"
-# 2. operator
-carlos system update --console "$DEVC" --channel canary --version "$TAG" --yes
-rosterview
-# 3 to 7. on sophie
-sophie "set -- apply; $(cat "$W/rearm.ready.sh")"
-aws --profile kass s3 cp --quiet "s3://$DEVB/status/boxes/sophie-knitting.json" - | jq -c '{generated_at, release: .metrics.release, binary: (.metrics.binary_sha256[0:16]), activation_id: .metrics.activation_id, activation_complete: .metrics.activation_complete}'
-rosterview
-carlos system status --console "$DEVC"
-sophie 'p=$(systemctl show -p MainPID --value console.service); echo "console pid $p"; sha256sum < /proc/$p/exe | cut -c1-16'
-```
-
-Pass: as 1.b for sophie (Run 9: 16:30:36 to 16:33:24Z, apply 19 s); `rosterview` ends with `activations` empty and `rev` REV0+4; all three boxes `current` at v0.28.5; the console pid and exe sha are the ones recorded in 1.0 (the protected v0.28.4 console, unchanged).
-
-### 1.e Sophie's guarded console: E1, the attended recovery (ruled by platform-1c)
-
-Defect 5: `install-console` refuses a slot that already holds other bytes, so sophie's protected console cannot be replaced by the supported road in v0.28.5. E1 is the ruled recovery for v0.28.5 only: `install-console --upgrade` (platform-1c, in progress) retires it. The offline-move doors exist only in the new console, so the dev rehearsal (section 2) cannot start until E1 is done.
-
-Run it attended, in a root shell on sophie, one numbered step at a time, reading the output between steps.
-
-**Order: sophie's router first (1.d), then E1.** guard-exec accepts the new console only when the new release's identity is already persisted locally, which happens when the router takes the release (Astra's review of `install-console --upgrade`, via platform-1c). The same order applies to every later console upgrade, including `install-console --upgrade --from <sha>` from the next release on.
-
-Staging first (DOCS-T1, no change to the console):
-
-```bash
-sha256sum "$W/identity.$TAG.json"
-sophie 'test ! -e /root/claim-trial/identity.v0.28.5.json && echo absent'
-box_put "$SOPHIE" "$W/identity.$TAG.json" /root/claim-trial/identity.v0.28.5.json
-sophie 'cd /root/claim-trial; stat -c "%n %U:%G %a links=%h size=%s" identity.v0.28.5.json; sha256sum identity.v0.28.5.json'
-sophie 'S=/opt/carlos/versions/54ae7fb9/console; stat -c "%n %U:%G %a links=%h size=%s" $S; sha256sum $S'
-```
-
-Pass: `absent`; `staged`; the identity on sophie is `root:root 600`, one link, with the same sha256 as the published object; the console source is `root:root 755`, one link, 47317154 bytes, sha256 `3ad7ab50...3c9c`. Any difference is a STOP.
-
-> **Paul's go: G6.** Stops `console.service` on sophie (the dev console is down, 502, until step 5) and replaces its protected binary. Rollback is step 6.
-
-Start the attended session: `aws --profile kass --region eu-west-1 ssm start-session --target "$SOPHIE"`, then a root shell.
-
-**E1.1. Record.** The sha256 of `console` and `console.prev`, and `stat` for each (owner, mode, links), written to a record file that step 6 reads.
-
-```bash
-bash -euo pipefail <<'EOF'
-umask 077
-D=/opt/carlos/system/console
-UTC=$(date -u +%Y%m%dT%H%M%SZ)
-ASIDE=/opt/carlos/system/console-aside-$UTC
-REC=/root/claim-trial/e1-record-$UTC.txt
-{
- echo "ASIDE=$ASIDE"
- echo "SHA_CUR=$(sha256sum < $D/console | cut -d' ' -f1)"
- echo "OWN_CUR=$(stat -c '%U:%G' $D/console)"
- echo "MODE_CUR=$(stat -c '%a' $D/console)"
- echo "LINKS_CUR=$(stat -c '%h' $D/console)"
- echo "SHA_PREV=$(sha256sum < $D/console.prev | cut -d' ' -f1)"
- echo "OWN_PREV=$(stat -c '%U:%G' $D/console.prev)"
- echo "MODE_PREV=$(stat -c '%a' $D/console.prev)"
- echo "LINKS_PREV=$(stat -c '%h' $D/console.prev)"
-} > $REC
-cp -p $REC /root/claim-trial/e1.env
-cat $REC
-stat -c '%n %U:%G %a links=%h size=%s inode=%i' $D/console $D/console.prev
-stat -c '%n %U:%G %a' $D
-ls -la $D
-EOF
-```
-
-Expected: both slots `root:root`, `755`, one link, 47186082 bytes, sha256 `8d49199f433662ab183a98ce7a5ebeb18f36bc02af5689752580a596bc565e9b` (the v0.28.4 console, with `console.prev` the same bytes at arming). A different sha256 is a STOP: record it and tell Paul before step 2. Keep the printed `ASIDE=` value; it is the exact directory step 7 removes.
-
-**E1.2. Stop.**
-
-```bash
-systemctl stop console.service
-systemctl is-active console.service || true
-```
-
-Expected: `inactive`. Write down the time.
-
-**E1.3. Aside.** A root-only 0700 directory on the same filesystem, both slots moved into it, and nothing else. The console directory itself stays.
-
-```bash
-bash -euo pipefail <<'EOF'
-. /root/claim-trial/e1.env
-D=/opt/carlos/system/console
-test ! -e "$ASIDE"
-install -d -m 0700 -o root -g root "$ASIDE"
-mv -T $D/console.prev "$ASIDE/console.prev"
-mv -T $D/console "$ASIDE/console"
-ls -la $D "$ASIDE"
-test "$(sha256sum < "$ASIDE/console" | cut -d' ' -f1)" = "$SHA_CUR" && echo aside-console-ok
-test "$(sha256sum < "$ASIDE/console.prev" | cut -d' ' -f1)" = "$SHA_PREV" && echo aside-prev-ok
-EOF
-```
-
-Expected: `$D` empty, `$ASIDE` holding the two files, both `-ok` lines.
-
-**E1.4. Install the v0.28.5 console.** Dry run, then the same without `--dry-run`. It must report both slots written with the v0.28.5 console sha from the identity.
-
-```bash
-bash -euo pipefail <<'EOF'
-umask 077
-cd /root/claim-trial
-set -a; . /etc/carlos/host.env; set +a
-PUB=$(cat release.pub)
-SRC=/opt/carlos/versions/54ae7fb9/console
-ID=/root/claim-trial/identity.v0.28.5.json
-/opt/carlos/carlos system claims install-console --identity $ID --source $SRC --bucket carlos-dev-640012953448 --aws-region eu-west-1 --public-key "$PUB" --dry-run
-/opt/carlos/carlos system claims install-console --identity $ID --source $SRC --bucket carlos-dev-640012953448 --aws-region eu-west-1 --public-key "$PUB"
-D=/opt/carlos/system/console
-stat -c '%n %U:%G %a links=%h size=%s' $D/console $D/console.prev
-sha256sum $D/console $D/console.prev
-EOF
-```
-
-Expected (Run 9's E1): `already_installed false`, `release_tag v0.28.5`, `sha256 3ad7ab50...3c9c` (the identity's `console_artifacts.linux-arm64.sha256`), `path /opt/carlos/system/console/console`, `previous /opt/carlos/system/console/console.prev`, `mode 0755`; both slots `root:root 755 links=1 size=47317154`, both sha256 `3ad7ab50...3c9c`. A refusal here: go to step 6 at once.
-
-**E1.5. Start and check.**
-
-```bash
-systemctl start console.service
-systemctl is-active console.service
-p=$(systemctl show -p MainPID --value console.service); echo "pid $p"
-readlink /proc/$p/exe
-sha256sum < /proc/$p/exe
-tr '\0' '\n' < /proc/$p/environ | grep '^CARLOS_HOST_CLAIM='
-for i in $(seq 1 30); do c=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8090/healthz); [ "$c" = 200 ] && break; sleep 1; done; echo "healthz $c"
-curl -sI http://127.0.0.1:8090/healthz | grep -i '^x-carlos-version'
-systemctl show console.service -p NRestarts -p ActiveState
-```
-
-Pass: `active`; `/opt/carlos/system/console/console`; sha256 `3ad7ab50...3c9c`; `CARLOS_HOST_CLAIM=` empty; `healthz 200` within seconds (Run 9: restart 16:35:16.563Z, 200 at 17.113Z); `NRestarts=0`. The `x-carlos-version` value: record what it prints. 5.0a's record shows a ship-version string for a protected console and the v0.28.2 notes say a release console reports its tag, so expect `54ae7fb9` or `v0.28.5`; the exe sha256 is the authority.
-
-The console report must show the console process. From DOCS-T1, stage a fresh roster and revision, then on sophie run the claim runbook's 7.4 `console-report` (the dry run first):
-
-```bash
-box_inspect "$SOPHIE"
-sophie 'cd /root/claim-trial && /opt/carlos/carlos system claims console-report --bucket carlos-dev-640012953448 --aws-region eu-west-1 --expect-revision "$(cat rev)" --console-id "$(cat console-id)" --public-key "$(cat release.pub)" --dry-run'
-```
-
-Then, if the dry run passes, the same command without `--dry-run`, and read the box report:
-
-```bash
-aws --profile kass s3 cp --quiet "s3://$DEVB/status/boxes/sophie-knitting.json" - | jq -c '{generated_at, release: .metrics.release, console_processes: (.metrics.console_processes | length)}'
-```
-
-Pass: the dry run passes, and the report shows `console_processes` 1. The entry lapses at the agent's next status tick (about 5 minutes, #312); that is expected. A refusal here with the exe sha and healthz correct is not a reason to roll back by itself: STOP and tell Paul.
-
-**E1.6. Rollback (only before step 5's checks have passed).** Stop the console, move the aside files back with their recorded owner, mode and shas, delete the new slots, start it again.
-
-```bash
-systemctl stop console.service
-bash -euo pipefail <<'EOF'
-. /root/claim-trial/e1.env
-D=/opt/carlos/system/console
-restore() { # restore <slot> <owner> <mode> <sha>
- [ -e $D/$1 ] && rm -- $D/$1
- mv -T "$ASIDE/$1" $D/$1
- chown "$2" $D/$1
- chmod "$3" $D/$1
- test "$(sha256sum < $D/$1 | cut -d' ' -f1)" = "$4" && echo "$1 restored"
- stat -c '%n %U:%G %a links=%h' $D/$1
-}
-restore console "$OWN_CUR" "$MODE_CUR" "$SHA_CUR"
-restore console.prev "$OWN_PREV" "$MODE_PREV" "$SHA_PREV"
-EOF
-systemctl start console.service
-systemctl is-active console.service
-```
-
-Expected: both slots restored with the recorded sha256, owner, mode and one link; the console `active` on the v0.28.4 build (`8d49199f...`); healthz 200; `x-carlos-version` as recorded in 1.0. The aside directory is then empty and may stay until Paul says. After a rollback, STOP: the rehearsal cannot run, and the flagship roll can still go ahead (the flagship console is unguarded).
-
-**E1.7. Keep the aside directory** until the dev offline-move rehearsal is done (section 2). Then remove that exact directory by name, never a glob (G10, section 2.8).
-
-### 1.f The dev check (README "Checking dev", with R9-1)
-
-Once dev is rolled, with idle time allowed (wakecheck's idle is 15 minutes and bots can keep it awake):
-
-```bash
-carlos logs --app wakecheck --console "$DEVC" --since 30m | tail -5
-curl -sS -m 40 -w '\n[%{http_code}] ttfb %{time_starttransfer}s\n' https://wakecheck.dev.carlosframework.com/
-curl -sS -m 40 --resolve wakecheck.dev.carlosframework.com:443:18.200.150.210 -w '\n[%{http_code}] ttfb %{time_starttransfer}s\n' https://wakecheck.dev.carlosframework.com/
-carlos status --layout --console "$DEVC"
-carlos system status --console "$DEVC"
-```
-
-Pass, with R9-1's corrections:
-1. The logs end in "instance exited" (do not use `instances list --health`, #287). If not, wait for idle and read again.
-2. Through DNS: a 200, `host=` is the console box (`carlos-dev-ie`, sophie), about 0.6 s to first byte.
-3. Pinned to leo's address `18.200.150.210`: a 200 whose `host=` is `carlos-dev-ie` too. Leo has held `CARLOS_POOLS=cohort1` since step 4.2 and has no wakecheck row since 4.3, so its edge backhauls to sophie. Replace the README's "host= is that box" with this.
-4. `carlos status --layout` shows `wakecheck` as `nested` on the console box only. A box restarted by the roll may read "isolation not ready: ... probe fail not yet run" for the first ten minutes or so; read again later (the harness (f) and the dev journals of 2026-10-19 both show `nested by default` about ten minutes after a start).
-5. `hits=` going backwards from one box to the other is not a failure (#286); judge on the 200s and the `host=` values.
-6. All three boxes `current` at v0.28.5, console healthz 200.
-
-Record the outputs in `$EVID`. Run 9 (f) passed items 1 to 2 on the harness's console box, with the pinned request failing only for the harness's CA gap (H13b).
-
-### 1.g The evidence list
-
-Save each to `$EVID` with a UTC stamp in the file name. The roll is accepted when every row passes.
-
-| # | Evidence | Pass |
-|---|---|---|
-| 1 | 0.8 pre-flight output | signature verified, shas as 0.1 |
-| 2 | `channels --app console` after C2 | `canary/console 54ae7fb9 ... yes`, shipped before the identity |
-| 3 | `publish-identity` result | one create-only write, router `858342a3...`, console `3ad7ab50...` |
-| 4 | Signer close and the CloudTrail check | clean (1.a.5) |
-| 5 | Leo: `applied.json`, `result.json`, identities, edge exe sha, `NRestarts`, `carlos` and `.prev` | `applied`, `v0.28.4.json` and `v0.28.5.json`, exe `858342a3...`, 0, v0.28.5 and v0.28.4 |
-| 6 | Leo: next report | `activation_complete true`, `activations []` |
-| 7 | Dennis: `result.json`, versions, `NRestarts` | `applied`, v0.28.5 and v0.28.4, 0 |
-| 8 | Sophie router: as rows 5 and 6; the console pid and exe unchanged | as leo |
-| 9 | Roster revisions after each step (C4) | REV0, +1, +2, +3, +4 with `activations []` at the end |
-| 10 | E1: the record file, the aside listing, `install-console` output, exe sha, healthz, console report | as 1.e |
-| 11 | The dev check | as 1.f |
-| 12 | `carlos system status --console "$DEVC"` | three boxes `current` v0.28.5 |
-
-### 1.h If a step fails
-
-| Failure | Action |
-|---|---|
-| A held activation before the promote | STOP; no promote or rollback of that channel until it is released |
-| The agent's cache never appears (the apply block exits 3) | STOP, tell Paul. Hand-staging the cache is allowed only if it is missing, and the choice is recorded; not rehearsed in Run 9 |
-| A sha mismatch in the apply block | STOP; `shred -u /root/carlos-v0.28.5` |
-| The apply fails or the box does not report `activation_complete` | STOP; report the activation ID and the refusal line. No rollback of the channel. Leo and dennis keep serving v0.28.4 |
-| E1 step 4 refuses | E1.6 rollback at once |
-| The dev check fails | Stop before flagship; fix forward on dev or hold |
-
----
-
-## 2. Dev offline-move rehearsal, sophie to dennis
-
-Rehearses the whole sequence on an app shaped like the customer's: nested, a store binding, a secret, a settings bundle that renders a `config.env`, a files tree with a key file, an instance key, a schedule, a once-timer armed through the app, and a database that grows while it runs. It uses `moveprobe` (`cmd/moveprobe`, built from the release source). Both boxes are claims-off: sophie is home (`ie`), dennis is `uk`. Leo is a home-placement box with `CARLOS_POOLS=cohort1`; it takes part as a source box and does not block (M4: it publishes `offline-move-1`, an armed guard does not withhold it, and the gate applies only once leo's claims are on, after the claim window's 8.2).
-
-Gate: E1 done (1.e), the dev check passed (1.f), all three boxes and the console on v0.28.5.
-
-### 2.1 P0 pre-checks, as commands (M1, M9, R3)
-
-M1: the console that serves the doors runs the release. `carlos move offline status` answers (an older console has no offline doors).
-
-```bash
-carlos move offline status --host nothing.dev.carlosframework.com --app wakecheck --account bab --console "$DEVC"; echo "exit $?"
-```
-
-Pass: an answer that says the host has no offline move in flight (the plan's MV-O24, "has no offline move in flight"), not a bare "not found". Both an older console and a non-operator get a byte-identical 404, so first confirm your own operator status on this console (the doors check that you are a system operator and a member of the account).
-
-Per box (leo, sophie, dennis), the same block:
-
-```bash
-BLOCK='
-echo "== $(hostname)"
-echo "claim lines: $(grep -c "^CARLOS_HOST_CLAIM=." /etc/carlos/host.env || true)"
-echo "phase1 lines: $(grep -c "^CARLOS_MOVES_PHASE1=" /etc/carlos/host.env || true)"
-P=$(systemctl show -p MainPID --value carlos-edge)
-echo "edge env claim/phase1 vars: $(tr "\0" "\n" < /proc/$P/environ | grep -cE "^CARLOS_(HOST_CLAIM=.|MOVES_PHASE1=)" || true)"
-systemctl show carlos-edge -p User -p Delegate -p ActiveState
-echo "stage.path: $(systemctl is-active carlos-stage.path) $(systemctl is-enabled carlos-stage.path)"
-/opt/carlos/carlos version 2>&1 | tail -1
-if [ -f /opt/carlos/system/guard/policy.json ]; then echo "guard policy present"; else echo "no guard policy"; fi
-echo "secrets key lines: $(grep -c "^CARLOS_SECRETS_KEY=" /etc/carlos/host.env || true)"
-'
-leo "$BLOCK"
-sophie "$BLOCK"
-dennis "$BLOCK"
-sophie 'P=$(systemctl show -p MainPID --value console.service); tr "\0" "\n" < /proc/$P/environ | grep -E "^CARLOS_(HOST_CLAIM|MOVES_PHASE1|SECRETS_PUBKEY)=" | sed "s/PUBKEY=.*/PUBKEY=<set>/"; sha256sum < /proc/$P/exe | cut -c1-16'
-```
-
-Pass on every box: `claim lines: 0`, `phase1 lines: 0`, `edge env ... 0`, `User=carlos` (R3: the move reads bucket and tenant-reachable inputs, so it never runs where the agent runs as root; any other value is a STOP), `Delegate=yes`, `ActiveState=active`, `stage.path: active enabled` (the UK box at least), `carlos v0.28.5`, secrets key lines 1 (dennis, leo, sophie). Guard policy present on leo and sophie, absent on dennis (an armed guard is not a refusal). The console: `CARLOS_HOST_CLAIM=` empty, no `CARLOS_MOVES_PHASE1`, `CARLOS_SECRETS_PUBKEY=<set>`, exe sha `3ad7ab50...` (first 16 digits).
-
-Edges files and the stale-file check (P0.7):
-
-```bash
-for k in $(aws --profile kass s3 ls "s3://$DEVB/control/edges/" | awk '{print $4}'); do
- echo "== $k"; aws --profile kass s3 cp --quiet "s3://$DEVB/control/edges/$k" - | jq -c '{region, placement, pools, caps: .capabilities, secrets_key_fp, hibernation_configured, serves_shared_pool, data_bucket, hosts: (.hosts | length)}'
-done
-```
-
-Pass: exactly three files, one per live box; every `caps` contains `offline-move-1`; `hibernation_configured` true; every `secrets_key_fp` is equal (P0.3's secrets key fact); sophie serves the shared pool; leo `serves_shared_pool` false; dennis `placement uk` with a `data_bucket`. Any extra file naming the home placement for a box that no longer exists blocks `seal`: STOP and ask (removal needs Paul).
-
-Claims, certificates, layout, sizes (run again for the rehearsal host after 2.2):
-
-```bash
-aws --profile kass s3api head-object --bucket "$DEVB" --key control/hosts-backfill.json >/dev/null 2>&1 && echo "hosts-backfill PRESENT" || echo "control/hosts-backfill.json absent"
-carlos status --layout --console "$DEVC"
-IEDATA=$(sophie 'grep "^CARLOS_HIBERNATE_BUCKET=" /etc/carlos/host.env | cut -d= -f2- | tr -d "\""' | tail -1)
-UKDATA=$(dennis 'grep "^CARLOS_HIBERNATE_BUCKET=" /etc/carlos/host.env | cut -d= -f2- | tr -d "\""' | tail -1)
-echo "ie data: $IEDATA uk data: $UKDATA"
-```
-
-Pass: `control/hosts-backfill.json absent`; layout shows no stale warnings you do not understand. P0.4, the staging lane from the IE role to the UK data bucket's `moves/` prefix: the boxes have no `aws` CLI, so check the policy offline from DOCS-T1:
-
-```bash
-aws --profile kass iam simulate-principal-policy --policy-source-arn arn:aws:iam::640012953448:role/carlos-dev-host --action-names s3:PutObject s3:GetObject s3:DeleteObject --resource-arns "arn:aws:s3:::$UKDATA/moves/x/y" --query 'EvaluationResults[].[EvalActionName,EvalDecision]' --output text
-aws --profile kass iam simulate-principal-policy --policy-source-arn arn:aws:iam::640012953448:role/carlos-dev-host --action-names s3:ListBucket --resource-arns "arn:aws:s3:::$UKDATA" --context-entries ContextKeyName=s3:prefix,ContextKeyValues=moves/,ContextKeyType=string --query 'EvaluationResults[].[EvalActionName,EvalDecision]' --output text
-```
-
-Pass: `allowed` for all four. This is not rehearsed (the harness's MinIO cannot answer it). If the simulation says `implicitDeny`, the staging lane is missing: STOP, infra change needs Paul. The first real `seal` is the final proof.
-
-### 2.2 The test app
-
-> **Paul's go: G7.** Creates two apps (`moverehearsal`, `rollbackrehearsal`), a store each, a secret, a schedule and an instance record each, in account `bab` on dev. They are deleted later by the claim window's block B1 (the claim runbook's G2 note names "the offline-move rehearsal app's" records), not here.
-
-Build the app from the release source and ship it. The account must be approved for object storage on dev before `store create` provisions anything; if it refuses, STOP and ask (the harness bound the store as plain app settings, H18, which needs a scratch bucket Paul names).
-
-```bash
-(cd "$REL/src" && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOFLAGS=-buildvcs=false go build -o "$W/moveprobe" ./cmd/moveprobe)
-sha256sum "$W/moveprobe"
-for APP in moverehearsal rollbackrehearsal; do
- carlos apps create --app $APP --account bab --console "$DEVC"
- carlos ship --app $APP --account bab --console "$DEVC" --version mp1 --label "moveprobe 54ae7fb9 (offline-move rehearsal)" --no-prompt "$W/moveprobe"
- carlos promote --app $APP --account bab --console "$DEVC" --no-prompt mp1 edge
- AWS_PROFILE=kass CARLOS_DEPLOYMENT_BUCKET=$DEVB carlos instances enable --app $APP --account bab --domain dev.carlosframework.com --channel edge
- carlos store create --app $APP --account bab --console "$DEVC" --env-prefix MOVEPROBE
- S=$(od -An -N24 -tx1 /dev/urandom | tr -d ' \n'); (umask 077; printf '%s' "$S" > "$W/$APP.secret")
- carlos secrets set --app $APP --account bab --console "$DEVC" MOVEPROBE_SECRET="$S"
- carlos env set --app $APP --account bab --console "$DEVC" REHEARSAL_NOTE=r0285-$APP
- carlos schedule set --app $APP --account bab --console "$DEVC" --name every-minute --every 1m --path /tick
- carlos instances create --app $APP --account bab --host $APP.dev.carlosframework.com --console "$DEVC" --no-prompt
-done
-```
-
-Expected: `instances create` prints the channel it chose and the region (`channel edge, Ireland · Dublin` in Run 9: region home, no pool). The per-app secret lives only in `$W/<app>.secret` (0600) and in the shell.
-
-Optional, not in Run 9: to resemble the customer's instances further, give `moverehearsal` a legacy `/data/<host>/` directory holding only a key copy, as the flagship's three have. Do it only if Paul wants it, as root on sophie after the first wake, copying the two files from the nested `<host>/` directory with their modes. The move should park it at `source-retire`.
-
-**M5: `config.env` before the first wake (defect 6).** About a minute after `instances create`, and before any request:
-
-```bash
-for APP in moverehearsal rollbackrehearsal; do
- sophie "set -- $APP.dev.carlosframework.com; $(cat "$W/cfg.box.sh")"
-done
-```
-
-Pass: `config.env` lists `MOVEPROBE_*` and `REHEARSAL_NOTE` names. If it says `MISSING`, change any setting to start a new bundle generation, then read again after a minute:
-
-```bash
-carlos env set --app rollbackrehearsal --account bab --console "$DEVC" REHEARSAL_NOTE=r0285-rollbackrehearsal-2
-```
-
-(That is for the rehearsal apps only. On a customer's instance never change a setting to cure this: see 4.5.)
-
-Wake each on sophie only, through DNS, and arm a once-timer 45 minutes out:
-
-```bash
-for APP in moverehearsal rollbackrehearsal; do
- H=$APP.dev.carlosframework.com; S=$(cat "$W/$APP.secret")
- for i in 1 2 3 4 5 6; do c=$(curl -s -m 40 -o /dev/null -w '%{http_code}' https://$H/ready); echo "$APP /ready $c"; [ "$c" = 200 ] && break; sleep 10; done
- curl -s -m 20 -X POST -H "Authorization: Bearer $S" "https://$H/arm-once?in=2700"; echo
- curl -s -m 20 -H "Authorization: Bearer $S" https://$H/report | jq -c '{host,region,rows,fired,file_key_sha256,platform_key_sha256,object:.object.key,has_secret,worker_writes_committed}'
-done
-carlos status --layout --console "$DEVC"
-```
-
-Pass: 200 on `/ready` (a first wake that fails the health check with a missing store variable is defect 6: apply the `env set` above), `has_secret true`, a store object key, and `nested` on sophie for both hosts. Run 9's equivalent: 61 `bg` rows, `file_key_sha256 c5a85dd6...`, `platform_key_sha256 067b3156...`.
-
-### 2.3 The move of `moverehearsal`, with the doors M2 and M5 corrected
-
-> **Paul's go: G8.** `moverehearsal` is offline from `start` until `open`.
-
-Helpers (DOCS-T1). `MVR` is Run 9's retry: it repeats a verb every 15 s while the door refuses only for a stale report or a wait (M2), up to 9 minutes.
-
-```bash
-H=moverehearsal.dev.carlosframework.com APP=moverehearsal ACCT=bab C=$DEVC
-MV() { carlos move offline "$1" --host "$H" --app "$APP" --account "$ACCT" --console "$C" ${2:-}; }
-ts() { date -u +%T.%3NZ; }
-MVR() { local i out rc; for i in $(seq 1 36); do out=$(MV "$1"); rc=$?; echo " try $i $(ts) exit=$rc: $(echo "$out" | tail -1)"
- case "$rc:$out" in 5:*"still runs a process"*|5:*"Waiting for"*|5:*"not current"*|4:*) sleep 15;; *) echo "$out"; return $rc;; esac; done; return $rc; }
-```
-
-Never run `carlos move` as root; it refuses.
-
-**Before.** Read the app, the boxes and the leases (the box side is `facts`, Appendix A):
-
-```bash
-S=$(cat "$W/$APP.secret")
-curl -s -m 30 -H "Authorization: Bearer $S" https://$H/report | jq -c '{rows,fired,file_key_sha256,platform_key_sha256,object:.object.key}'
-sophie "set -- $H; $(cat "$W/facts.box.sh")"
-dennis "set -- $H; $(cat "$W/facts.box.sh")"
-aws --profile kass s3 cp --quiet "s3://$IEDATA/instances/$H/lock.json" - | jq -c .
-```
-
-Record: the `/report` row counts, the env file sha and instance key digest, the `config.env` names, the files tree digest, the timers (`every-minute`, `once-1`), the lease owner `sophie:<n>`. Dennis shows nothing for the host.
-
-**The steps.** Run them back to back. `flip` must come within two minutes of the previous door, and `open` within two minutes of the flip (M2), or be retried:
-
-```bash
-T0=$(date +%s); echo "start $(ts)"
-MV start "--to uk"; echo "start exit=$? $(ts)"
-MV status
-echo "seal $(ts)"; MV seal; echo "seal exit=$? $(ts)"
-```
-
-Between `seal` and `flip`, confirm the process is really gone (the plan's "operator confirms before the flip"):
-
-```bash
-carlos logs --app "$APP" --account "$ACCT" --console "$C" --since 15m | grep -E 'exited|stopp|fence' | tail -3
-sophie "set -- $H; $(cat "$W/procs.box.sh")"
-echo "flip $(ts)"; MVR flip; echo "flip exit=$? $(ts)"
-MV status
-```
-
-Pass: `instance exited` in the log; 0 processes in the slice. If `flip` exits 5 with "<box> still runs a process" and `status` shows "Its report is not current", that is a stale report, not a process. `MVR` retries every 15 s until the next pass (at most about 6 minutes). Only a current report with a process count is a real MV-O31: then STOP and abort.
-
-**After flip, before open** (M5 on the target: the landing renders `config.env` from the bundle):
-
-```bash
-dennis "set -- $H; $(cat "$W/facts.box.sh")"
-```
-
-Pass: dennis shows the row `landing`, region uk, **flat** (`/data/<host>.db`), `<host>.env` sha equal to sophie's, the instance key digest equal, `config.env` with the same names, the files `instance.key` digest equal, both timers carried. If `config.env` is missing on the target, `abort`, do not open.
-
-```bash
-echo "open $(ts)"; MVR open; echo "open exit=$? $(ts)"
-DEN_IP=$(aws --profile kass --region eu-west-2 ec2 describe-instances --instance-ids "$DENNIS" --query 'Reservations[0].Instances[0].PublicIpAddress' --output text)
-for i in $(seq 1 40); do c=$(curl -s -m 30 -o /dev/null -w '%{http_code}' --resolve $H:443:$DEN_IP https://$H/ready); echo "dennis /ready $c $(ts)"; [ "$c" = 200 ] && break; sleep 3; done
-echo "serving: $(( $(date +%s) - T0 )) s since start"
-curl -s -m 30 -H "Authorization: Bearer $S" --resolve $H:443:$DEN_IP https://$H/report | jq -c '{region,rows,fired,file_key_sha256,platform_key_sha256,object:.object.key,has_secret,worker_writes_failed}'
-curl -s -m 30 -o /dev/null -w 'via DNS %{http_code}\n' https://$H/ready
-echo "finish $(ts)"; MVR finish; echo "finish exit=$? $(ts)"
-MV status
-```
-
-Expected (Run 9): `start` prints "Moving <host> from ie to uk." and "... is offline from now until the move opens or is aborted." then "Waiting for <box> in ie ..." and "Every box in ie has stopped <host>. Run carlos move offline seal ..." exit 0 in about 2 s; `seal` "Copying ... Copied and checked. Run carlos move offline flip ..." about 6 s for 4 MB; `flip` "Stopped in ie. Starting in uk." about 4 s; `open` "<host> is served from uk. Run carlos move offline finish ..." about 4 s; the first request on dennis 404 for a moment (not ready yet) then 200 within about 6 s; `finish` takes 4 to 5 minutes (the CLI waits; nothing is offline by then) and ends "Moved. <host> is served from uk. It was offline for <n> seconds."
-
-**After finish.**
-
-M6 (defect 8), on the source box, now:
-
-```bash
-sophie "set -- $H check; $(cat "$W/stray.box.sh")"
-```
-
-If a `<host>.env` is in `/data/.instances/<host>/` (a fresh 84-byte file holding only a new `CARLOS_ADMIN_TOKEN`, written at the first tick after `open`), move it into the park directory and record it. Never delete it:
-
-```bash
-sophie "set -- $H move; $(cat "$W/stray.box.sh")"
-```
-
-M7: the source's `instances/<host>/lock.json` is rewritten, not deleted:
-
-```bash
-aws --profile kass s3 cp --quiet "s3://$IEDATA/instances/$H/lock.json" - | jq -c .
-aws --profile kass s3 cp --quiet "s3://$UKDATA/instances/$H/lock.json" - | jq -c .
-aws --profile kass s3 cp --quiet "s3://$DEVB/apps/bab/$APP/instances/$H.json" - | jq -c '{region, move, last_move, record_seq}'
-```
-
-Pass: IE's lock is `owner moved:<id>`, `expires_at 1970-01-01T00:00:00Z`, `generation` 1. That expired object is the normal end state, not an abandoned move. UK's is dennis's (`dennis:<n>`, 15 minute expiry). The record: region `uk`, `move` null, `last_move {"outcome":"done","offline_s":<n>}`.
-
-### 2.4 Verification on dennis
-
-All of these must hold (Run 9 B3):
-
-| Check | How | Pass |
-|---|---|---|
-| Rows | `/report` on dennis, second read | `bg` home rows then uk rows with contiguous sequence numbers, no row lost or repeated; the count is above the pre-move read |
-| Instance key | `platform_key_sha256` and `<host>.env` sha (via `facts`) | equal to the pre-move values |
-| Files | `file_key_sha256`, `instance.key` digest | unchanged |
-| `config.env` | names on dennis; the app wrote and read back a new store object | all names present; `has_secret true`; a new `probe/` object |
-| Timers | `carlos schedule ls --app moverehearsal --account bab --console "$DEVC"`; the once-timer | `every-minute` carried (ticks due while offline did not fire, refused `maintenance fence active`, as the plan says); `once-1` fires on dennis at its due time (45 minutes after arming) with a `once` row in region uk and `last_status 200` |
-| Source parked, not deleted | `ls -d /data/.offline-moves/<host>/<id>/*` on sophie | `sealer/`, `source/instance/`, `source/<host>.json`; the mount view `/data/instances/<host>`, `/data/.instances/<host>` (empty) and `/opt/carlos/live/<host>` (root-owned link) stay |
-| Tombstone lifted | sophie journal `tombstone lifted`; the lock object (M7) | as above |
-| Backhaul | request through sophie and leo | 200 |
-
-### 2.5 Nesting after up to an hour (M3)
-
-After `open` the row is flat. The layout pass nests it only when asleep, or stops it after a 1-hour grace (`layout: deferred until asleep -> <host> (awake (stopped for the move in 1h0m0s unless it sleeps first))`). An app with a 1-minute schedule never reaches idle, so plan a second short stop about an hour after the first wake on dennis (Run 9: 18:26:40Z, exactly 1 h, a 24 s second stop). Read it once, at the hour. The abort rehearsal (2.6) reset `H`, `APP` and `S`, so set them back for `moverehearsal` first (`H=moverehearsal.dev.carlosframework.com APP=moverehearsal S=$(cat "$W/moverehearsal.secret")`):
-
-```bash
-carlos status --layout --console "$DEVC" | grep -E "$H|WARNING"
-carlos logs --app "$APP" --account "$ACCT" --console "$C" --since 90m | grep -E 'instance (stopping|exited|woke)' | tail -5
-dennis "journalctl -u carlos-edge --no-pager --since '-80 min' | grep -E 'layout: ' | grep $H | tail -5"
-curl -s -m 30 -H "Authorization: Bearer $S" --resolve $H:443:$DEN_IP https://$H/report | jq -c '{rows,file_key_sha256,platform_key_sha256,worker_writes_failed}'
-```
-
-Pass: the host shows `nested` (the "runs nested instances beside flat" warning gone); one `instance stopping` then `instance exited` then `instance woke`; rows contiguous; the key digests unchanged; `/ready` 200.
-
-### 2.6 The abort rehearsal on `rollbackrehearsal`
-
-> **Paul's go: G9.** `rollbackrehearsal` is offline from `start` until `abort` completes (Run 9: 23 s).
-
-```bash
-H=rollbackrehearsal.dev.carlosframework.com APP=rollbackrehearsal; S=$(cat "$W/$APP.secret")
-curl -s -m 30 -H "Authorization: Bearer $S" https://$H/report | jq -c '{rows,platform_key_sha256,file_key_sha256}'
-sophie "set -- $H; $(cat "$W/facts.box.sh")"
-T0=$(date +%s)
-MV start "--to uk"; echo "start exit=$?"
-MV seal; echo "seal exit=$?"
-MVR flip; echo "flip exit=$?"
-dennis "set -- $H; $(cat "$W/facts.box.sh")"
-MVR abort; echo "abort exit=$?"
-MV finish; echo "finish exit=$?"
-for i in $(seq 1 10); do c=$(curl -s -m 30 -o /dev/null -w '%{http_code}' https://$H/ready); echo "ready $c"; [ "$c" = 200 ] && break; sleep 6; done
-echo "back after $(( $(date +%s) - T0 )) s"
-```
-
-Expected (M8): `abort` prints "Moving <host> back to ie." and then "Every box has put <host> back in ie. Run carlos move offline finish ..."; **`abort` exits 3 and so does `finish`**. That is the CLI's "aborted" code, the expected result, not a failure. `finish` prints "<host> is back in ie and serving. Nothing was lost." Run 9: abort 4.1 s, finish 0.1 s, `/ready` 200 at 0.6 s, 23 s offline in all.
-
-Verify:
-
-```bash
-curl -s -m 30 -H "Authorization: Bearer $S" https://$H/report | jq -c '{rows,platform_key_sha256,file_key_sha256}'
-sophie "set -- $H; $(cat "$W/facts.box.sh")"
-dennis "set -- $H; $(cat "$W/facts.box.sh")"
-aws --profile kass s3 cp --quiet "s3://$IEDATA/instances/$H/lock.json" - | jq -c .
-aws --profile kass s3 ls "s3://$UKDATA/moves/$H/" ; echo "uk moves/ exit $?"
-aws --profile kass s3 cp --quiet "s3://$DEVB/apps/bab/$APP/instances/$H.json" - | jq -c '{region, move, last_move}'
-```
-
-Pass: rows contiguous and above the pre-move count (no write lost); key digests unchanged; sophie's row `ready` and nested, with the lease `sophie:<n>` at generation 2 (the tombstone lifted and sophie took its own lease); no lease and no `moves/` objects for the host in the UK bucket; dennis has no row, and parked what it extracted under `/data/.offline-moves/<host>/<id>/target/`; the record is back in home (`region` absent), `move` null, `last_move` outcome `aborted`.
-
-### 2.7 Pass criteria for the rehearsal
-
-All of 2.1 to 2.6 pass, nothing lost in either move, the offline seconds and the step timings recorded (section 4.3 reuses them), the stray env check done, nesting confirmed after the hour. A failure on file permissions in the nested archive (a file the agent cannot read) means STOP: the flagship plan changes (the plan's Risk 1).
-
-### 2.8 Rehearsal cleanup
-
-> **Paul's go: G10.** Removes one exact directory on sophie: the E1 aside directory. Do it only when the rehearsal has passed and Paul agrees; it holds the only copy of the v0.28.4 console.
-
-```bash
-sophie 'ASIDE=$(grep "^ASIDE=" /root/claim-trial/e1.env | cut -d= -f2); echo "$ASIDE"; ls -la "$ASIDE"'
-```
-
-Read the printed name aloud against E1.1's record. Then, with that exact name (never a glob):
-
-```bash
-sophie 'ASIDE=/opt/carlos/system/console-aside-<UTC from E1.1>; test -d "$ASIDE" && ls "$ASIDE" && rm -r -- "$ASIDE" && echo removed'
-```
-
-Leave in place: the rehearsal apps and records (the claim window's B1 deletes them), the parked directories under `/data/.offline-moves/` on sophie and dennis (never deleted; the claim window's B2 must move them aside, and its G5 expects nothing left under `/data/.instances`, `/data/instances`, `/data/programs` or `/opt/carlos/live` for those hosts), and the E1 record file in `/root/claim-trial`. Tell the claim session about these before its window.
-
----
-
-## 3. Flagship roll
-
-Boxes first, then the console, per the roll recipe. The flagship boxes are unarmed and have no floor, so this is a normal `system update` with no identity and no re-arm. The console is unguarded, so it is a normal `roll-console.sh`. The third-party deployment is never rolled.
-
-### 3.0 Gates
-
-- Section 1 passed (all of 1.g) and section 2 passed (2.7), or Paul says to go ahead without 2.
-- A release-specific scale check (#281): dev cannot catch scale-only failures (v0.26.0's instance-key backfill outran the 20 s update gate on 127 instances). The flagship ie box has 118 instance slices. Watch its update gate in 3.2.
-- Sydney (au) took longer than the gate before (`au-box-gate-failure`, fixed in 1b48ed5, 2026-09-21). Watch it.
-
-### 3.1 Read-only pre-checks (DOCS-T1)
-
-Flagship is on v0.28.0, so the operator notes of v0.28.1 to v0.28.4 all apply to this roll: v0.28.1 (each box gets an idle join unit, `carlos-system-join.path`; a box silent for 24 hours drops out of status), v0.28.2 (the console reports the release tag as its version), v0.28.3 (`install-channel --policy`, nothing runs it), v0.28.4 (console email can switch itself on when `CARLOS_MAIL_REGION` and a sending address are set; invites now arrive; 20 pending invites and 20 sent per hour per account) and v0.28.5 (`NOTES.md`). Nothing needs doing for the dormant switches. Note: the v0.28.5 notes say to leave `CARLOS_SWAP` unset, but it is set on all seven boxes (zero-downtime deploys, armed 2026-10-14); leave it as it is.
-
-```bash
-carlos system status --console "$FLAGC"
-fie 'df -h / /data | cat; /opt/carlos/carlos version 2>&1 | tail -1; ls /opt/carlos/versions | wc -l'
-fus 'df -h / | tail -1; /opt/carlos/carlos version 2>&1 | tail -1'
-fuk 'df -h / | tail -1; /opt/carlos/carlos version 2>&1 | tail -1'
-fau 'df -h / | tail -1; /opt/carlos/carlos version 2>&1 | tail -1'
-```
-
-Pass: four boxes `current` at v0.28.0, none held; disk has room for a 50 MB binary and a stage (the ie disk was grown to 60 GiB by hand); each box prints `carlos v0.28.0`.
-
-The console mail check, the claim runbook's P9 command run on the flagship console box (profile `keymail`, `i-092c0c1eea75723cb`):
-
-```bash
-fie "$(cat "$W/p9.box.sh")"
-```
-
-where `$W/p9.box.sh` is the P9 box command (Appendix A). Pass: `console mail: OFF`. A `SET` line means the v0.28.4 console would create an SES identity and DNS records on its first start: Paul decides before 3.5.
-
-The flagship console's door state before the roll: nothing to read yet (the offline doors arrive with 3.5).
-
-### 3.2 The boxes
-
-> **Paul's go: G11.** `carlos system update` on the flagship's stable channel rolls all four boxes (ie, us, uk, au) within the 5 minute spread. It cannot canary one box.
-
-```bash
-carlos system update --console "$FLAGC" --channel stable --version "$TAG" --yes
-carlos system status --console "$FLAGC"
-```
-
-Watch for about 10 minutes (3 of 4 boxes were current in about 6 minutes for v0.19.0; au is slower):
-
-```bash
-carlos system status --console "$FLAGC"
-fie 'journalctl -u carlos-system-update.service --no-pager -n 25'
-fau 'journalctl -u carlos-system-update.service --no-pager -n 25'
-```
-
-Pass: every box `current` at v0.28.5. A box that reads `rolled-back` or `refused` says why on the same line: fix that box, do not re-cut the release. If ie rolls back on the gate (the #281 shape), STOP and tell Paul; do not touch the console.
-
-Per-box evidence (each of `fie`, `fus`, `fuk`, `fau`):
-
-```bash
-BLOCK='cat /opt/carlos/system/router/result.json; echo; /opt/carlos/carlos version 2>&1 | tail -1; /opt/carlos/carlos.prev version 2>&1 | tail -1; systemctl show carlos-edge.service -p NRestarts -p ExecMainStartTimestamp -p User -p Delegate; systemctl is-active carlos-instance-control carlos-stage.path carlos-system-update.path carlos-system-join.path'
-fie "$BLOCK"; fus "$BLOCK"; fuk "$BLOCK"; fau "$BLOCK"
-```
-
-Pass: outcome `applied` for v0.28.5, `carlos v0.28.5` and `.prev` `carlos v0.28.0`, `User=carlos`, `Delegate=yes`, the units active (`carlos-system-join.path` is new and idle; `active` is right).
-
-### 3.3 After the boxes
-
-```bash
-carlos system status --console "$FLAGC"
-```
-
-v0.28.5's `system status` warns when a new box would boot an older build ("bootstrap/carlos is not stable's build"): it compares `bootstrap/carlos` with stable's build and names the file to copy over it.
-
-> **Paul's go: G12** (only if the warning appears). Copy exactly the file the warning names, as the release recipe's copy step does, with the `keymail` profile. Not rehearsed in Run 9 (the harness's `bootstrap/carlos` was step 6's seed).
-
-### 3.4 The edges files: every box in ie and uk publishes `offline-move-1`
-
-The capability is the first thing the doors check (MV-O21), and it is published per pass, so allow a few minutes after the roll:
-
-```bash
-for k in $(aws --profile keymail s3 ls "s3://$FLAGB/control/edges/" | awk '{print $4}'); do
- echo "== $k"; aws --profile keymail s3 cp --quiet "s3://$FLAGB/control/edges/$k" - | jq -c '{region, placement, caps: .capabilities, secrets_key_fp, hibernation_configured, serves_shared_pool, data_bucket, hosts: (.hosts | length)}'
-done
-```
-
-Pass:
-- four files, one per live box, no stale file (a file naming the home placement for a box that no longer exists blocks `seal`; removal needs Paul);
-- the ie box and the uk box both have `offline-move-1` in `caps`; also check us and au, so a missing capability anywhere is seen;
-- `hibernation_configured` true on each;
-- every `secrets_key_fp` equal to the others (the UK box must hold the same secrets key as the console, MV-O23 checks the fingerprint);
-- the uk box has `placement uk` and a `data_bucket` (this is `UKDATA` for section 4).
-
-If a box is missing the capability, read its `host.env` for `CARLOS_HOST_CLAIM` and `CARLOS_MOVES_PHASE1` (both must be unset) and for `CARLOS_HIBERNATE_BUCKET` (must be set), and its edge journal. STOP and tell Paul; do not start a move.
-
-### 3.5 The console
-
-> **Paul's go: G13.** Builds the console from the clean release checkout and rolls it on the flagship, then verifies the running binary. Pass `flagship` explicitly: the script's default is `both`, which includes the third-party deployment.
-
-```bash
-git -C "$REL/src" status --porcelain | wc -l
-git -C "$REL/src" rev-parse --short HEAD
-"$PINFRA/scripts/roll-console.sh" "$REL/src" flagship
-curl -sI https://platform.carlosframework.com/ | grep -i x-carlos-version
-curl -sI "$FLAGC/" | grep -i x-carlos-version
-```
-
-Pass: `0` and `54ae7fb9` before the script (it refuses a dirty tree); the script ends `console 54ae7fb9 live at https://platform.carlosframework.com` after "verify the running binary IS this build" (it reads `/proc/<pid>/exe` on the box and compares it to `versions/54ae7fb9/console`); both headers show the new version. Note: `roll-console.sh` builds the console itself from the checkout, so the flagship runs a build stamped `54ae7fb9`, not the prebuilt `v0.28.5` that dev runs. If Paul wants flagship to run the exact dev bytes, the alternative is `ship-app.sh` with the prebuilt file and then the script's adopt and restart steps; that is not rehearsed.
-
-Then the doors (M1) and the roll evidence:
-
-```bash
-carlos move offline status --host canada.bdn.oncarlos.com --app <APP> --account <ACCT> --console "$FLAGC"; echo "exit $?"
-carlos system status --console "$FLAGC"
-fie 'systemctl is-active console.service; p=$(systemctl show -p MainPID --value console.service); readlink /proc/$p/exe; tr "\0" "\n" < /proc/$p/environ | grep -E "^CARLOS_(HOST_CLAIM|MOVES_PHASE1)=" | wc -l'
-```
-
-Pass: the status door answers (the plan's MV-O24 sentence) rather than a 404 (find `<APP>` and `<ACCT>` in 4.1); every box `current` at v0.28.5; the console `active`, running `versions/54ae7fb9/console`; 0 claim or Phase 1 variables. Roll back the console, if it must be, with `roll-console.sh` on the previous checkout; the app regions floor in the README does not apply (`CONSOLE_APP_REGIONS` is off).
-
-### 3.6 If a step fails
-
-| Failure | Action |
-|---|---|
-| A box `rolled-back` or `refused` | read the reason on its status line; fix that box; do not re-cut. Console waits |
-| ie fails the 20 s update gate | STOP; Paul |
-| `offline-move-1` missing on a box | STOP; no move |
-| The console script cannot verify the exe | do not retry blindly; read the script's message; Paul |
-
----
-
-## 4. The first flagship moves: canada, ips, kpmg
-
-Instances `canada.bdn.oncarlos.com`, `ips.bdn.oncarlos.com` and `kpmg.bdn.oncarlos.com`, on the ie box (`annie-welding`, `i-092c0c1eea75723cb`), from Ireland (the home placement, record region `""`, console name `ie`) to the UK (`uk`, eu-west-2, box `i-03c310ceaf50a9bab`). One at a time, each its own go, each started only after the previous one is finished and checked. No promotes to the app during a move.
-
-### 4.0 What has been measured (read-only, 2026-10-20)
-
-From `own/after236/`:
-- **Cgroup accounting** (`cgroup-delegation-check-20261020.md`, about 00:45Z): all seven boxes have `Delegate=yes`, `User=carlos`, controllers `cpu io memory pids`, a successful agent setup. Flagship was on v0.28.0. On ie, `carlos-exec@amadan.net` had 53 processes (a real count), 118 instance slices, 14 with processes. No box has `CARLOS_HOST_CLAIM` or `CARLOS_MOVES_PHASE1`; all have `CARLOS_HIBERNATE_BUCKET` set.
-- **Layout** (`flagship-layout-20261020.txt`): canada, ips and kpmg are `nested`. Each row says "still in /data from before its move, where the instance cannot see them: /data/<host>". The ie box also runs flat, foreign and external rows beside nested ones, so `carlos status --layout` warns that nested isolation on it "is not in force until none of those remains". The move does not depend on that, and does not change it.
-- **Legacy `/data/<host>` dirs** (`legacy-data-dirs-20261020.md`): they hold only old key and token copies, byte-identical (`cmp`) to the copies in the nested directory: canada 8K (`instance.key`), ips 12K (`instance.key`, `report.token`), kpmg 12K (the same two). Nothing live reads them. The move's `source-retire` parks `/data/<host>/`.
-- **Nested sizes** (the whole nested directory, litestream files included): canada 20M, ips 538M, kpmg 308M, each about 121 to 123 entries. The files tree has a 256 MiB limit (4.1 measures it).
-- **A question left open:** each nested `<host>/` also holds `instance.key.minted-after-migration-1791381051` (2026-10-07), different from the legacy key. Which key the live process uses was not confirmed. The move carries both byte for byte; 4.1 records the digests before so they can be compared after.
-
-### 4.1 Pre-checks on the day, as commands
-
-> **Paul's go: G14 (D8).** Moves were frozen on 2026-10-16 while the claim gate was narrowed. Lifting the freeze for this operator-run tool on flagship is Paul's decision, taken awake. Nothing below writes.
-
-Find the account and app of each instance (not recorded in the sources; set `ACCT` and `APP` for the move block from this):
-
-```bash
-carlos apps list --console "$FLAGC"
-carlos instances list --app <candidate app> --match canada --console "$FLAGC"
-```
-
-P0.2 (M9) on the four flagship boxes, the same `BLOCK` as 2.1 through `fie`, `fus`, `fuk`, `fau`. Pass: claim and Phase 1 counts 0, `User=carlos` (R3: any other value is a STOP), `Delegate=yes`, `carlos-stage.path` active and enabled (the UK box at least), `carlos v0.28.5`, no guard policy (unarmed). The console (3.5) shows no claim or Phase 1 variables.
-
-P0.3:
-
-```bash
-for h in canada ips kpmg; do
- H=$h.bdn.oncarlos.com
- aws --profile keymail s3api head-object --bucket "$FLAGB" --key "control/hosts/$H.json" >/dev/null 2>&1 && echo "control/hosts/$H.json PRESENT" || echo "control/hosts/$H.json absent"
- aws --profile keymail s3 ls "s3://$FLAGB/control/certs/$H" | wc -l
-done
-aws --profile keymail s3api head-object --bucket "$FLAGB" --key control/hosts-backfill.json >/dev/null 2>&1 && echo "hosts-backfill PRESENT" || echo "control/hosts-backfill.json absent"
-carlos status --layout --console "$FLAGC" | grep -E 'canada|ips\.bdn|kpmg'
-UKDATA=$(fuk 'grep "^CARLOS_HIBERNATE_BUCKET=" /etc/carlos/host.env | cut -d= -f2- | tr -d "\""' | tail -1); echo "uk data: $UKDATA"
-```
-
-Pass: all `absent`; at least one object under `control/certs/<host>` for each host (a certificate path on the UK box, #310; the edges' mirror serves it); the three rows `nested`. The `ie` box is the only box in the home region and the uk box the only one in `uk` (MV-O22, MV-O26 assume it); `3.4` showed it.
-
-The instance record, per host (class refusals are enforced by the door, but read the record before the window):
-
-```bash
-aws --profile keymail s3 cp --quiet "s3://$FLAGB/apps/$ACCT/$APP/instances/$H.json" - | jq .
-```
-
-Pass: no seed, replica or replicas, steering, unit, fleet, pool or open run on the record; hibernating. The door refuses those classes (the plan's `class` row), so a surprise is a STOP rather than a workaround.
-
-P0.6 per instance, on the ie box (the nested directory is the real one, `/data/.instances/<host>`; `/data/instances/<host>` is the mount view):
-
-```bash
-for H in canada.bdn.oncarlos.com ips.bdn.oncarlos.com kpmg.bdn.oncarlos.com; do
- fie "set -- $H; $(cat "$W/sizes.box.sh")"
-done
-```
-
-Pass: the files tree (`du -sb`, first number) under 268435456 bytes (256 MiB; over that the seal fails safely and the move cannot proceed); no sidecar file (MV-O28); the legacy directory holds only the key copies. Record the database size: seal and landing time scale with it.
-
-Key digests and shape, before (sha256 prefixes only):
-
-```bash
-for H in canada.bdn.oncarlos.com ips.bdn.oncarlos.com kpmg.bdn.oncarlos.com; do
- fie "set -- $H; $(cat "$W/keys.box.sh")"
-done
-```
-
-Save to `$EVID`. P0.5: Paul's login is a system operator and a member of the customer's account (the doors check both; they answer a byte-identical 404 otherwise), and the customer's own sign-in is something Paul can test after `open`.
-
-P0.7: the edges files in 3.4 showed no stale file. The UK staging lane (P0.4): simulate the IE box role against the UK data bucket from DOCS-T1, as in 2.1, with the flagship role (find it with `aws --profile keymail ec2 describe-instances --instance-ids "$FIE" --query 'Reservations[0].Instances[0].IamInstanceProfile.Arn'` then `aws --profile keymail iam get-instance-profile --instance-profile-name <name>`). Pass: `allowed` for put, get, delete on `moves/*` and list on the `moves/` prefix. Not rehearsed.
-
-### 4.2 The return lane (infra, Paul's approval)
-
-> **Paul's go: G15.** IE's `sibling_staging_arns` includes the UK data bucket (as read in carloku-infrastructure); UK's grant to the IE data bucket is not applied. Without it, a move back after `open` is impossible and the only road is fixing forward on the UK box. Applying it is a production infra change; the plan recommends doing it before the first move (M17 approved the return lane). Decide before G16. This runbook gives no command for it: it is carloku-infrastructure work.
-
-If G15 is not given, every move is committed at `open` and the rollback paths in 4.8 are only fix-forward.
-
-### 4.3 Downtime budget
-
-Run 9 measured (M10), for a 4 MB instance: start 2.2 s, seal 6.1 s, flip 4.3 s, open 4.2 s, first request 5.7 s: about 23 to 25 s of steps. The offline total was 366 s because of defect 7 (a late first flip of 2 min 40 s of the operator's own, and about 1 min 10 s waiting for the 5 minute moves pass). So:
-
-| | Today (v0.28.5) | Once defect 7 is fixed |
-|---|---|---|
-| Offline per instance | about 6 minutes: dominated by the report wait before `flip` and again before `open` (up to about 6 minutes each if a report has gone stale, retried every 15 s) | under 1 minute for a small instance |
-| Worst case to plan the window for | start + seal + two stale-report waits + landing + first request: about 15 minutes for a small instance | about 2 minutes |
-| `finish` | 4 to 5 minutes more, with the instance serving; not downtime | same |
-| Second stop | about an hour after `open`, 20 to 30 s (4.6) | same |
-
-The three customer instances are larger than 4 MB: canada 20M, kpmg 308M and ips 538M of nested directory. Seal (the final mirror round) and the landing's verification scale with the replica and files, and Run 9 did not measure them. So move canada first, record its `start`, `seal`, `flip`, `open` and first-request times, and set the window for ips and kpmg from canada's seal time scaled by size. Offer the customer a window longer than the expected offline time: 15 minutes for canada, and a figure from canada's measurements for the others.
-
-Things the customer will see: timers due while the instance is offline do not fire (refused "maintenance fence active", then gone); once-timers armed by the app are carried and fire at their due time; schedule run history does not carry, so a schedule may fire once more or once less around the window.
-
-### 4.4 The customer notice line
-
-A draft for Paul to edit and send; it has not been through copy review. One line per instance:
-
-> We will move `<host>` to our UK region on `<date>` at `<time>` UTC. It will be offline for about 6 minutes, and we have booked up to `<window>`. Nothing is lost: your data moves with it, and if anything looks wrong before we reopen it, we put everything back as it was. Scheduled jobs that fall due while it is offline will not run.
-
-Send it at least a day ahead, and tell the customer's contact when each move starts and finishes.
-
-### 4.5 The move
-
-For each instance in turn: canada, then ips, then kpmg. The move block is 2.3's (`MV`, `MVR`, `ts`) with these values:
-
-```bash
-H=canada.bdn.oncarlos.com APP=<APP> ACCT=<ACCT> C=$FLAGC
-IEDATA=$(fie 'grep "^CARLOS_HIBERNATE_BUCKET=" /etc/carlos/host.env | cut -d= -f2- | tr -d "\""' | tail -1)
-UKIP=$(aws --profile keymail --region eu-west-2 ec2 describe-instances --instance-ids "$FUK" --query 'Reservations[0].Instances[0].PublicIpAddress' --output text)
-IEIP=$(aws --profile keymail --region eu-west-1 ec2 describe-instances --instance-ids "$FIE" --query 'Reservations[0].Instances[0].PublicIpAddress' --output text)
-```
-
-Use `facts` through `fie` and `fuk` (Appendix A) in place of `sophie` and `dennis`, and `--profile keymail` and `$FLAGB`/`$IEDATA`/`$UKDATA` in place of the dev values. The customer's app has no `/report`; the evidence below is app-agnostic.
-
-> **Paul's go: G16 (canada), G17 (ips), G18 (kpmg).** One each. The instance is offline from `start` until `open`. Do not start the next one until `finish` has completed and 4.7 is done for this one.
-
-Before (once per instance, read-only, save to `$EVID`):
-
-```bash
-fie "set -- $H; $(cat "$W/facts.box.sh")"
-aws --profile keymail s3 cp --quiet "s3://$IEDATA/instances/$H/lock.json" - | jq -c .
-curl -s -m 30 -o /dev/null -w 'ie before: %{http_code} %{time_total}s\n' --resolve $H:443:$IEIP https://$H/
-carlos schedule ls --app "$APP" --account "$ACCT" --console "$FLAGC"
-```
-
-M5 on the customer's instance: the move's landing renders `<host>.config.env` on the target from the bundle. Do not change any setting on a customer's instance to cure a missing file.
-
-The sequence, with the corrections:
-
-```bash
-T0=$(date +%s); echo "start $(ts)"
-MV start "--to uk"; echo "start exit=$? $(ts)"
-MV status
-echo "seal $(ts)"; MV seal; echo "seal exit=$? $(ts)"
-MV status
-fie "set -- $H; $(cat "$W/procs.box.sh")"
-carlos logs --app "$APP" --account "$ACCT" --console "$FLAGC" --since 15m | grep -E 'exited|stopp|fence' | tail -3
-echo "flip $(ts)"; MVR flip; echo "flip exit=$? $(ts)"
-```
-
-Read `status` between the doors. `flip` within two minutes of `seal`, and `open` within two minutes of `flip` (M2). A stale-report refusal ("still runs a process" with "Its report is not current") is retried by `MVR`; a current report with a real process count is MV-O31: STOP and `abort`. `start` waits for every box in ie to say it stopped the host (the flagship has one): a box that never reports blocks `seal`; the move waits and `abort` is always available before `open`.
-
-Check the target before opening:
-
-```bash
-fuk "set -- $H; $(cat "$W/facts.box.sh")"
-```
-
-Pass: the row is `landing`, region uk, flat; `<host>.env` sha equal to the IE box's; the instance key digest equal; `config.env` present with the same names as before; the `instance.key` digest equal; the timers carried. Anything missing: `abort` (4.8). Only then:
-
-```bash
-echo "open $(ts)"; MVR open; echo "open exit=$? $(ts)"
-for i in $(seq 1 60); do c=$(curl -s -m 30 -o /dev/null -w '%{http_code}' --resolve $H:443:$UKIP https://$H/); echo "uk $c $(ts)"; case "$c" in 2*|3*) break;; esac; sleep 3; done
-echo "serving: $(( $(date +%s) - T0 )) s since start"
-curl -sI --resolve $H:443:$UKIP https://$H/ | head -8
-curl -sI --resolve $H:443:$IEIP https://$H/ | head -8
-curl -sI https://$H/ | head -8
-```
-
-Pass: a 2xx from the UK address and from the IE address (the IE box backhauls to uk), the same headers and the expected version, and the customer's own sign-in works (Paul, or the customer's contact). The first request waits for the agent's stage and root's stage pass (about 8 s); a longer wait means `carlos-stage.path` is not armed on the UK box (3.2 showed it). A failing check after `open` is fixed forward on the UK box, where the only live copy is (abort is refused, MV-O27).
-
-Then `finish`:
-
-```bash
-echo "finish $(ts)"; MVR finish; echo "finish exit=$? $(ts)"
-MV status
-```
-
-Expected: "Waiting for <box> to clean up <host>." then "Moved. <host> is served from uk. It was offline for <n> seconds." and exit 0, after 4 to 5 minutes.
-
-### 4.6 The nesting second stop
-
-After `open` the row on the UK box is flat. The layout pass nests it only when it is asleep, or stops it after a 1-hour grace and nests it (Run 9: exactly 1 h after the first wake, a 24 s second stop). A hibernating customer instance will usually sleep first, in which case there is no second stop. Tell the customer's contact to expect a stop of under a minute about an hour after the move if the instance is still awake. About an hour after `open`:
-
-```bash
-carlos status --layout --console "$FLAGC" | grep -E "$H|WARNING"
-fuk "journalctl -u carlos-edge --no-pager --since '-80 min' | grep -E 'layout: ' | grep $H | tail -5"
-carlos logs --app "$APP" --account "$ACCT" --console "$FLAGC" --since 90m | grep -E 'instance (stopping|exited|woke)' | tail -5
-curl -s -m 30 -o /dev/null -w 'uk after nesting: %{http_code}\n' --resolve $H:443:$UKIP https://$H/
-```
-
-Pass: the host shows `nested` on the UK box (and the "nested beside flat" warning gone for that row), one stop and wake at most, the instance answers 2xx. Do the next move after this check, not before, so two instances are never being nested at once.
-
-### 4.7 Cleanup after each `finish`
-
-1. **Stray env file (M6, defect 8).** On the IE box:
-
- ```bash
- fie "set -- $H check; $(cat "$W/stray.box.sh")"
- ```
-
- If a `<host>.env` is there (written by the source's scheduler after `open`), move it into `/data/.offline-moves/<host>/<id>/source/` and record it; never delete it:
-
- ```bash
- fie "set -- $H move; $(cat "$W/stray.box.sh")"
- ```
-
-2. **The lease (M7).** The IE `instances/<host>/lock.json` is `owner moved:<id>` with `expires_at 1970-01-01T00:00:00Z`: that expired object is the normal end state, not an abandoned move.
-
- ```bash
- aws --profile keymail s3 cp --quiet "s3://$IEDATA/instances/$H/lock.json" - | jq -c .
- aws --profile keymail s3 cp --quiet "s3://$UKDATA/instances/$H/lock.json" - | jq -c .
- aws --profile keymail s3 cp --quiet "s3://$FLAGB/apps/$ACCT/$APP/instances/$H.json" - | jq -c '{region, move, last_move, record_seq}'
- ```
-
- Pass: IE's is expired `moved:<id>`; UK's is the UK box's own lease; the record has region `uk`, `move` null, `last_move` outcome `done`. The cleanup recipe is only for a `moved:` owner whose `expires_at` is still in the future for a move no longer in flight (read it with the lock above; if the move is not in flight, delete that one object; the 7-day expiry frees it anyway).
-3. **Parked state, never deleted.** `/data/.offline-moves/<host>/<id>/` on the IE box holds `sealer/`, `source/instance/`, `source/<host>.json` and the legacy `/data/<host>/` copy. `/data/instances/<host>` (the mount view), `/data/.instances/<host>` (empty) and `/opt/carlos/live/<host>` (a root-owned link) stay in place by design. List them and add them to the record for the claim census.
-4. **The IE row is gone.** `carlos status --layout --console "$FLAGC" | grep "$H"` shows the host on the UK box only.
-5. The notice: tell the customer's contact it is done.
-
-### 4.8 Rollback paths
-
-**Before `open`: abort.** At any doubt, a failed item, a target missing `config.env`, or a real MV-O31.
-
-```bash
-MVR abort; echo "abort exit=$?"
-MV finish; echo "finish exit=$?"
-```
-
-Both exit 3 (M8): the CLI's "aborted" code, the expected result, not a failure. `abort` prints "Moving <host> back to ie." and `finish` "<host> is back in ie and serving. Nothing was lost." Run 9 (abort after flip): 23 s offline in all. Verify: the IE row `ready` and nested, a 2xx from the IE address, the IE lease `<box>:<n>` at generation 2, no lease and no `moves/<host>` objects in the UK bucket, no row on the UK box (it parks what it extracted under `/data/.offline-moves/<host>/<id>/target/`), the record back in home with `last_move` outcome `aborted`. The source's local database was never purged, so nothing is lost.
-
-**After `open`.** `abort` is refused (MV-O27). The UK box holds the only live copy and may have taken writes. Two roads:
-1. **Fix forward on the UK box.** The usual answer. Most failures after `open` (an app that cannot boot on uk, a certificate, a store reachability problem) are found in the first minute by the checks in 4.5.
-2. **A new move back, uk to ie.** It needs UK's staging grant on the IE data bucket (G15, infra, Paul's approval), and it is unrehearsed. Before starting it, read the live link on the IE box:
-
- ```bash
- fie "H=$H; readlink /opt/carlos/live/\$H"
- ```
-
- If it names a different version from the one the instance runs now (the app was promoted since), do not start: the return move's landing fails the `release` item (MV-O177), and there is no safe road to clear the root-owned link from here. Take it to Paul. If the grant is not in place, fix forward and file the gap.
-
----
-
-## 5. Cleanup of this runbook's own scratch
-
-At the end of the work, by exact path:
-
-```bash
-rm -r -- "$W"
-```
-
-Remove `$W` (helpers, the identity copy, the rehearsal secrets and binary); `$D` was removed in 1.a.5. Keep `$EVID` (`~/.cache/release-v0.28.5/evidence-roll-20261020`) until Paul says. No server, watcher or background process was started by this runbook. The E1 aside directory goes in 2.8 only.
-
----
-
-## Appendix A. Helpers
-
-`ssm.sh` runs one command as root on a box over SSM and prints its stdout; it is the claim runbook's "How commands are run" helper with a profile argument, stdout and stderr kept apart, and a non-zero exit unless the command succeeded. One deliberate change: the command goes into a temporary file and runs with stdin closed, instead of being piped into `bash`, because `systemd-run --pipe` (the re-arm's apply step) would otherwise read the rest of the piped script. SSM returns at most 24,000 characters per command.
-
-```bash
-mkdir -p "$TMPDIR/v0285"
-cat > "$TMPDIR/v0285/ssm.sh" <<'EOF'
-#!/bin/bash
-# usage: ssm.sh <profile> <region> <instance-id> '<shell command>'
-set -euo pipefail
-profile=$1 region=$2 inst=$3 cmd=$4
-b64=$(printf '%s' "$cmd" | base64 -w0)
-params=$(python3 -I -c 'import json,sys;print(json.dumps({"commands":["f=$(mktemp) && echo %s | base64 -d > $f && bash $f </dev/null; rc=$?; rm -f $f; exit $rc" % sys.argv[1]]}))' "$b64")
-id=$(aws --profile "$profile" --region "$region" ssm send-command --instance-ids "$inst" \
- --document-name AWS-RunShellScript --parameters "$params" --query Command.CommandId --output text)
-until s=$(aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" \
- --instance-id "$inst" --query Status --output text 2>/dev/null) && [ "$s" != InProgress ] && [ "$s" != Pending ]; do sleep 3; done
-aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" --instance-id "$inst" \
- --query StandardOutputContent --output text
-aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" --instance-id "$inst" \
- --query StandardErrorContent --output text >&2
-[ "$s" = Success ]
-EOF
-chmod 700 "$TMPDIR/v0285/ssm.sh"
-SSM="$TMPDIR/v0285/ssm.sh"
-leo() { "$SSM" kass eu-west-1 "$LEO" "$1"; }
-sophie() { "$SSM" kass eu-west-1 "$SOPHIE" "$1"; }
-dennis() { "$SSM" kass eu-west-2 "$DENNIS" "$1"; }
-fie() { "$SSM" keymail eu-west-1 "$FIE" "$1"; }
-fus() { "$SSM" keymail us-east-1 "$FUS" "$1"; }
-fuk() { "$SSM" keymail eu-west-2 "$FUK" "$1"; }
-fau() { "$SSM" keymail ap-southeast-2 "$FAU" "$1"; }
-```
-
-The roster, read-only, from sophie's own credentials (C4: run it after each console-driven update, promote or rollback; it stages nothing):
-
-```bash
-rosterview() {
- sophie 'cd /root/claim-trial && /opt/carlos/carlos system claims inspect --bucket carlos-dev-640012953448 --aws-region eu-west-1 --public-key "$(cat release.pub)" 2>/dev/null' \
- | jq -c '{rev: .roster.revision, activations: (.roster.activations | keys)}'
-}
-```
-
-`p9.box.sh` is the claim runbook's P9 box command (console mail is off), verbatim. The harness kept it as a file; copy it, or extract the block from the claim runbook:
-
-```bash
-cp "$HOME/amadan.net/carlos/platform-harness-build/harness/scenarios/cohort1/blocks/p9.box.sh" "$W/p9.box.sh"
-```
-
-`ssm_run`, `box_get`, `box_put` and `box_inspect` are the claim runbook's second helper block in "5.1 Roster and enrollment", pasted unchanged, after `export AWS_PROFILE=kass R=eu-west-1`. `box_put` writes with `>` and `box_inspect` stages `roster.json` and `rev` in `/root/claim-trial` on the box it is given (scratch, overwritten each time).
-
-`facts.box.sh` is Run 9's `facts`, a box script that takes the host as `$1`. Save it once:
-
-```bash
-cat > "$W/facts.box.sh" <<'EOF'
-H=$1
-for d in /data/instances/$H /data; do [ -f $d/$H.env ] && { E=$d/$H.env; break; }; done
-echo " env file: ${E:-absent} $( [ -n "${E:-}" ] && sha256sum < $E | cut -c1-16) key-sha $( [ -n "${E:-}" ] && grep ^CARLOS_INSTANCE_KEY= $E | cut -d= -f2- | tr -d '"\n' | sha256sum | cut -c1-16)"
-for f in /data/instances/$H/$H.config.env /data/$H.config.env; do [ -f $f ] && echo " config.env $f: $(cut -d= -f1 $f | sort | tr '\n' ' ')"; done
-for f in /data/instances/$H/$H/instance.key /data/$H/instance.key; do [ -f $f ] && echo " files: $f sha $(sha256sum < $f | cut -c1-16)"; done
-ls /data/instances/$H 2>/dev/null | tr '\n' ' ' | sed 's/^/ instance dir: /'; echo
-python3 - $H <<'PY'
-import sqlite3,sys
-h=sys.argv[1]; c=sqlite3.connect('file:/data/registry.db?mode=ro',uri=True)
-r=c.execute('select status,last_error,region,db_path,next_due,replication from routes where host=?',(h,)).fetchall()
-print(' row:', r)
-try: print(' timers:', c.execute('select * from timers where host=?',(h,)).fetchall())
-except Exception as e: print(' timers: ?', e)
-PY
-ls -d /data/.offline-moves/$H/*/* 2>/dev/null | sed 's/^/ parked: /'
-EOF
-```
-
-The other small box scripts, each taking the host as `$1`. Save them once:
-
-```bash
-# cfg.box.sh: M5, is the nested instance's config.env rendered?
-cat > "$W/cfg.box.sh" <<'EOF'
-H=$1
-echo "== $H"
-ls -la /data/instances/$H/ 2>&1 | head -12
-f=/data/instances/$H/$H.config.env
-if [ -f $f ]; then echo "config.env names: $(cut -d= -f1 $f | sort | tr '\n' ' ')"; else echo "config.env MISSING"; fi
-EOF
-# procs.box.sh: how many processes the host's cgroup slice holds (the operator's check before flip)
-cat > "$W/procs.box.sh" <<'EOF'
-H=$1
-f=$(find /sys/fs/cgroup/carlos.slice/carlos-instances.slice -maxdepth 1 -name "carlos-instances-$H.slice" 2>/dev/null | head -1)
-echo "slice: ${f:-none}"
-if [ -n "$f" ]; then echo "processes: $(cat $f/cgroup.procs | wc -l)"; else echo "processes: 0 (no slice)"; fi
-d=$(find /sys/fs/cgroup/carlos.slice/carlos-edge.service -maxdepth 1 -name "carlos-exec@$H" 2>/dev/null | head -1)
-if [ -n "$d" ]; then echo "exec cgroup $d processes: $(cat $d/cgroup.procs | wc -l)"; fi
-EOF
-# stray.box.sh <host> check|move: M6, the env file the source's scheduler re-creates after open (defect 8)
-cat > "$W/stray.box.sh" <<'EOF'
-H=$1 MODE=${2:-check}
-echo "== /data/.instances/$H"; ls -la /data/.instances/$H/ 2>&1
-echo "== parked"; ls -d /data/.offline-moves/$H/*/* 2>&1
-if [ "$MODE" = move ]; then
- ID=$(ls /data/.offline-moves/$H | head -1)
- if [ -z "$ID" ] || [ ! -f /data/.instances/$H/$H.env ]; then echo "nothing to move"; exit 0; fi
- mv -n /data/.instances/$H/$H.env /data/.offline-moves/$H/$ID/source/$H.env.stray-after-open
- ls -la /data/.offline-moves/$H/$ID/source/
-fi
-EOF
-# sizes.box.sh: P0.6, files tree (limit 256 MiB), nested directory, database, sidecars, the legacy /data/<host>
-cat > "$W/sizes.box.sh" <<'EOF'
-H=$1; D=/data/.instances/$H
-echo "== $H"
-echo "files tree bytes: $(du -sb $D/$H 2>/dev/null | cut -f1)"
-echo "nested dir: $(du -sh $D | cut -f1)"
-ls -l $D/$H.db 2>&1 | awk '{print "db bytes:", $5}'
-ls $D/*sidecar* /data/$H-sidecar.env 2>&1 | head -2
-ls -la /data/$H 2>&1 | head -6
-EOF
-# keys.box.sh: sha256 prefixes of the instance key and the key files (never the values)
-cat > "$W/keys.box.sh" <<'EOF'
-H=$1; D=/data/.instances/$H
-echo "== $H"
-printf 'env CARLOS_INSTANCE_KEY %s\n' "$(grep ^CARLOS_INSTANCE_KEY= $D/$H.env | cut -d= -f2- | tr -d '"\n' | sha256sum | cut -c1-16)"
-for f in $D/$H/instance.key $D/$H/instance.key.minted-after-migration-*; do [ -f $f ] && printf '%s %s\n' $f "$(sha256sum < $f | cut -c1-16)"; done
-ls $D | head -30
-EOF
-```
-
----
-
-## Appendix B. What is not sourced exactly
-
-- **The `x-carlos-version` value of a protected console** after E1 (`54ae7fb9`, `v0.28.5`, or another string). The exe sha256 is the authority.
-- **E1 step 5's "console report"** is run here as `console-report` (dry run, then apply, then the box report's `console_processes` count). The ruling's words do not name the command.
-- **Staging `/root/carlos-v0.28.5` on a real box.** Run 9 pushed the file from the host. Here the agent's fetched cache is copied and checked against both signed shas; the hand-stage path when the cache is missing is not rehearsed.
-- **The account and app names of canada, ips and kpmg**, and the flagship data bucket names. 4.1 and 4.5 read them from the console and the boxes.
-- **P0.4's IAM check** (the staging lane) by `simulate-principal-policy`: not run in Run 9 or anywhere; the dev role names `carlos-dev-host` (sophie) and the flagship role names are from the claim runbook and must be confirmed.
-- **Moves of 300 to 540 MB instances.** Run 9 moved 4 MB. Timings for seal and landing at those sizes are unmeasured.
-- **A move back (uk to ie)**, the `--to` name for the home, and MV-O177's trigger: from the plan only.
-- **The v0.28.5 release notes say to leave `CARLOS_SWAP` unset**; it is set on all seven boxes by design. This runbook leaves it alone.
-- **Defects 6, 7 and 8** are described from the Run 9 findings and have no fix yet; their workarounds here (M2, M5, M6) are the corrections in `RUNLOG.md`.
diff --git a/docs/superpowers/plans/2026-10-21-offline-move-runbook.md b/docs/superpowers/plans/2026-10-21-offline-move-runbook.md
new file mode 100644
index 000000000..c31df766c
--- /dev/null
+++ b/docs/superpowers/plans/2026-10-21-offline-move-runbook.md
@@ -0,0 +1,894 @@
+# Offline move runbook: moving one instance to another region with `carlos move offline` (v0.28.7 and later)
+
+This is the operator runbook for moving one instance from one region to another with planned downtime, using the pre-copy (`stage`) that v0.28.7 added. It was rewritten on 2026-10-21 from what the first real moves taught. Its commands are the ones that worked on dev and on the flagship on 2026-10-20 and 2026-10-21, with the instance names replaced by placeholders.
+
+The file runs nothing and authorizes nothing. Moving a customer's instance needs Paul's go for that instance, and anything that writes to a box as root needs its own approval (AGENTS.md, "Production infrastructure needs scoped approval"). A step that writes says so in a line that starts **Go:**. Everything else is read-only.
+
+Sources: harness `RUNLOG.md` Runs 9 and 10 with corrections M2 to M15; the dev rehearsals on v0.28.6 and v0.28.7; the flagship moves of 2026-10-21, without and with `stage` (all in the session's `own/after236/` notes). The history at the end says what happened when.
+
+## The short version
+
+1. Check the fleet once (section 2) and the instance and the target box before each move (section 3). The target check is the one that matters most: a stale `/opt/carlos/live/<host>` link on the target makes `flip` fail only after the instance is already offline.
+2. Run `stage` while the instance serves, and run it again until a round copies almost nothing (section 4).
+3. Run `move.sh`. It stages once more, records a baseline, then runs `start`, `seal`, `flip`, a check of the target and `open` back to back, judging each step by its exit code. Before `open`, any surprise aborts the move. Expect about 2.5 to 3 minutes offline for an instance with a 1.6 to 3.7 GB replica (section 5).
+4. Measure the offline time yourself, from just before `start` to the first 2xx through the target. The console's figure read 40 to 75 seconds low on the flagship (section 6).
+5. Verify on the target with the row fingerprint (section 7), then run `finish` (section 8).
+6. About an hour after `open`, the target stops the instance briefly to nest it. Check it (section 9).
+7. Once everything checks out, delete the source region's copy of the replica by exact key, keeping `lock.json` (section 10).
+8. Before `open`, a problem means `abort`, and nothing is lost. After `open` there is no move back: fix forward on the target (section 11).
+
+Write every step to the log as it runs, and after any restart, read `carlos move offline status` before anything else (section 1).
+
+## Contents
+
+- 0. Before you start
+- 1. Logging discipline
+- 2. Fleet pre-checks, once per session
+- 3. Per-instance pre-checks, including the target box
+- 4. Staging
+- 5. The offline doors
+- 6. Measuring the downtime
+- 7. Verification
+- 8. finish
+- 9. The nesting stop, about an hour after open
+- 10. Replica cleanup
+- 11. Rollback
+- 12. Known gaps
+- 13. Rehearsing on dev
+- 14. Telling the customer
+- Appendix A. Setup and helper scripts
+- History
+
+---
+
+## 0. Before you start
+
+**Placeholders.** `shop.example.com` is the instance's host, `<acct>` its account sqid, `<app>` its app. The source is "the IE box" (the home region, record region empty, console name `ie`). The target is "the UK box" (region `uk`). Swap the values in `env.sh` (Appendix A) for another pair of regions.
+
+**What has to be true.**
+
+- Every box in both regions and the console run v0.28.7 or later. `stage` refuses while any box in either region lacks the `offline-stage-1` capability.
+- Your login is a system operator on the console and a member of the instance's account. The doors check both and answer a byte-identical 404 otherwise.
+- Paul has given his go for this instance, and the customer has been told the window (section 14).
+- No other instance in the deployment is staged or moving. There is one offline-move lock per deployment, and a staged move holds it. Stage, move and finish one instance, then start on the next.
+- Nobody promotes the app from the first `stage` until `finish`. The landing's `release` item compares the build the seal recorded with what the target holds.
+- `carlos move` refuses to run as root. Run it as yourself on DOCS-T1.
+
+**Getting the fleet onto the release.** That is the release recipe in the README ("Releasing the platform") and each release's operator notes, not this file. Read the notes for every release between the fleet's version and the one you roll: [v0.28.5](https://github.com/carlosframework/releases/releases/tag/v0.28.5), [v0.28.6](https://github.com/carlosframework/releases/releases/tag/v0.28.6), [v0.28.7](https://github.com/carlosframework/releases/releases/tag/v0.28.7). The parts that matter for moves:
+
+- Roll dev first, then flagship. Boxes before their console.
+- From v0.28.5 on, every box takes the next release through its ordinary `carlos system update`, armed or not. The hand re-arm of the v0.28.5 roll is history.
+- A guard-armed console box (dev's) upgrades its console with `carlos system claims install-console --upgrade --from <sha256 of the running console>` as root, after the box's router is on the new release (the v0.28.6 notes). The flagship console is unguarded and rolls by ship and promote.
+- After the roll, check that every box's edges file lists both `offline-move-1` and `offline-stage-1` (2.2).
+
+**Set up** the scratch directory, `env.sh` and the helpers in Appendix A before anything else.
+
+---
+
+## 1. Logging discipline
+
+On 2026-10-21 a session restart killed a move script in the middle of a move. Its log wrapper wrote a step's output only when the step finished, so the log showed nothing, and the resumed session believed the move had not started. The instance had been started and sealed, and stayed offline for 12.7 minutes until someone read `status` and aborted it. Nothing was lost, but the outage was avoidable.
+
+The rules:
+
+1. **Write each step to the log as it runs**, not when it ends. `L` in Appendix A pipes output through `tee -a` line by line, and `move.sh` and `stage.sh` print as they go.
+2. **Before each door, log a line `ABOUT TO RUN <door> <host> <UTC time>`.** `move.sh` and `stage.sh` do it. If you run a door by hand, write the line first.
+3. **After any restart** (your session, the agent, a lost terminal), run `MV status` for every host that might be in play **before** reading the log or doing anything else. "No move is in flight", "is done" and "is aborted" are safe. Anything else is a live move: decide from `status`, not from the log.
+4. Write a short note into the log before each block saying what you are about to do and what you expect.
+5. Never print a secret. The helpers print names, sha256 prefixes and counts only.
+
+---
+
+## 2. Fleet pre-checks, once per session
+
+All read-only. Run them through `L` so they land in the log.
+
+### 2.1 Versions and the doors
+
+```bash
+carlos version; sha256sum "$(command -v carlos)" | cut -c1-16
+curl -sS -o /dev/null -D - "$C/healthz" | grep -i -E '^HTTP|x-carlos-version'
+carlos system status --console "$C"
+MV status
+```
+
+Pass: the CLI is v0.28.7 or later; the console answers 200; every box reads `current` on the release; `MV status` answers "No move is in flight for shop.example.com." (or the outcome of an earlier move), not a 404. A 404 means an older console or that you are not an operator and member.
+
+### 2.2 Edges files: capabilities, buckets, secrets key
+
+```bash
+aws --profile "$PROFILE" s3 ls "s3://$DEPB/control/edges/"
+for k in $(aws --profile "$PROFILE" s3 ls "s3://$DEPB/control/edges/" | awk '{print $4}'); do
+ echo "== $k"; aws --profile "$PROFILE" s3 cp --quiet "s3://$DEPB/control/edges/$k" - | jq -c '{region, placement, caps: .capabilities, secrets_key_fp: (.secrets_key_fp // "" | .[0:20]), data_bucket, data_bucket_region, hibernation_configured, hosts: (.hosts | length)}'
+done
+```
+
+Pass:
+
+- one file per live box, and no file for a box that no longer exists (a stale file naming the home placement blocks `seal`; removing it needs Paul);
+- every box in both regions lists `offline-move-1` **and** `offline-stage-1`;
+- the target's `placement` is the region you move to, and it has a `data_bucket` (that is `$TGTDATA`);
+- `hibernation_configured` true;
+- the target's `secrets_key_fp` equals the source's. The start door checks only the target's fingerprint against the console. A box with no `CARLOS_SECRETS_KEY` publishes no fingerprint at all; on dev, leo-climbing is such a box, and it is not a blocker unless it is the target.
+
+### 2.3 The boxes and the console
+
+```bash
+src "$(cat "$W/block.box.sh")"
+tgt "$(cat "$W/block.box.sh")"
+src 'P=$(systemctl show -p MainPID --value console.service 2>/dev/null); [ -n "$P" ] && [ "$P" != 0 ] && { tr "\0" "\n" < /proc/$P/environ | grep -E "^CARLOS_(HOST_CLAIM|MOVES_PHASE1)=" ; echo "console exe sha16 $(sha256sum < /proc/$P/exe | cut -c1-16)"; } || echo "no console on this box"'
+```
+
+Pass on both boxes: `claim lines: 0`, `phase1 lines: 0`, `edge env claim/phase1 vars: 0`; `User=carlos` (any other value is a STOP: the move reads bucket and tenant-reachable inputs, so it never runs where the agent runs as root); `Delegate=yes`; `ActiveState=active`; `stage.path: active enabled`; the release version; the same `secrets key sha8` on both. An armed guard is allowed. The console, if it runs on the source box, shows no `CARLOS_HOST_CLAIM` value and no `CARLOS_MOVES_PHASE1`. Check every other box in the source region the same way: `start` waits for every box in the source region to confirm it has stopped the host.
+
+### 2.4 The staging lane
+
+The source box's role must be able to write into the target data bucket's `moves/` prefix. The boxes have no `aws` CLI, so simulate the policy from DOCS-T1:
+
+```bash
+P=$(aws --profile "$PROFILE" --region "$SRC_REGION" ec2 describe-instances --instance-ids "$SRC_ID" --query 'Reservations[0].Instances[0].IamInstanceProfile.Arn' --output text)
+R=$(aws --profile "$PROFILE" iam get-instance-profile --instance-profile-name "${P##*/}" --query 'InstanceProfile.Roles[0].Arn' --output text); echo "role $R"
+aws --profile "$PROFILE" iam simulate-principal-policy --policy-source-arn "$R" --action-names s3:PutObject s3:GetObject s3:DeleteObject --resource-arns "arn:aws:s3:::$TGTDATA/moves/x/y" --query 'EvaluationResults[].[EvalActionName,EvalDecision]' --output text
+aws --profile "$PROFILE" iam simulate-principal-policy --policy-source-arn "$R" --action-names s3:ListBucket --resource-arns "arn:aws:s3:::$TGTDATA" --context-entries ContextKeyName=s3:prefix,ContextKeyValues=moves/,ContextKeyType=string --query 'EvaluationResults[].[EvalActionName,EvalDecision]' --output text
+```
+
+Pass: `PutObject allowed`, `DeleteObject allowed`, `ListBucket allowed`, and **`GetObject implicitDeny`**. The deny is the designed grant (Put and Delete on `moves/*`, a `moves/`-conditioned List, never `instances/*` and never Get). `implicitDeny` on Put, Delete or List means the lane is missing: STOP, it is an infra change.
+
+### 2.5 Leftovers in the control plane
+
+```bash
+aws --profile "$PROFILE" s3api head-object --bucket "$DEPB" --key control/hosts-backfill.json >/dev/null 2>&1 && echo "hosts-backfill PRESENT" || echo "control/hosts-backfill.json absent"
+carlos status --layout --console "$C" | grep -E "$H|WARNING"
+```
+
+Pass: `absent`. The layout row for the host is `nested` on the source. A warning that the source box "runs nested instances beside flat, foreign or external ones" is about the box, not this move, and does not block it.
+
+---
+
+## 3. Per-instance pre-checks
+
+### 3.1 The record and the doors
+
+```bash
+MV status
+aws --profile "$PROFILE" s3 cp --quiet "s3://$DEPB/apps/$ACCT/$APP/instances/$H.json" - | jq -c .
+aws --profile "$PROFILE" s3api head-object --bucket "$DEPB" --key "control/hosts/$H.json" >/dev/null 2>&1 && echo "control/hosts/$H.json PRESENT" || echo "control/hosts/$H.json absent"
+aws --profile "$PROFILE" s3 ls "s3://$DEPB/control/certs/" | grep -c "$H"
+carlos schedule ls --app "$APP" --account "$ACCT" --console "$C"
+```
+
+Pass: no move in flight; the record has no seed, replica or replicas, steering, unit, fleet, pool or open run (the door refuses those classes, so a surprise is a STOP, not a workaround); `control/hosts/<host>.json` absent. For certificates, either an object under `control/certs/` for the host or a wildcard that covers it; confirm TLS through the target before the move with `curl -sS -o /dev/null -w '%{http_code} ssl_verify=%{ssl_verify_result}\n' --resolve $H:443:$TGT_IP https://$H$PROBE_PATH` (any HTTP code is fine, `ssl_verify=0` is the pass). `schedule ls` names the timers that must arrive on the target. A schedule that "fires more often than the idle window" means the instance never sleeps, so plan for the nesting stop in section 9.
+
+### 3.2 Sizes on the source
+
+```bash
+src "set -- $H; $(cat "$W/sizes.box.sh")"
+aws --profile "$PROFILE" s3 ls --recursive --summarize "s3://$SRCDATA/instances/$H/" | tail -2
+```
+
+Pass: the files tree is under 268435456 bytes (256 MiB; over that the seal refuses safely); no sidecar file. Record the database size and the replica's object count and total size: staging time and the size of the target's copy scale with the replica, not the database. A legacy flat `/data/<host>/` directory holding old key copies needs nothing: the seal passes and the retire parks it with the instance.
+
+### 3.3 The target box
+
+This check exists because of the first staged move on the flagship. An earlier attempt had left a root-owned link `/opt/carlos/live/<host>` on the UK box, naming a build from weeks before. Nothing reports it before `flip`, and `flip` fails the landing's `release` item only after `start` has taken the instance offline: `flip` exited 4 with "uk could not take shop.example.com: the target box still holds an older build of this instance", the move was aborted, and the instance was offline for about two minutes for nothing (amadan #339).
+
+```bash
+tgt "set -- $H; $(cat "$W/target.box.sh")"
+src "readlink /opt/carlos/live/$H"
+curl -sS -m 30 -D - -o /dev/null --resolve "$H:443:$SRC_IP" "https://$H$PROBE_PATH" | grep -i -E '^HTTP|x-carlos-version'
+for p in instances moves; do echo "target $p/$H/ current objects: $(aws --profile "$PROFILE" s3 ls --recursive "s3://$TGTDATA/$p/$H/" | wc -l)"; done
+echo "target lock: $(aws --profile "$PROFILE" s3 cp --quiet "s3://$TGTDATA/instances/$H/lock.json" - 2>&1 | head -c 200)"
+tgt "df -B1 --output=avail,pcent / | tail -1"
+```
+
+Pass, every item:
+
+- **Live link:** `live link: absent` on the target. If it is present and names a different build from the one the source's `readlink` shows (and the `x-carlos-version` header confirms), STOP before staging. Clearing it is a root action on the target box and needs Paul's approval; the recipe is below.
+- **`/data` leftovers:** every path `absent`: `/data/instances/<host>`, `/data/.instances/<host>`, `/data/<host>`, `/data/programs/<host>.json`, `/data/<host>.env`, `/data/<host>.config.env`, `/data/<host>.db`.
+- **The route:** `registry routes [] timers 0`.
+- **A parked directory:** `/data/.offline-moves/<host>` absent, or holding only `<move-id>/target/` from an earlier aborted move. That one does not block: the retry on 2026-10-21 passed with it in place. Anything else under it is a STOP.
+- **The UK bucket prefixes:** 0 current objects under `instances/<host>/` and `moves/<host>/` in the target data bucket, and no `lock.json`. Versions and delete markers left by an earlier aborted move are fine.
+- **Disk:** at least twice the replica's total size free on the target. It holds the staged copy and then the live replica.
+- **Capabilities and switches, again for this move:** run 2.2 and 2.3 for the source and the target before each instance, not only once per session. Both boxes list `offline-move-1` and `offline-stage-1`, and neither has a claim or Phase 1 switch (`claim lines: 0`, `phase1 lines: 0`, `edge env claim/phase1 vars: 0`).
+
+**Go (Paul, root on the target box): clearing a stale live link.** Only when the link names a build the instance does not run. Confirm that no other link names the same version directory and no process runs from it, then remove the link and that version directory by exact path, never a glob:
+
+```bash
+tgt "ls -la /opt/carlos/live/ | grep -F '/opt/carlos/versions/<old-version>/' ; grep -l '/opt/carlos/versions/<old-version>/' /proc/[0-9]*/maps 2>/dev/null | head -3; du -sh /opt/carlos/versions/<old-version>"
+tgt "rm -- /opt/carlos/live/$H && rm -r -- /opt/carlos/versions/<old-version> && echo removed"
+```
+
+Then run 3.3 again.
+
+### 3.4 Baseline and the row fingerprint
+
+```bash
+src "set -- $H; $(cat "$W/facts.box.sh")"
+tgt "set -- $H; $(cat "$W/facts.box.sh")"
+echo "source lock: $(aws --profile "$PROFILE" s3 cp --quiet "s3://$SRCDATA/instances/$H/lock.json" - | jq -c .)"
+src "set -- $H; $(cat "$W/schema.box.sh")"
+```
+
+`facts` on the source prints the env file's sha, the instance key's digest, `config.env`'s sha and names, the files tree's count and digest, the database, the row, the timers and anything parked. On the target it must print `env file: absent`, `row: []` and `timers: []`.
+
+The row fingerprint compares the database before and after. `schema.box.sh` lists each table with its row count and time columns. Pick two or three tables the app only appends to (an events or audit log, for example), with plenty of rows. A table whose old rows the app updates will show a different digest with nothing wrong, so leave those out. Then read their highest rowids:
+
+```bash
+src "set -- $H <table1> <table2>; $(cat "$W/rows.box.sh")"
+```
+
+and set `ROWS_ARGS` in `env.sh` to `"<table1>:<max_rowid1> <table2>:<max_rowid2>"`. With a limit, `rows.box.sh` also prints a digest of every row up to that rowid, which must be identical on the target. It never prints row content.
+
+---
+
+## 4. Staging
+
+`stage` copies the instance's replica into the target data bucket's `moves/<host>/` prefix while the instance keeps serving. Each run copies only what changed since the last. On the flagship, the first round copied 1.6 GB in 76 to 79 seconds and 3.7 GB in 142 seconds, with no failed requests through the source while it ran. Later rounds took 15 to 18 seconds.
+
+**Run it until it has caught up.**
+
+```bash
+L "stage 1" "bash $W/stage.sh"
+L "stage 2" "bash $W/stage.sh"
+```
+
+`stage.sh` logs `ABOUT TO RUN stage`, runs the door (it waits for the round to finish), then prints `status`, the record's `move` and the stager's report. Caught up means `status` says "Staged n of n objects" with the two numbers equal, and the stager report's `round_bytes` is small (a few KB). The first round of a large replica can end at "Staged 237 of 240" because Litestream compacts while it copies; the next round closes the gap.
+
+Where to read what a round did: the stager report `control/offline-moves/<host>/<move-id>/stager/<box>.json` (`round_objects`, `round_bytes`, `staged_objects`, `replica_objects`) and the source journal line "staged round: N object(s) changed, B bytes copied; n of m objects staged". `status` shows only the totals. `round_objects` counts removals too: a round that copies 2 KB can report 124 objects changed when stale compacted objects are dropped from the staged prefix.
+
+**Run it once more right before `start`.** Litestream writes a new object about every 10 seconds while the instance takes writes, and whatever is new at `start` is copied by the seal while the instance is offline. `move.sh` does this final stage itself, about 25 seconds before `start`. On the flagship the seal then copied 0 to 2 objects.
+
+While a move is staged:
+
+- the instance serves as normal;
+- it refuses `carlos run` and deletion;
+- no other instance in the deployment can stage or move offline;
+- `abort` removes the staged copy and ends the move with the instance never offline. `abort` and the `finish` after it both exit 3, the normal "aborted" code, with "The staged copy of shop.example.com is removed." and "shop.example.com is back in ie and serving. Nothing was lost." Afterwards `status` prints "Moving shop.example.com from ie to uk. Moving shop.example.com back to ie." and a list of items "waiting". Ignore that; the abort's own lines are the record (#339).
+
+---
+
+## 5. The offline doors
+
+**Go (Paul): this instance is offline from `start` until it first answers on the target.**
+
+```bash
+L "move" "bash $W/move.sh 1200"
+```
+
+What `move.sh` does, in order (Appendix A has the script):
+
+1. **Final stage**, as in section 4.
+2. **Baseline** on the source: `facts`, kept for the gate, and the row fingerprint with `ROWS_ARGS`. If the baseline is incomplete it stops with nothing offline.
+3. **T0**, then the doors back to back, each preceded by an `ABOUT TO RUN` line:
+ - `start --to uk` takes the instance offline and waits until every box in the source region confirms it stopped it;
+ - `seal` copies whatever is newer than the last stage and checks the copy;
+ - the source slice's process count (it should be 0);
+ - `flip` stops the instance in the source region for good and lands it on the target;
+ - **the gate**: `facts` on the target must show the row `landing` in `uk` at `/data/<host>.db` (flat), and the same env file sha and instance key digest, the same `config.env` sha, the same files count and digest and the same timer names as the baseline;
+ - `open` serves it from the target.
+4. **The probe**: requests `$PROBE_PATH` through the target every 2 seconds until the first 2xx, prints the offline seconds since T0, then checks the host through the source box and through DNS, and prints `status`.
+
+**Judge each door by its exit code, never by its text.** From `docs/site/cli.md`: `0` done, `3` rolled back or aborted, `4` needs an operator (stuck, waiting for a box, or the landing failed an item), `5` refused, `1` the console could not be reached. Several successful doors print lines that read like trouble:
+
+- `start` prints "Waiting for <box> in ie to confirm it has stopped shop.example.com." before it succeeds;
+- `open` starts with "this move is offline-open. run carlos move offline status ... to see what it waits for", then "Waiting for <box> to clean up", and exits 0;
+- after `open`, `status` may say "Its report is not current" for every box. From `open` on, no door reads those reports.
+
+The one wait the script retries is "the report from <box> is not current" (exit 5, MV-O178): it tries again every 15 seconds, up to 8 times. It is never a process.
+
+**Before `open`, any other failure aborts.** If `seal`, `flip` or the gate fails, `move.sh` logs `STOP`, runs `abort` (expect exit 3) and `finish` (expect exit 3, "Nothing was lost"), prints `status` and stops. If `start` itself fails, it stops and leaves the decision to you: read `status`, and if a move is in flight, abort it the same way. If `open` fails, it stops without aborting; read `status` (section 11).
+
+**What it looks like** on the flagship, v0.28.7, staged (UTC seconds, all exit 0):
+
+| Step | 1.6 GB replica, 305 objects | 3.7 GB replica, 270 objects |
+|---|---|---|
+| final stage | 15.8 | 18.5 |
+| start | 23.0 | 23.3 |
+| seal | 28.4 (copied 2 objects, 487 bytes) | 30.6 (copied 0) |
+| flip | 44.2 | 57.7 |
+| gate (two SSM reads) | about 2 | about 3 |
+| open | 7.3 | 15.9 |
+| open returned to first 2xx through the target | 40.2 | 57.0 |
+| of which: promoting the staged objects into the live replica and restoring | 29 | 52 |
+| **offline, client-measured** | **147.6** | **190.4** |
+| console's `offline_s` | 99.9 | 117.2 |
+
+So: **about 2.5 to 3 minutes offline at 1.6 to 3.7 GB.** Without `stage` (v0.28.6), the seal of the same 1.6 GB replica took about 6 minutes on its own, and a 27 MB instance with 288 replica objects was offline 164 seconds. On dev, an instance of under a megabyte is offline 30 to 40 seconds.
+
+**After `open`, expect the target to be slow to answer, and do not abort** (abort is refused after `open` anyway). The first request wakes the instance, and the wake first copies every staged object from `moves/<host>/` into `instances/<host>/` in the target bucket (the journal says "promoting 270 staged object(s) from moves/shop.example.com/ (residence move landing)") and then restores the database from it. That is 30 to 50 seconds at 1.6 to 3.7 GB, and it sits inside the offline window: `stage` does not shorten it. Meanwhile the target answers 503 at the 30 second wake bound, and the probe's 10 second requests time out (`000`). For the first 10 to 15 seconds after `open` the target may also answer 404, because it does not route the host until the row is ready. Requests that reach a source-region edge can 404 for up to about 20 seconds after the target first serves, until the target's published host list reaches that edge.
+
+---
+
+## 6. Measuring the downtime
+
+Report the offline time measured from the client: T0 (logged just before `start`) to the first 2xx through the target. `move.sh` prints it as "FIRST 2xx through the target at <time>: offline <n> s since start".
+
+Do not report the console's figure. `last_move.offline_s` on the record, and the "It was offline for N seconds" that `finish` prints, both end at `open`, so they leave out the first wake. On 2026-10-21 they read 42 to 73 seconds low (99.9 against 147.6, 117.2 against 190.4, 122.5 against 164.1).
+
+Two more numbers worth recording for each move:
+
+- **What each stage round copied**: from the stager report and journal (section 4).
+- **What the seal copied**, which no output reports: list the object versions written into the target's `moves/<host>/` during the seal window. Take the window from the `seal` line in the log (seconds are enough):
+
+ ```bash
+ bash "$W/sealcount.sh" 2026-10-21T15:34:38 2026-10-21T15:35:06
+ ```
+
+ The versions survive the promotion, so this works any time after the move.
+
+---
+
+## 7. Verification
+
+Run these after the probe has had its first 2xx, before `finish`. Every item must pass.
+
+```bash
+tgt "set -- $H; $(cat "$W/facts.box.sh")"
+tgt "set -- $H $ROWS_ARGS; $(cat "$W/rows.box.sh")"
+tgt "python3 -c \"import sqlite3; c=sqlite3.connect('file:/data/$H.db?mode=ro',uri=True); print('quick_check', c.execute('pragma quick_check').fetchone()[0])\""
+tgt "journalctl -u carlos-edge --since '-15 min' --no-pager | grep -F $H | grep -v 'replica sync' | grep -i -E 'landed|opened|promot|restor|layout|woke|config|refused|extracted' | tail -15"
+for ip in "$TGT_IP" "$SRC_IP"; do curl -sS -m 30 -o /dev/null -w "$ip %{http_code} %{time_total}s\n" --resolve "$H:443:$ip" "https://$H$PROBE_PATH"; done
+curl -sS -m 30 -o /dev/null -w "DNS %{http_code}\n" "https://$H$PROBE_PATH"
+```
+
+| Check | Pass |
+|---|---|
+| The row on the target | `ready`, region `uk`, `/data/<host>.db` (flat until the nesting stop) |
+| Env file and instance key | the same sha and key digest as the baseline |
+| `config.env` | the same sha and names; it was written at landing, before the first request (the journal's "config updated" comes before "opened") |
+| Files | the same file count and digest |
+| Rows | the per-table digests up to the recorded rowids are identical to the source's just before `start`. Table count, total rows and the counts digest also match if the app has written nothing since it woke; if it has, they grow, and only the digests have to match |
+| Database | `quick_check ok` |
+| Timers | the same timer names on the target; a schedule tick in its journal or the app's own tick rows after `open`; `carlos schedule ls` shows the instance on the target box. Ticks due while the instance was offline were refused ("maintenance fence active") and do not run later; a once-timer that came due during the move fires once at the first wake |
+| Serving | 2xx through the target, through the source box (it backhauls to the target) and through DNS, with the expected `x-carlos-version`. If the app has a sign-in, Paul or the customer's contact tries it |
+
+A failed item after `open` is fixed forward on the target (section 11).
+
+---
+
+## 8. finish
+
+```bash
+L "finish" 'echo "ABOUT TO RUN finish $H $(date -u +%FT%T.%3NZ)"; MV finish; echo "finish exit $?"; MV status'
+```
+
+`finish` waits for the source box to clean up, then prints "Moved. shop.example.com is served from uk. It was offline for N seconds." and exits 0. It took 1.5 to 4 minutes on 2026-10-21; the instance serves throughout. If it answers that a report "is not current", run it again after 15 seconds. `status` then says "Move <id> of shop.example.com is done."
+
+After `finish`:
+
+```bash
+src "set -- $H; $(cat "$W/stray.box.sh")"
+src "set -- $H; $(cat "$W/facts.box.sh")"
+echo "source lock: $(aws --profile "$PROFILE" s3 cp --quiet "s3://$SRCDATA/instances/$H/lock.json" - | jq -c .)"
+echo "target lock: $(aws --profile "$PROFILE" s3 cp --quiet "s3://$TGTDATA/instances/$H/lock.json" - | jq -c .)"
+aws --profile "$PROFILE" s3 cp --quiet "s3://$DEPB/apps/$ACCT/$APP/instances/$H.json" - | jq -c '{region, move, last_move}'
+echo "target moves/$H/ current: $(aws --profile "$PROFILE" s3 ls --recursive "s3://$TGTDATA/moves/$H/" | wc -l)"
+carlos status --layout --console "$C" | grep -F "$H"
+```
+
+Pass:
+
+- the source's `/data/.instances/<host>/` is empty (no stray env file);
+- the source has no row and no timers for the host, and its journal says "removed retired instance route" and then "tombstone lifted";
+- parked on the source, under `/data/.offline-moves/<host>/<move-id>/`: `sealer/`, `source/instance/` (the old nested directory, database included) and, if there was one, `source/<host>/` (the legacy flat directory). The tool never deletes these. Add them to the record for the claim census;
+- left in place on the source by design: `/data/instances/<host>` and `/data/.instances/<host>` (empty), `/opt/carlos/live/<host>` (root-owned link) and `/data/programs/<host>.json` (root-owned, see section 12). `status` lists each with "left ... in place";
+- the source `lock.json` reads `owner moved:<move-id>` with `expires_at 1970-01-01T00:00:00Z`. That expired object is the normal end state, not an abandoned move. Before `finish` it carries a 7-day expiry, renewed on each moves pass;
+- the target lock is the target box's own lease;
+- the record: `region uk`, `move null`, `last_move` outcome `done`;
+- 0 current objects under the target's `moves/<host>/` (the promotion moved them; versions and delete markers remain);
+- the layout row is on the target box, `flat`.
+
+---
+
+## 9. The nesting stop, about an hour after open
+
+After `open` the instance runs flat on the target. The layout pass nests it when it is asleep, or, if it stays awake, stops it once the 1-hour grace is up and nests it. The target journal says so right after `open`: "layout: deferred until asleep -> shop.example.com (awake (stopped for the move in 1h0m0s unless it sleeps first))". An instance with a schedule shorter than its idle window never sleeps, so expect the stop. Tell the customer's contact there may be a stop of a few seconds about an hour after the move.
+
+About 65 minutes after `open`:
+
+```bash
+tgt "journalctl -u carlos-edge --since '-80 min' --no-pager | grep -F $H | grep -E 'layout' | tail -8"
+carlos status --layout --console "$C" | grep -E "$H|WARNING"
+carlos logs --app "$APP" --account "$ACCT" --console "$C" --since 90m | grep -E 'instance (stopping|exited|woke)' | tail -5
+tgt "set -- $H $ROWS_ARGS; $(cat "$W/rows.box.sh")"
+curl -sS -m 30 -o /dev/null -w "target after nesting: %{http_code}\n" --resolve "$H:443:$TGT_IP" "https://$H$PROBE_PATH"
+```
+
+Pass: the journal's "awake past its 1h0m0s grace -> stopping it for the move" and "migrated"; `status --layout` shows the host `nested` with "migrated at <time>: moved with it"; the digests unchanged; a 2xx. Measured stops: about 2 seconds on dev (the wake took 0.9 s), 24 seconds in the harness. The stop for a large flagship instance was not timed.
+
+Then check the instance's custom domains and aliases, if it has any: amadan #338 found an alias row that kept the flat socket after nesting and answered 502.
+
+Do not move the next instance until this stop is done, so two instances are never nested at once on the target.
+
+---
+
+## 10. Replica cleanup
+
+A finished move leaves the source region's whole replica in the source data bucket, and the parked local Litestream directory on the source box. For a large instance that is several GB in the source region until someone removes it. Remove both, per instance, once it has passed section 7 and `finish`, and only then.
+
+**Go (Paul): deletes the source region's replica of one moved instance.**
+
+```bash
+L "cleanup" "bash $W/cleanup.sh /data/.offline-moves/$H/<move-id>/source/instance <open time, e.g. 2026-10-21T15:36:02+00:00>"
+```
+
+`cleanup.sh` (Appendix A):
+
+1. refuses unless the source `lock.json` is the lifted tombstone (`moved:<id>`, expiring in 1970), so a move still in flight is never touched;
+2. lists the current objects under `instances/<host>/` in the source data bucket and refuses if any of them, other than `lock.json`, was written after the open time you give it. A write after `open` would mean something still writes there;
+3. removes the parked local replica `.../source/instance/.activator-<host>.db-litestream/ltx` on the source box, by exact path (a few hundred KB);
+4. deletes every object under `instances/<host>/` **by exact key, keeping `lock.json`** (the lifted tombstone stays as the record), and logs each key with the version id it removed and its size.
+
+The data buckets are **versioned with no lifecycle rule**. A delete only adds a delete marker; the bytes stay as noncurrent versions, are still billed, and can be brought back from the logged version id. Removing the noncurrent versions is a separate decision. The parked database, env and `config.env` under `source/instance/` stay too.
+
+Never run this for an instance whose move was aborted: its source replica is the live one.
+
+On 2026-10-21 this removed 290 objects (72 MB) for the 27 MB instance, 305 objects (1.58 GB) for the 1.6 GB instance and 270 objects (3.66 GB) for the 3.7 GB instance, about 4 minutes each.
+
+---
+
+## 11. Rollback
+
+**Before `open`: abort.** At any doubt, a failed item, a target missing `config.env`, or a door that refuses for a real reason. `move.sh` does it on its own for `seal`, `flip` and the gate. By hand:
+
+```bash
+echo "ABOUT TO RUN abort $H $(date -u +%FT%T.%3NZ)"; MV abort; echo "abort exit $?"
+echo "ABOUT TO RUN finish $H $(date -u +%FT%T.%3NZ)"; MV finish; echo "finish exit $?"
+```
+
+Both exit 3. `abort` prints "Moving shop.example.com back to ie." then "Every box has put shop.example.com back in ie."; `finish` prints "shop.example.com is back in ie and serving. Nothing was lost." The source's database was never removed, so nothing is lost. It took 25 seconds for the abort and under a second for the finish on the flagship, and the instance answered 2xx on the source 2 seconds later.
+
+Check after an abort:
+
+- `facts` and the row fingerprint on the source equal the baseline, and `quick_check ok`;
+- the source row is `ready` and nested; the source lease is the source box's own, at `generation 2`;
+- the source journal shows "wake fence lifted" and "tombstone lifted on abort";
+- the target has no row and no timers, and parked what it had extracted under `/data/.offline-moves/<host>/<move-id>/target/`. Leave it: it does not block a retry;
+- the target bucket has 0 current objects under `instances/<host>/` and `moves/<host>/`;
+- the record has no region, `move null`, `last_move` outcome `aborted`;
+- 2xx through the source box, through the target box (backhaul) and through DNS.
+
+A retry is a new move, staged from scratch, after section 3 passes again.
+
+**After `open`: there is no move back.** `abort` is refused once the move is open (MV-O27), the target holds the only live copy and may already have taken writes. Fix forward on the target. Most problems after `open` (an app that cannot boot there, a certificate, reaching its store from the new region) show up in the first minute of section 7. A move back to the source region would be a new offline move in the other direction. It has never been run, it needs the target region's staging grant on the source data bucket, and the source box would need the section 3.3 checks, including its own stale `/opt/carlos/live/<host>` link, which the move leaves in place. Treat it as a new piece of work with its own approval, not as a rollback.
+
+---
+
+## 12. Known gaps
+
+- **amadan #339: nothing checks the target before the instance goes offline.** A stale root-owned `/opt/carlos/live/<host>` on the target fails `flip` (exit 4, the `release` item, MV-O177) only after `start`. Section 3.3 is the workaround. The same discussion covers two smaller things: after an abort from staging, `status` reads as if the instance moved and came back; and no output says how many objects the seal copied (section 6 has the count).
+- **amadan #338: an alias row can keep the flat socket after nesting** and answer 502. Check an instance's aliases after the nesting stop (section 9).
+- **The source keeps root-owned files.** `/data/programs/<host>.json` (root, 0644, in a root-owned directory) cannot be parked by the agent, which runs as `carlos`; `status` says "left /data/programs/<host>.json in place: cannot be renamed: ... permission denied". The root-owned `/opt/carlos/live/<host>` link stays too, by design. Both are listed for the claim census, and both are the kind of leftover that section 3.3 catches if that box is ever a move target.
+- **The console's offline figure ends at `open`** and leaves out the first wake (section 6).
+- **One offline-move lock per deployment.** A staged or moving instance blocks every other one.
+- **The source region keeps the replica** until the cleanup in section 10, and the parked database and directories indefinitely.
+- **A new nested instance can start a few seconds before its `config.env`** (seen on dev on v0.28.6: about 12 seconds, then a config-change restart). That is the instance-create path, not the move: the move writes `config.env` at landing, before the first request.
+
+---
+
+## 13. Rehearsing on dev
+
+Rehearse each new release's move path on dev before using it on the flagship. Dev's pair is sophie-knitting (home, `ie`, the console box, guard armed) to dennis-stenciling (`uk`); leo-climbing is a second home-region box and takes part as a source box. The values are in Appendix A.
+
+The rehearsals of 2026-10-21 used one app, `moverehearsal` in account `bab`, built from wakecheck's bytes, with four settings including store-shaped ones, one secret and a schedule `every-minute --every 1m --path /tick`. Each scenario uses a fresh instance of that app (`moverehearsal-a.dev.carlosframework.com` and so on), created with `carlos instances create` and woken through DNS so that it lands on sophie, its nested home. The probe path is `/`.
+
+Scenarios worth running:
+
+1. **A move with stage**: two stage rounds with writes between them, then `move.sh`. Expect about 40 seconds offline.
+2. **Abort from staging**: stage, then `abort` and `finish` (both exit 3); the instance never goes offline and the same process keeps serving.
+3. **Abort after flip**, before open: about 30 seconds offline, nothing lost.
+4. **The nesting stop** an hour after the first move's `open`.
+
+Afterwards: `carlos instances delete` each rehearsal host (the route retires on the next pass; parked data stays), then the replica cleanup of section 10 for the moved ones. Record what is left on each box and in each bucket.
+
+---
+
+## 14. Telling the customer
+
+A draft for Paul to edit and send, one per instance, at least a day ahead:
+
+> We will move `<host>` to our UK region on `<date>` at `<time>` UTC. It will be offline for about 3 minutes, and we have booked 15 minutes for it. Your data moves with it, and if anything looks wrong before we reopen it, we put everything back as it was. Scheduled jobs that fall due while it is offline will not run. About an hour later it may pause again for a few seconds while we finish settling it in.
+
+Tell the customer's contact when each move starts and when it is done.
+
+---
+
+## Appendix A. Setup and helper scripts
+
+### A.1 Scratch and values
+
+Make a scratch directory under `$TMPDIR` (never `/tmp` directly) and keep its exact path; it is removed by that path at the end (A.4). Keep the log somewhere that outlives the scratch.
+
+```bash
+W=$(mktemp -d "$TMPDIR/offline-move.XXXXXX"); echo "$W"
+```
+
+Write `$W/env.sh`. These are the flagship's values for IE to UK; dev's are in the comments.
+
+```bash
+cat > "$W/env.sh" <<'EOF'
+export W=<the scratch path printed above>
+export LOG=<the move log, e.g. $HOME/.cache/<task>/moves-<date>.md>
+# Deployment. Dev: C=https://platform.dev.carlosframework.com PROFILE=kass DEPB=carlos-dev-640012953448
+export C=https://console.carloku.com PROFILE=keymail DEPB=carlos-flagship-271376211898
+# Source box (flagship IE, annie-welding). Dev: sophie-knitting i-05498eada6f0afd23, eu-west-1
+export SRC_REGION=eu-west-1 SRC_ID=i-092c0c1eea75723cb
+# Target box (flagship UK, iris-clockmaking). Dev: dennis-stenciling i-009d593f451cfd562, eu-west-2
+export TGT_REGION=eu-west-2 TGT_ID=i-03c310ceaf50a9bab
+# Data buckets: each box's CARLOS_HIBERNATE_BUCKET, also data_bucket in its edges file. Dev UK: carlos-dev-uk-640012953448
+export SRCDATA=carlos-data-ie-271376211898 TGTDATA=carlos-data-uk-271376211898
+export TO=uk
+# The instance
+export H=shop.example.com APP=<app> ACCT=<account sqid>
+export PROBE_PATH=/signin # a path that answers 2xx without signing in
+export ROWS_ARGS="" # "<table>:<max_rowid> ...", from 3.4
+export SRC_IP=<source public IP> TGT_IP=<target public IP>
+ts() { date -u +%T.%3NZ; }
+MV() { carlos move offline "$1" --host "$H" --app "$APP" --account "$ACCT" --console "$C" ${2:-}; }
+src() { "$W/ssm.sh" "$PROFILE" "$SRC_REGION" "$SRC_ID" "$1"; }
+tgt() { "$W/ssm.sh" "$PROFILE" "$TGT_REGION" "$TGT_ID" "$1"; }
+# L <label> <command>: logs the label and command, then the output line by line as it runs, then the exit
+L() { local label=$1; shift
+ printf '\n#### %s (started %s)\n```\n$ %s\n' "$label" "$(date -u +%FT%T.%3NZ)" "$*" >> "$LOG"
+ bash -c "source $W/env.sh; $*" 2>&1 | tee -a "$LOG"; local rc=${PIPESTATUS[0]}
+ printf '```\n(ended %s, exit %s)\n' "$(date -u +%FT%T.%3NZ)" "$rc" >> "$LOG"; return $rc; }
+# note <text>: a timestamped line in the log, e.g. what you are about to run and what you expect
+note() { printf -- '- %s %s\n' "$(date -u +%FT%T.%3NZ)" "$*" | tee -a "$LOG"; }
+EOF
+source "$W/env.sh"
+```
+
+The two addresses, for `--resolve`:
+
+```bash
+aws --profile "$PROFILE" --region "$SRC_REGION" ec2 describe-instances --instance-ids "$SRC_ID" --query 'Reservations[0].Instances[0].PublicIpAddress' --output text
+aws --profile "$PROFILE" --region "$TGT_REGION" ec2 describe-instances --instance-ids "$TGT_ID" --query 'Reservations[0].Instances[0].PublicIpAddress' --output text
+```
+
+Put them in `env.sh` and source it again. Do the same whenever you change `H` or `ROWS_ARGS`.
+
+### A.2 ssm.sh
+
+Runs one command as root on a box over SSM and prints its stdout, with stderr kept apart and a non-zero exit unless the command succeeded. The command goes into a temporary file and runs with stdin closed. SSM returns at most 24,000 characters.
+
+```bash
+cat > "$W/ssm.sh" <<'EOF'
+#!/bin/bash
+# usage: ssm.sh <profile> <region> <instance-id> '<shell command>'
+set -euo pipefail
+profile=$1 region=$2 inst=$3 cmd=$4
+b64=$(printf '%s' "$cmd" | base64 -w0)
+params=$(python3 -I -c 'import json,sys;print(json.dumps({"commands":["f=$(mktemp) && echo %s | base64 -d > $f && bash $f </dev/null; rc=$?; rm -f $f; exit $rc" % sys.argv[1]]}))' "$b64")
+id=$(aws --profile "$profile" --region "$region" ssm send-command --instance-ids "$inst" \
+ --document-name AWS-RunShellScript --parameters "$params" --query Command.CommandId --output text)
+until s=$(aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" \
+ --instance-id "$inst" --query Status --output text 2>/dev/null) && [ "$s" != InProgress ] && [ "$s" != Pending ]; do sleep 2; done
+aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" --instance-id "$inst" \
+ --query StandardOutputContent --output text
+aws --profile "$profile" --region "$region" ssm get-command-invocation --command-id "$id" --instance-id "$inst" \
+ --query StandardErrorContent --output text >&2
+[ "$s" = Success ]
+EOF
+chmod 700 "$W/ssm.sh"
+```
+
+### A.3 Box scripts
+
+Each is sent with `src` or `tgt`, taking the host as `$1` where it needs one: `src "set -- $H; $(cat "$W/facts.box.sh")"`. All are read-only.
+
+```bash
+# block.box.sh: claim and Phase 1 switches, the edge unit, the stage path, version, guard, secrets key, region, disk
+cat > "$W/block.box.sh" <<'EOF'
+echo "== $(hostname)"
+echo "claim lines: $(grep -c "^CARLOS_HOST_CLAIM=." /etc/carlos/host.env || true)"
+echo "phase1 lines: $(grep -c "^CARLOS_MOVES_PHASE1=" /etc/carlos/host.env || true)"
+P=$(systemctl show -p MainPID --value carlos-edge)
+echo "edge env claim/phase1 vars: $(tr "\0" "\n" < /proc/$P/environ | grep -cE "^CARLOS_(HOST_CLAIM=.|MOVES_PHASE1=)" || true)"
+systemctl show carlos-edge -p User -p Delegate -p ActiveState
+echo "stage.path: $(systemctl is-active carlos-stage.path) $(systemctl is-enabled carlos-stage.path)"
+/opt/carlos/carlos version 2>&1 | tail -1
+if [ -f /opt/carlos/system/guard/policy.json ]; then echo "guard policy present"; else echo "no guard policy"; fi
+echo "secrets key lines: $(grep -c "^CARLOS_SECRETS_KEY=" /etc/carlos/host.env || true)"
+echo "secrets key sha8: $(grep "^CARLOS_SECRETS_KEY=" /etc/carlos/host.env | cut -d= -f2- | tr -d "\"\n" | sha256sum | cut -c1-8)"
+echo "region/pools: $(grep -E "^CARLOS_(REGION|POOLS)=" /etc/carlos/host.env | tr "\n" " ")"
+echo "disk avail bytes, use: $(df -B1 --output=avail,pcent / | tail -1)"
+EOF
+
+# target.box.sh <host>: what the target box already holds for the host (3.3)
+cat > "$W/target.box.sh" <<'EOF'
+H=$1
+L=/opt/carlos/live/$H
+if [ -L "$L" ] || [ -e "$L" ]; then echo "live link: PRESENT -> $(readlink "$L") (dated $(stat -c %y "$L" | cut -c1-19))"; else echo "live link: absent"; fi
+for p in /data/instances/$H /data/.instances/$H /data/$H /data/programs/$H.json /data/.offline-moves/$H /data/$H.env /data/$H.config.env /data/$H.db; do
+ if [ -e "$p" ]; then echo "PRESENT $p"; else echo "absent $p"; fi
+done
+[ -d /data/.offline-moves/$H ] && find /data/.offline-moves/$H -maxdepth 2 | sed 's/^/ parked: /'
+python3 - "$H" <<'PY'
+import sqlite3,sys
+h=sys.argv[1]; c=sqlite3.connect('file:/data/registry.db?mode=ro',uri=True)
+print('registry routes', c.execute('select host,status from routes where host=?',(h,)).fetchall(),
+ 'timers', c.execute('select count(*) from timers where host=?',(h,)).fetchone()[0])
+PY
+EOF
+
+# facts.box.sh <host>: env and key digests, config.env, files, db, row, timers, parked (never values)
+cat > "$W/facts.box.sh" <<'EOF'
+H=$1
+E=""; for d in /data/instances/$H /data; do [ -f $d/$H.env ] && { E=$d/$H.env; break; }; done
+if [ -n "$E" ]; then
+ echo " env file: $E $(sha256sum < $E | cut -c1-16) key-sha $(grep ^CARLOS_INSTANCE_KEY= $E | cut -d= -f2- | tr -d '"\n' | sha256sum | cut -c1-16) names: $(cut -d= -f1 $E | sort | tr '\n' ' ')"
+else echo " env file: absent"; fi
+for f in /data/instances/$H/$H.config.env /data/$H.config.env; do [ -f $f ] && echo " config.env $f ($(stat -c %y $f)) sha $(sha256sum < $f | cut -c1-16): $(cut -d= -f1 $f | sort | tr '\n' ' ')"; done
+FD=""; for d in /data/instances/$H/$H /data/$H; do [ -d $d ] && { FD=$d; break; }; done
+if [ -n "$FD" ]; then
+ echo " files: $FD $(cd $FD && find . -type f | wc -l) files, digest $(cd $FD && find . -type f -print0 | sort -z | xargs -0 -r sha256sum | sha256sum | cut -c1-16)"
+else echo " files: none 0 files, digest none"; fi
+for f in /data/instances/$H/$H.db /data/$H.db; do [ -f $f ] && echo " db: $f $(stat -c %s $f) bytes"; done
+ls /data/instances/$H 2>/dev/null | tr '\n' ' ' | sed 's/^/ instance dir: /'; echo
+python3 - $H <<'PY'
+import sqlite3,sys
+h=sys.argv[1]; c=sqlite3.connect('file:/data/registry.db?mode=ro',uri=True)
+print(' row:', c.execute('select status,last_error,region,db_path,next_due,replication from routes where host=?',(h,)).fetchall())
+try:
+ t=c.execute('select * from timers where host=?',(h,)).fetchall()
+ print(' timers:', [(x[1],x[2],x[3],x[4],x[7]) for x in t])
+ print(' timer names:', ' '.join(sorted(x[1] for x in t)))
+except Exception as e: print(' timers: ?', e)
+PY
+ls -d /data/.offline-moves/$H/*/* 2>/dev/null | sed 's/^/ parked: /'
+EOF
+
+# sizes.box.sh <host>: files tree (limit 256 MiB), nested dir, db, local Litestream dir, sidecars, legacy flat dir
+cat > "$W/sizes.box.sh" <<'EOF'
+H=$1; D=/data/.instances/$H
+echo "== $H"
+echo "files tree bytes: $(du -sb $D/$H 2>/dev/null | cut -f1)"
+echo "nested dir: $(du -sh $D | cut -f1)"
+ls -l $D/$H.db 2>&1 | awk '{print "db bytes:", $5}'
+echo "local ltx: $(du -sh $D/.activator-$H.db-litestream 2>/dev/null | cut -f1)"
+ls $D/*sidecar* /data/$H-sidecar.env 2>&1 | head -2
+ls -la /data/$H 2>&1 | head -6
+EOF
+
+# procs.box.sh <host>: processes in the host's cgroup slice (0 before flip)
+cat > "$W/procs.box.sh" <<'EOF'
+H=$1
+f=$(find /sys/fs/cgroup/carlos.slice/carlos-instances.slice -maxdepth 1 -name "carlos-instances-$H.slice" 2>/dev/null | head -1)
+echo "slice: ${f:-none}"
+if [ -n "$f" ]; then echo "processes: $(cat $f/cgroup.procs | wc -l)"; else echo "processes: 0 (no slice)"; fi
+d=$(find /sys/fs/cgroup/carlos.slice/carlos-edge.service -maxdepth 1 -name "carlos-exec@$H" 2>/dev/null | head -1)
+if [ -n "$d" ]; then echo "exec cgroup $d processes: $(cat $d/cgroup.procs | wc -l)"; fi
+EOF
+
+# stray.box.sh <host>: what the source keeps after finish
+cat > "$W/stray.box.sh" <<'EOF'
+H=$1
+echo "== /data/.instances/$H"; ls -la /data/.instances/$H/ 2>&1
+echo "== parked"; ls -d /data/.offline-moves/$H/*/* /data/.offline-moves/$H/*/source/* 2>&1
+echo "== legacy /data/$H"; ls -la /data/$H 2>&1 | head -5
+echo "== programs"; ls -la /data/programs/$H.json 2>&1
+echo "== live link"; ls -la /opt/carlos/live/$H 2>&1
+EOF
+
+# schema.box.sh <host>: tables, row counts and time columns, to choose the fingerprint tables
+cat > "$W/schema.box.sh" <<'EOF'
+H=$1
+DB=""; for f in /data/instances/$H/$H.db /data/$H.db; do [ -f $f ] && { DB=$f; break; }; done
+echo "db: ${DB:-none}"; [ -z "$DB" ] && exit 0
+python3 - "$DB" <<'PY'
+import sqlite3,sys
+c=sqlite3.connect('file:%s?mode=ro'%sys.argv[1],uri=True)
+for (n,) in c.execute("select name from sqlite_master where type='table' order by name"):
+ cols=[r[1] for r in c.execute('pragma table_info("%s")'%n)]
+ k=c.execute('select count(*) from "%s"'%n).fetchone()[0]
+ tcols=[x for x in cols if x in ('created_at','updated_at','at','ts','timestamp','occurred_at','sent_at','inserted_at')]
+ print(n, k, 'timecols=%s'%tcols)
+PY
+EOF
+
+# rows.box.sh <host> [table[:max_rowid] ...]: read-only row fingerprint (counts, max rowids, digests; never row content)
+cat > "$W/rows.box.sh" <<'EOF'
+H=$1; shift
+DB=""; for f in /data/instances/$H/$H.db /data/$H.db; do [ -f $f ] && { DB=$f; break; }; done
+echo "db: ${DB:-none}"; [ -z "$DB" ] && exit 0
+python3 - "$DB" "$@" <<'PY'
+import sqlite3,sys,hashlib
+c=sqlite3.connect('file:%s?mode=ro'%sys.argv[1],uri=True)
+c.execute('begin')
+tabs=[n for (n,) in c.execute("select name from sqlite_master where type='table' and name not like 'sqlite_%' and name not like '_litestream%' order by name")]
+counts={n:c.execute('select count(*) from "%s"'%n).fetchone()[0] for n in tabs}
+print('tables %d, total rows %d, nonempty %d' % (len(tabs), sum(counts.values()), sum(1 for v in counts.values() if v)))
+print('counts digest', hashlib.sha256(''.join('%s:%d\n'%(n,counts[n]) for n in tabs).encode()).hexdigest()[:16])
+for arg in sys.argv[2:]:
+ t,_,lim=arg.partition(':')
+ r=c.execute('select count(*),max(rowid) from "%s"'%t).fetchone()
+ print('%s: count %d max_rowid %s' % (t,r[0],r[1]))
+ if lim:
+ h=hashlib.sha256(); n=0
+ for row in c.execute('select rowid,* from "%s" where rowid<=? order by rowid'%t,(int(lim),)):
+ h.update(repr(row).encode()); n+=1
+ print('%s rowid<=%s: %d rows digest %s' % (t,lim,n,h.hexdigest()[:16]))
+c.execute('rollback')
+PY
+EOF
+```
+
+### A.4 Operator scripts
+
+```bash
+# stage.sh: one staging round for $H, then status, the record's move and the stager report
+cat > "$W/stage.sh" <<'EOF'
+#!/bin/bash
+source "$(dirname "$0")/env.sh"
+now() { date -u +%FT%T.%3NZ; }
+echo "=== before $(now): source instances/$H/ $(aws --profile $PROFILE s3 ls --recursive s3://$SRCDATA/instances/$H/ | wc -l) objects; target moves/$H/ $(aws --profile $PROFILE s3 ls --recursive s3://$TGTDATA/moves/$H/ | wc -l) objects"
+echo "ABOUT TO RUN stage $H $(now)"
+s=$(ts); out=$(MV stage "--to $TO" 2>&1); rc=$?
+echo "--- stage $s -> $(ts) exit=$rc"; echo "$out" | sed 's/^/ /'
+echo "--- status $(ts)"; MV status | sed 's/^/ /'
+M=$(aws --profile $PROFILE s3 cp --quiet s3://$DEPB/apps/$ACCT/$APP/instances/$H.json - | jq -c '.move')
+echo "record move: $M"
+ID=$(echo "$M" | jq -r '.id // empty')
+if [ -n "$ID" ]; then
+ for k in $(aws --profile $PROFILE s3 ls --recursive "s3://$DEPB/control/offline-moves/$H/$ID/stager/" | awk '{print $4}'); do
+ echo "stager report $k"
+ aws --profile $PROFILE s3 cp --quiet "s3://$DEPB/$k" - | jq -c '{box, phase, at, replica_objects, replica_bytes, staged_objects, staged_bytes, round_objects, round_bytes, stage_error}'
+ done
+fi
+echo "END stage.sh rc=$rc $(now)"
+exit $rc
+EOF
+
+# move.sh [probe-seconds]: final stage, baseline, then start, seal, flip, the gate and open back to back.
+# Before open, a failed seal, flip or gate aborts the move and runs finish. After open it only reports.
+cat > "$W/move.sh" <<'EOF'
+#!/bin/bash
+source "$(dirname "$0")/env.sh"
+PROBE_FOR=${1:-1200}
+now() { date -u +%FT%T.%3NZ; }
+door() { # door <verb> [args]: retries only a report that is not current (MV-O178)
+ local i out rc s
+ for i in 1 2 3 4 5 6 7 8; do
+ echo "ABOUT TO RUN $1 $H $(now) (try $i)"
+ s=$(ts); out=$(MV "$1" "${2:-}" 2>&1); rc=$?
+ echo "--- $1 try $i $s -> $(ts) exit=$rc"; echo "$out" | sed 's/^/ /'
+ if [ $rc -ne 0 ] && echo "$out" | grep -q "is not current"; then sleep 15; continue; fi
+ return $rc
+ done; return $rc; }
+back_out() { # back_out <reason>: abort and finish, both expected to exit 3
+ local s out rc
+ echo "STOP: $1 $(now). Aborting (before open)."
+ echo "ABOUT TO RUN abort $H $(now)"; s=$(ts); out=$(MV abort 2>&1); rc=$?
+ echo "--- abort $s -> $(ts) exit=$rc"; echo "$out" | sed 's/^/ /'
+ echo "ABOUT TO RUN finish $H $(now)"; s=$(ts); out=$(MV finish 2>&1); rc=$?
+ echo "--- finish $s -> $(ts) exit=$rc"; echo "$out" | sed 's/^/ /'
+ for i in $(seq 1 20); do c=$(curl -s -m 20 -o /dev/null -w '%{http_code}' --resolve $H:443:$SRC_IP https://$H$PROBE_PATH); echo "source $c $(ts)"; case "$c" in 2*) break;; esac; sleep 3; done
+ MV status; echo "END move.sh STOPPED $(now)"; exit 12; }
+
+echo "=== final stage right before start $(now)"
+door stage "--to $TO" || { echo "STOP: final stage exit $? $(now). Nothing is offline."; MV status; exit 10; }
+echo "=== baseline on the source $(now)"
+A=$(src "set -- $H; $(cat $W/facts.box.sh)"); echo "$A"
+ENVSHA=$(echo "$A" | sed -n -E 's/^ env file: \S+ ([0-9a-f]{16}) key-sha .*/\1/p')
+KEYSHA=$(echo "$A" | sed -n -E 's/^ env file: .* key-sha ([0-9a-f]{16}) .*/\1/p')
+CFGSHA=$(echo "$A" | sed -n -E 's/^ config.env .* sha ([0-9a-f]{16}): .*/\1/p')
+FILES=$(echo "$A" | sed -n -E 's/^ files: \S+ (.*)$/\1/p')
+TIMERS=$(echo "$A" | sed -n -E 's/^ timer names: (.*)$/\1/p')
+echo "expect env $ENVSHA key $KEYSHA cfg ${CFGSHA:-none} files $FILES timers $TIMERS"
+for v in "$ENVSHA" "$KEYSHA" "$FILES"; do [ -n "$v" ] || { echo "STOP: baseline incomplete. Nothing is offline."; exit 9; }; done
+echo "=== rows fingerprint on the source, just before start $(now)"
+src "set -- $H $ROWS_ARGS; $(cat $W/rows.box.sh)"
+
+T0=$(date +%s.%N); echo "=== T0 $(now)"
+door start "--to $TO" || { echo "STOP: start exit $? $(now). Read status: if a move is in flight, abort it and run finish."; MV status; exit 10; }
+door seal || back_out "seal exit $?"
+echo "--- source slice $(now)"; src "set -- $H; $(cat $W/procs.box.sh)"
+door flip || back_out "flip exit $?"
+
+echo "--- target facts (gate before open) $(now)"
+B=$(tgt "set -- $H; $(cat $W/facts.box.sh)"); echo "$B"
+fail=""
+echo "$B" | grep -q -F "row: [('landing', '', '$TO', '/data/$H.db'" || fail="$fail row"
+echo "$B" | grep -q -E "^ env file: /data/$H.env $ENVSHA key-sha $KEYSHA " || fail="$fail env/key"
+[ "$(echo "$B" | sed -n -E 's/^ config.env .* sha ([0-9a-f]{16}): .*/\1/p')" = "$CFGSHA" ] || fail="$fail config"
+[ "$(echo "$B" | sed -n -E 's/^ files: \S+ (.*)$/\1/p')" = "$FILES" ] || fail="$fail files"
+[ "$(echo "$B" | sed -n -E 's/^ timer names: (.*)$/\1/p')" = "$TIMERS" ] || fail="$fail timers"
+[ -z "$fail" ] || back_out "gate failed:$fail"
+echo "gate before open: ok $(now)"
+
+door open || { echo "STOP: open exit $? $(now). Do not abort blindly: read status (runbook section 11)."; MV status; exit 14; }
+echo "--- probe $PROBE_PATH through the target until a 2xx (up to $PROBE_FOR s) $(now)"
+prev=""; first=""; end=$(( $(date +%s) + PROBE_FOR ))
+while [ $(date +%s) -lt $end ]; do
+ c=$(curl -s -m 10 -o /dev/null -w '%{http_code}' --resolve $H:443:$TGT_IP https://$H$PROBE_PATH)
+ [ "$c" != "$prev" ] && { echo "target $c $(ts)"; prev=$c; }
+ case "$c" in 2*) first=$(date +%s.%N); break;; esac; sleep 2; done
+[ -n "$first" ] || { echo "NO 2xx through the target within $PROBE_FOR s $(now)"; exit 15; }
+echo "FIRST 2xx through the target at $(ts): offline $(python3 -c "print(round($first-$T0,1))") s since start"
+curl -sS -m 30 -D - -o /dev/null --resolve $H:443:$TGT_IP https://$H$PROBE_PATH | grep -i -E "^HTTP|x-carlos-version"
+for i in $(seq 1 25); do a=$(curl -s -m 20 -o /dev/null -w '%{http_code}' --resolve $H:443:$SRC_IP https://$H$PROBE_PATH); d=$(curl -s -m 20 -o /dev/null -w '%{http_code}' https://$H$PROBE_PATH); echo "$(ts) via source $a | via DNS $d"; [ "${a:0:1}" = 2 ] && [ "${d:0:1}" = 2 ] && break; sleep 3; done
+echo "--- status after open $(now)"; MV status
+echo "END move.sh OK $(now)"
+EOF
+
+# sealcount.sh <seal-start> <seal-end> (UTC, to the second, e.g. 2026-10-21T15:34:38): versions the seal wrote
+cat > "$W/sealcount.sh" <<'EOF'
+#!/bin/bash
+source "$(dirname "$0")/env.sh"
+aws --profile $PROFILE s3api list-object-versions --bucket $TGTDATA --prefix moves/$H/ --query 'Versions[].[LastModified,Size]' --output text |
+ awk -v a="$1" -v b="$2" '{t=substr($1,1,19)} t<a {pre++} t>=a && t<=b {n++; s+=$2} t>b {post++} END {print "before the seal (stage rounds):", pre+0; print "during the seal window:", n+0, "objects,", s+0, "bytes"; print "after the seal window:", post+0}'
+EOF
+
+# cleanup.sh <parked source/instance dir> <open time, e.g. 2026-10-21T15:36:02+00:00>: section 10
+cat > "$W/cleanup.sh" <<'EOF'
+#!/bin/bash
+source "$(dirname "$0")/env.sh"
+P=$1 OPENED=$2 PFX=instances/$H/
+[ -n "$P" ] && [ -n "$OPENED" ] || { echo "usage: cleanup.sh <parked source/instance dir> <open time>"; exit 2; }
+LOCK=$(aws --profile $PROFILE s3 cp --quiet "s3://$SRCDATA/${PFX}lock.json" -); echo "lock.json: $LOCK"
+echo "$LOCK" | jq -e '(.owner|startswith("moved:")) and .expires_at=="1970-01-01T00:00:00Z"' >/dev/null || { echo "STOP: the tombstone is not lifted, so the move is not finished"; exit 2; }
+aws --profile $PROFILE s3api list-objects-v2 --bucket $SRCDATA --prefix $PFX --query 'Contents[].[Key,LastModified,Size]' --output text > "$W/cleanup-$H.keys"
+LATEST=$(grep -v -F "${PFX}lock.json" "$W/cleanup-$H.keys" | cut -f2 | sort | tail -1)
+echo "current objects: $(wc -l < "$W/cleanup-$H.keys"); latest write excluding lock.json: $LATEST; opened: $OPENED"
+[[ "$LATEST" < "$OPENED" ]] || { echo "STOP: something wrote to the source replica after open"; exit 2; }
+L2=$P/.activator-$H.db-litestream/ltx
+echo "== parked local replica: $L2"
+src "test -d $L2 && echo \"size: \$(du -sh $L2 | cut -f1), files: \$(find $L2 -type f | wc -l)\" && rm -r -- $L2 && echo removed $L2; ls -la $(dirname $L2)"
+echo "== source replica objects by exact key (key, removed version, size), keeping lock.json"
+n=0; bytes=0
+while IFS=$'\t' read -r k lm size; do
+ case "$k" in
+ "${PFX}lock.json") echo "keep $k"; continue;;
+ "$PFX"*) ;;
+ *) echo "SKIP unexpected $k"; continue;;
+ esac
+ v=$(aws --profile $PROFILE s3api head-object --bucket $SRCDATA --key "$k" --query VersionId --output text)
+ aws --profile $PROFILE s3api delete-object --bucket $SRCDATA --key "$k" >/dev/null && echo "deleted ${k#$PFX} version $v size $size" && n=$((n+1)) && bytes=$((bytes+size))
+done < "$W/cleanup-$H.keys"
+echo "deleted $n source replica objects of $H ($bytes bytes)"
+echo "== after"; aws --profile $PROFILE s3 ls --recursive "s3://$SRCDATA/$PFX"
+aws --profile $PROFILE s3 cp --quiet "s3://$SRCDATA/${PFX}lock.json" - | jq -c .
+EOF
+chmod 700 "$W"/*.sh
+```
+
+At the end of the session, check nothing you started is still running, then remove the scratch by its exact path (never a glob): `rm -r -- <the path printed in A.1>`. Keep the log.
+
+---
+
+## History
+
+### v0.28.5 roll, 2026-10-20
+
+The first release with the offline-move doors. Dev's guard-armed boxes could not take it through their own updater (the v0.28.4 updater read a candidate's stderr as part of its answer), so leo-climbing and sophie-knitting took it by a ruled hand re-arm, and dennis-stenciling by its normal `system update`. Sophie's guarded console could not be replaced by `install-console` (it refused an occupied slot), so it was upgraded by an attended recovery, "E1": both slots moved aside, then `install-console`. All of it was rehearsed first in the harness (Run 9), which also ran the first offline move of a 4 MB instance: 366 seconds offline, most of it waiting for stale box reports. The full roll runbook with its signing session, re-arm and E1 is this file as it stood at commit b1464900 on branch v0285-roll-runbook.
+
+Run 9 found four defects, all fixed in v0.28.6:
+
+| Defect | What it was |
+|---|---|
+| 5 | `install-console` could not replace an installed protected console. Fixed by `install-console --upgrade --from <sha256>` |
+| 6 | a new nested instance could run without its `config.env` for up to about 70 minutes |
+| 7 | `flip` and `open` trusted a box report for 2 minutes while boxes rewrote theirs every 5 to 6, so the doors refused with "still runs a process" for most of each cycle. Fixed by a 15-second report refresh during a move and a "not current" refusal |
+| 8 | the source's scheduler re-created the parked instance's env file after `open` |
+
+### v0.28.6 roll and the first moves, 2026-10-20 and 21
+
+The harness (Run 10) rolled the v0.28.6 candidate by plain `system update` on every box and upgraded the guarded console with `--upgrade`, and moved a small instance in about 20 seconds and a 636 MB instance with a 3.5 GB replica history in 296 seconds. It found that the console's offline figure ends at `open`, that a large replica's first wake on the target takes minutes, and that a finished move leaves the whole replica in the source region.
+
+v0.28.6 went to dev, then flagship (boxes 08:39 to 08:43Z, console 08:45Z on 2026-10-21).
+
+- **Dev rehearsal on v0.28.6** (08:02 to 09:22Z): a move of a small instance from sophie to dennis, 30.6 seconds offline (the console said 23.5); an abort after flip, 32.8 seconds; the nesting stop at the hour, about 2 seconds; the cleanup. Its corrections: the staging lane's `GetObject implicitDeny` is the designed grant; only the target's secrets key fingerprint matters; `open` prints a refusal-like first line while succeeding; the source cannot park the root-owned `/data/programs/<host>.json`.
+- **The first flagship move**, a 27 MB instance without `stage`: seal 82 seconds for 288 replica objects on real S3, 164 seconds offline (the console said 123). Verified by the row fingerprint, nested at the hour.
+- **The aborted move**, a 1.6 GB instance without `stage`: the seal alone took about 6 minutes. A session restart killed the move script after the seal; its log wrapper had written nothing, so the move was believed not to have started. Found by `status` 12 minutes later, aborted, back on the source with nothing lost after 12.7 minutes offline. That is where section 1 comes from.
+
+Paul then approved building the pre-copy and parallel object copies.
+
+### v0.28.7 and the moves with stage, 2026-10-21
+
+v0.28.7 added `carlos move offline stage` and eight object copies at once. It went to dev (14:30Z), then flagship (14:41Z).
+
+- **Dev pre-copy rehearsal** (14:31 to 14:54Z): a move from staging, 40.6 seconds offline (the console said 22.3), the seal copying the 4 objects written since the last stage; an abort from staging with the instance never offline. Its corrections are sections 4 and 6: stage once more right before `start`; read round counts from the stager report; `stage` does not shorten the first wake on the target; the target can 404 for about 8 seconds after `open`; report client-measured time; abort from staging exits 3; `status` after it reads oddly; one lock per deployment.
+- **The 1.6 GB instance, first attempt with stage**: staged 1.58 GB in 79 seconds while serving with no failed requests, seal copied nothing, then `flip` exited 4 on the target's stale `/opt/carlos/live/<host>` link from an earlier attempt. Aborted automatically, about 2 minutes offline, nothing lost. Paul approved clearing the link and its old version directory on the target. Section 3.3 is the check that would have caught it before staging, and amadan #339 the fix.
+- **The 3.7 GB instance**, with the new target pre-checks: staged in 142 seconds, 190 seconds offline (the console said 117), 52 of them promoting the staged copy into the live replica on the first wake.
+- **The 1.6 GB instance, retry**: 148 seconds offline (the console said 100).
+- **Cleanup**: the source region's replicas of all three moved instances deleted by exact key with their version ids logged, `lock.json` kept, the parked Litestream directories removed.