carlos / platform Public

Dev claim trial undo rev 3: answers Astra r2 (multi-step rollback order keeps boxes disarmed until the floor is whole; per-transition and reboot evidence that a good run produces)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 2fbc7a5e926af1941e9e0df8c6ebe0c8d776ccb2 parent 7410a8d
1 file changed, +48 −10
  • docs/superpowers/notes/dev-claim-trial-undo.md +48 −10

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/dev-claim-trial-undo.md b/docs/superpowers/notes/dev-claim-trial-undo.md
index aaf46ea39..68c39f3b6 100644
--- a/docs/superpowers/notes/dev-claim-trial-undo.md
+++ b/docs/superpowers/notes/dev-claim-trial-undo.md
@@ -245,6 +245,19 @@ deleted.
- Any failed check is a STOP: change nothing more, and report on #404.
- Box commands run as root over SSM from DOCS-T1, profile `kass`, with the runbook's `ssm.sh` helper. Dennis is in eu-west-2.
- **Aside** means `/root/claim-undo-20261026/<step>/`, made with `install -d -m 0700`. Every move there is `mv -T` of one exact path. No globs, no pattern deletes, no `rm -r` on anything but a named path.
+- **Rolling back more than one step (Astra r2 1):** never re-arm a box while
+ the remote floor is incomplete. An armed box's `guard-exec` refuses a floor
+ pair with one object missing (`hostfloor/remote.go:58`,
+ `host/guardexec.go:56`), and the restored edge drop-in starts through the
+ guard (`host/guardarm.go:163`), so a reboot in that gap leaves the box
+ unable to serve. With both boxes still disarmed, roll back in this order:
+ 1. step 6 (the roster), if it was done;
+ 2. step 4 (both floor objects), then verify both against step 0's hashes;
+ 3. step 5 (the local floors), under step 5's writer exclusion;
+ 4. steps 3 and 2 (guard directories, enrollments, then drop-ins), each
+ under the apply lock;
+ 5. step 1 (the console drop-ins), with console reporting last.
+ The freeze holds throughout.
- **Freeze from step 1 until step 7:** no `carlos system update`, `rollback` or `cancel-activation` against dev; no `canary/console` promote; no `install-console`. Post the freeze on #404 so other sessions know.
**Every console command names dev explicitly** (Astra 2). The CLI picks a
@@ -436,7 +449,8 @@ Post-check:
- The next `status/boxes/leo-climbing.json`, within about 6 minutes, has no
`floor_guard_ready` or `enrollment`.
-Rollback, in this order:
+Rollback, only after steps 4 and 5 are rolled back and verified (see
+"Rolling back more than one step"), in this order:
1. The guard dir and `host-actor.json` back first.
2. Then the three drop-ins.
3. `daemon-reload`.
@@ -469,9 +483,11 @@ Post-check:
- `devcli system status --console "$DEV"` answers.
- The console log has no `hostfloor` refusal.
-Rollback: only after rolling back step 5, and with steps 2 and 3 rolled back
-too. Copy step 0's versions back, the auth key first (the order `Publish`
-uses).
+Rollback: with leo and sophie still disarmed (steps 2 and 3 NOT rolled
+back), and after step 6's rollback if step 6 was done. Copy step 0's versions
+back, the auth key first (the order `Publish` uses), then check both objects
+against step 0's hashes before anything else is rolled back. If either copy
+fails, STOP with both boxes disarmed: a disarmed box ignores the floor.
### Step 5 [SSM dennis, leo, sophie, one box at a time]: remove the local moves floor (Astra 6)
@@ -524,7 +540,8 @@ Rollback, under the same exclusion:
2. Restore the files while holding `floor.lock`.
3. Start edge and path again.
-Then roll back step 4 if wanted.
+Roll back step 4 before this, never after: the local copies follow the
+remote pair.
### Step 6 [S3]: remove the roster, invitations and console report
@@ -562,11 +579,13 @@ use it as the forward target instead of re-promoting v0.28.16, pinned the
same way.
For every transition, wait for `devcli system status --console "$DEV"` to
-show all affected boxes `current`, then record on **all three boxes**:
+show all affected boxes `current`. Then record on **all three boxes**:
- `/opt/carlos/carlos version` and `/opt/carlos/carlos.prev version`, with sha256;
- the edge's PID and `NRestarts`;
-- the apply's journal line `no moves protocol floor is armed on this box`;
-- `0` `REFUSING` lines.
+- `0` `REFUSING` lines since the transition began.
+
+And on **the boxes that changed** (that channel's boxes only; Astra r2 2),
+the apply's journal line `no moves protocol floor is armed on this box`.
Then run every box's step-0 serving check.
@@ -588,11 +607,17 @@ The transitions:
no signing session, and `claim-signer/` is empty.
6. **Recovery witness on a non-console box: leo** (leo's only routes are
cohort1's, so a reboot is cheap). Run `systemctl reboot`. After boot:
- - `carlos-system-recover.service` ran with `Result=success`;
- - its journal shows `carlos system apply --recover`, with no `guard-exec`;
+ - `carlos-system-recover.service` ran in this boot
+ (`ExecMainStartTimestamp` after the boot time) with `Result=success`
+ and `ExecMainStatus=0`;
+ - its effective unit (`systemctl cat`) matches dennis's plain unit, and the
+ template's `guard-exec` branch is inactive (no `/opt/carlos/system/guard`);
- the edge started after it, as `/opt/carlos/carlos agent`, `NRestarts` 0;
- leo's serving check passes;
- `carlos version` is unchanged.
+ This proves a clean boot runs the plain recovery unit. It does not
+ exercise restoring from `.prev` (with no journal to recover,
+ `systemapply.go:1931` returns at once); transitions 1 to 4 cover `.prev`.
7. **Console deploy, as on flagship.** Run
`env -u CARLOS_CONSOLE CARLOS_BIN=<v0.28.16 CLI> ship-app.sh kass carlos-dev-640012953448 console v0.28.15 canary/console binary <v0.28.15 console artefact>`.
The v0.28.15 console was shipped before, so this is a re-promote of an
@@ -807,3 +832,16 @@ them.
| 7 | P2: step 1 removes a mandatory env file before the reload | **Accepted, fixed** | Step 1 now: <br>1. installs or keeps the home-region drop-in, never overwriting one;<br>2. removes the two drop-ins;<br>3. reloads, restarts and checks;<br>4. only then archives `claim-console.env`.<br>Rollback restores the env file before its drop-in, and removes `home-region.conf` only if this step created it. |
| 8 | P2: the installer lock left behind blocks `rmdir` | **Accepted, fixed** | B8 and B9 are inventoried in step 0. Step 8 proves no holder with `flock -n` and removes `/etc/carlos/fence-writer/.claims-activation.lock` by exact path before `rmdir`. The `/etc/carlos` copy on leo and sophie (evidence-key, console-config) is handled the same way in step 10. |
| 9 | P2: verification does not prove the transitions | **Accepted, fixed** | Step 7 pins v0.28.15 and v0.28.16 by sha256 and runs real back and forward transitions on canary and stable (avoiding the no-op at `systemapply.go:435`). It records `carlos` and `.prev` on all three boxes after each, includes a reboot witness on leo, a console promote both ways, and an offline move both ways with a row-content check, since dev's topology supports one today. |
+
+## Response to Astra r2
+
+- **1 (P1), rollback re-arms before the floor is whole: fixed.** A rule in
+ "Rules for every step" fixes the multi-step rollback order: roster, both
+ floor objects (verified), local floors under the writer exclusion, guards,
+ then the console with reporting last, both boxes disarmed until the floor
+ is whole. Step 2's, step 4's and step 5's rollbacks now point to it.
+- **2 (P2), evidence a good run need not produce: fixed.** The floor journal
+ line is required only from the boxes a transition changed. The reboot
+ witness checks the recovery unit's run in this boot, its exit status, its
+ effective unit and the inactive guard branch, and says it does not
+ exercise `.prev`.