Dev claim trial undo rev 2: answers Astra r1 (pool restore deferred to a dev topology section; explicit dev console on every command; plain-unit comparison against dennis; floor writers quiesced; console drop-in order; installer locks; pinned forward/back verification with reboot and offline-move witnesses)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+660
−467
docs/superpowers/notes/dev-claim-trial-undo.md+660 −467
CI failed — run details
diff --git a/docs/superpowers/notes/dev-claim-trial-undo.md b/docs/superpowers/notes/dev-claim-trial-undo.md| index ed88c5cf8..aaf46ea39 100644 |
| --- a/docs/superpowers/notes/dev-claim-trial-undo.md |
| +++ b/docs/superpowers/notes/dev-claim-trial-undo.md |
| @@ -1,616 +1,809 @@ |
| -# Undoing the dev claim trial |
| +# Undoing the dev claim trial (rev 2) |
| Status: inventory and plan only. Nothing here has been run. Every step that |
| changes a box, the bucket, IAM or tofu needs Paul's go (amadan #404). |
| -Goal: dev (leo, sophie, dennis, the dev console) behaves like a deployment |
| -that never saw host claims, and like flagship. Flagship was never armed |
| -(section 4). |
| +Rev 2 answers Astra's r1 review (`docs/superpowers/notes/reviews/ASTRA-FINDINGS-dev-claim-trial-undo-r1.md`, |
| +NOT READY). Each finding's disposition is in "Response to Astra r1" at the |
| +end. The controller also narrowed the scope. |
| -Sources, all read-only: |
| +**Goal.** At the end: |
| +- no host guard on any box, and no floor, either in the bucket or copied onto a box; |
| +- no roster, no reservations, no console report loop, and no claim drop-ins on the dev console; |
| +- the fence-writer credential gone; |
| +- `carlos system update`, promote and rollback of `stable` and `canary` working as they do on flagship. |
| + |
| +**Out of scope** (section 5, "Deferred: dev topology"): |
| +- leo's `CARLOS_POOLS=cohort1` and the routes leo has now; |
| +- the stale wakecheck database on leo; |
| +- the `claimtrial` app; |
| +- the "exactly one target per region" rule for offline moves. |
| + |
| +Nothing in this plan changes leo's pool or which boxes are eligible for what. |
| + |
| +Flagship was never armed (section 4). |
| +Sources, all read-only: |
| - the runbook, `origin/claim-dev-cohort1-runbook:docs/superpowers/plans/2026-10-16-claim-activation-dev-cohort1.md` |
| ("Paused state (2026-10-19)", steps 4 to 7a, section 5, "Pre-roll emptiness check"); |
| -- main at `9b81d97b` (this worktree), code cited as `file:line`; |
| +- main at `3b591514` (this worktree), code cited as `file:line`; |
| - platform-infrastructure `origin/main` at `5cf9a0ed`, cited as `pinfra:file:line`; |
| - the dev roll logs since the pause, latest `own/after236/release-and-dev-roll-v0.28.16.md` |
| - (2026-10-25 17:07Z to 17:41Z), and the flagship roll logs; |
| -- memory notes host-lifecycle-claim, claims-shelved-live-moves, deployment-harness, root-runner. |
| + (2026-10-25, 17:07Z to 17:41Z), and the flagship roll logs; |
| +- memory notes host-lifecycle-claim, claims-shelved-live-moves, deployment-harness and root-runner. |
| -## 0. What changed since the pause, and what the brief got wrong |
| +## 0. What changed since the pause |
| The trial stopped at the end of step 7 (2026-10-19). Since then dev has been |
| -rolled from v0.28.4 to v0.28.16, always armed. That left more residue than |
| -the pause note lists: |
| - |
| -- **One published identity per release.** Because a floor is published, every |
| - dev roll needed a throwaway signing session to run `publish-identity` |
| - (role `carlos-claim-signer`, made and deleted each time). The bucket now |
| - holds `control/system/router/releases/v0.28.2.json` and `v0.28.4.json` to |
| - `v0.28.16.json` (no v0.28.3). |
| -- **The roster has moved from revision 9 to 53.** Every console promote |
| - reserves in it, and the console's 5-minute report loop re-signs it |
| - (section 1, R3). At 17:38Z on 2026-10-25: rev 53, `activations []`, `holds []`. |
| -- **`carlos.prev` is no longer the 6.1a copy.** Ordinary rolls have refreshed |
| - it. Leo and sophie are at v0.28.16 with `.prev` v0.28.15. |
| -- **The guard has grown.** Leo's guard dir holds `activation.json carlos |
| - completed.json identities policy.json`, and sophie's also has |
| - `console-ready.json`. `identities/` gains a file per release. |
| -- **Sophie's console is upgraded by `install-console --upgrade`**, not by |
| - promote. A `canary/console` promote stages the build and restarts the unit, |
| - but the unit still runs the protected copy until `install-console` |
| - replaces it. `x-carlos-version` shows the promoted version either way, so |
| - the header can't tell you which build is running. |
| +rolled from v0.28.4 to v0.28.16, armed the whole time, and that left more |
| +residue than the pause note lists: |
| + |
| +- **One published identity per release.** With a floor published, every dev |
| + roll needed a throwaway signing session to run `publish-identity`. The |
| + sessions used role `carlos-claim-signer`, made and deleted each time. The |
| + bucket now holds `control/system/router/releases/v0.28.2.json` and |
| + `v0.28.4.json` to `v0.28.16.json`. There is no v0.28.3. |
| +- **The roster moved from revision 9 to 53.** Every console promote reserves |
| + in it, and the console's 5-minute report loop re-signs it (R2, S4). At |
| + 17:38Z on 2026-10-25 it was at rev 53, with `activations []` and `holds []`. |
| +- **`carlos.prev` is an ordinary rollback copy again.** Leo, sophie and |
| + dennis run v0.28.16, with `.prev` at v0.28.15. |
| +- **The guard dirs have grown.** Leo's holds `activation.json`, `carlos`, |
| + `completed.json`, `identities` and `policy.json`. Sophie's also holds |
| + `console-ready.json`. `identities/` gains one file per release. |
| +- **Sophie's console is upgraded by `install-console --upgrade`.** A |
| + `canary/console` promote stages the build and restarts the unit, but the |
| + unit keeps running the protected copy. `x-carlos-version` shows the |
| + promoted version either way. |
| - **The moves protocol floor is armed on all three boxes, dennis included.** |
| - `publish-floor` wrote `control/moves-protocol.json`, which is also the moves |
| - floor. Every agent copies it to `/data/.moves/` within the hour (R2). That |
| - is the widest live constraint, and the pause note doesn't mention it. |
| - |
| -Corrections to the brief, from the infra checkout: |
| - |
| -- **#45 merged** as `a0b3f5a5` (it added `dev/cohort1-fence-kms.tf`). **#48** |
| - (`5cf9a0ed`) removed the file again and its 0/0/3 plan was applied on |
| - 2026-10-19 at 20:26Z. Key `ef26a257` is `PendingDeletion` until |
| - **2026-10-26T20:26:18Z**, and the SSM parameter was deleted after 19 |
| - seconds. So a plan from main no longer deletes a live key. **Targeted plans |
| - are still required**, for a different reason: dev pins the platform modules |
| - at `?ref=main` and has drifted from them. A whole-root plan showed 13 adds |
| - on 2026-10-18. Since then `5698a8f5` added `host_release_key_deny`, which |
| - duplicates dev's own deny, and `606afcb9` changed the bucket module. |
| -- **#44** (`f609434b`) is the release-key read deny |
| - (`pinfra:dev/release-key-deny.tf:2-49`). It isn't claim machinery, so keep it. |
| -- **Leo's object-version grant is not in platform-infrastructure.** It is |
| - `PullDoorObjectVersions` / `DeleteObjectVersion` / `PullDoorVersionList` in |
| - `infra/modules/region-host/main.tf:182-196`, from `e1121997`. It covers the |
| - IE data bucket and serves the db pull door, not claims. Keep it. |
| -- **The traffic barrier on leo was never applied** (runbook line 3: "do NOT |
| - apply the traffic barrier until Paul's go"), and leo has served through |
| - `--resolve` ever since. Step 0 checks that sg-054aa165db842b6ba still has |
| - 80 and 443 open. |
| + The trial's `publish-floor` wrote `control/moves-protocol.json`, which is |
| + also the moves floor, and every agent copies it to `/data/.moves/` (B5). |
| + |
| +Corrections to the original brief, taken from the infra checkout: |
| + |
| +- **#45 merged** as `a0b3f5a5`. **#48** (`5cf9a0ed`) removed the file again |
| + and was applied on 2026-10-19 at 20:26Z. Key `ef26a257` is |
| + `PendingDeletion` until 2026-10-26T20:26:18Z, and the SSM parameter lived |
| + 19 seconds. |
| + - Astra checked that the fence reader uses the installed credentials and |
| + STS, not KMS (`internal/hostfence/writer.go:37`), so that date is not a |
| + deadline for this undo. |
| + - Targeted plans are still needed for another reason. Dev pins the |
| + platform modules at `?ref=main`, and they have moved: 13 adds on |
| + 2026-10-18, then `5698a8f5`'s `host_release_key_deny` and `606afcb9`'s |
| + bucket module change. |
| +- **#44** (`f609434b`) is the release-key read deny (`pinfra:dev/release-key-deny.tf:2-49`). |
| + It is not claim machinery; keep it. |
| +- **Leo's object-version grant** lives in `infra/modules/region-host/main.tf:182-196` |
| + (`e1121997`, the db pull door). It is not in platform-infrastructure and |
| + has nothing to do with claims; keep it. |
| +- **The traffic barrier on leo was never applied** (runbook line 3). Step 0 |
| + checks that sg-054aa165db842b6ba still allows 80 and 443. |
| ## 1. Residue table |
| -"Reads on main" means a code path that runs on a claims-off box or console |
| -today. A **LIVE** row changes behaviour now. An *inert* row is read only by |
| -claims-on paths or operator-only claim verbs. |
| +"Reads on main" means code that runs on a claims-off box or console today. |
| +**LIVE** means the residue changes behaviour now. *inert* means only |
| +claims-on paths or operator-only claim verbs read it. |
| ### S3, `carlos-dev-640012953448` |
| | # | Object | Created by | Reads on main with claims off | State | |
| |---|---|---|---|---| |
| -| R1 | `control/moves-protocol.json` (`{"min":1,"min_release":"v0.28.4"}`, digest `1a6a7e50…4ab3`) and `control/moves-protocol-auth.json` (`3bbd48a8…`) | 7.2 `claims run` phase `publish-floor` (signer); `hostfloor.Publish` `internal/hostfloor/floor.go:121-130` | **Console update doors.** `reserveHostUpdate` treats the deployment as legacy only when both keys are absent (`internal/console/hostactivation.go:33-44`). With them present, every `carlos system update`, promote and rollback must find a published identity by tag (`:84-95`) and a roster bound to this floor (`:107`), must verify every active roster box's report (`:151-161`), and is reserved in the signed roster (`:193`). Rollback does the same (`:211-226`). **Armed boxes.** `guard-exec` compares the policy with the published floor on every edge, apply and recover start (`internal/host/guardexec.go:56-66`, `internal/hostfloor/remote.go:52-80`), and an armed apply needs it (`internal/host/guardtransaction.go:202-205`). **Every box.** The agent copies it to the local moves floor every hour (`internal/host/edgesfile.go:980`, `internal/host/movesfloor.go:496-505`), root's apply does the same first thing (`internal/host/systemapply.go:909-935`), and the moves T1 check reads it (`internal/host/movesreport.go:312-330`). | **LIVE** | |
| -| R2 | `control/host-actors.json`, the signed roster: leo `active` in pool `cohort1`, sophie in pool `console`, console `dev-console`, `home_region ie` (write-once), `floor_sha256` bound, leo's census key bound, `regions.ie.pools` holds `cohort1`. Rev 53 | 5.1 `initialize`, `configure`, `invite-*`, `enroll-*`; 7.2 `publish-floor` and `home`; 7.3 `bind-key` (signer). Since then, every console promote (`hostactivation.go:193`) and the console's report loop (`internal/console/hostreports.go:86-92`) | **Console:** read by every update door while R1 exists (`hostactivation.go:99-109`). The console's 5-minute loop (below, S4) reads it and calls `ReleaseActivation` with the release key on every tick, which re-signs it (`hostreports.go:86-92`). **Armed boxes:** `prepareGuard` needs the box's enrollment and a reservation in it (`guardtransaction.go:547-605`), and `beginGuard` re-reads it (`:206-223`). Other readers: §1a. | **LIVE** while R1 or S4 stand | |
| -| R3 | `control/system/router/releases/v0.28.2.json`, `v0.28.4.json` … `v0.28.16.json` | 6.1 `publish-identity`, then one signing session per dev roll | `reserveHostUpdate` (`hostactivation.go:53-95`, `:172-177`) and armed `prepareGuard` (`guardtransaction.go:585-602`) while R1 exists. `install-channel` and `join` read them only for region HA joins (`internal/host/installchannel.go:457`, `internal/host/joinroot.go:175-176`), which are dormant. | **LIVE** (each release needs one) until R1 goes; inert after | |
| -| R4 | `control/host-actor-invitations/leo-climbing.json`, `sophie-knitting.json`; `control/host-console-invitations/<sophie's instance>.json` | 5.1 `invite-box`, `invite-console` (`internal/claimactivation/runner.go:150-157`) | `guard-arm` for a box not yet in the roster (`internal/host/guardarm.go:102-109`). The console report loop's `InvitedConsole` (`hostreports.go:48-53`), only while S4 is set. | inert after S4 | |
| -| R5 | `status/consoles/dev-console.json` | The dev console, every 5 minutes (`hostreports.go:68-87`) | Claim census and `publish-floor` only (`internal/hostactors/census.go:349`). | inert, but **rewritten** every 5 min until S4 goes | |
| -| R6 | Fields in `status/boxes/{leo-climbing,sophie-knitting}.json`: `enrollment`, `floor_sha256`, `floor_guard_ready`, `activation_id`, `console_processes` | The agent's report (`internal/host/claimreport.go:14-38`), `console-report` | `reserveHostUpdate`'s `VerifyReport` (`hostactivation.go:155-161`) while R1 exists. | Drops out by itself once B1/B2 are gone: `claimReport` returns early (`claimreport.go:15-22`) | |
| -| R7 | `control/boxes/leo-climbing.json`, `sophie-knitting.json` (AWS-signed identity records) | 5.0 `carlos system box publish-record` | Enrollment (claims runner) and region HA (dormant). See §1a. | inert. **Undeletable** while the bucket policy I3 stands | |
| -| R8 | Pointer fields in `control/system/router/{stable,canary}.json`: `release_tag`, `moves_protocol`, `console_artifacts`, `activation_id`, plus history entries carrying them | `PrepareSystemPromotion` / `PublishActivation` under R1 | The guarded apply only (`guardtransaction.go:570-575`). Legacy promote writes the plain shape. | inert; replaced by the next legacy promote | |
| -| R9 | `claim-signer/<run-id>/` | Each signing session's exchange prefix | none | Each session emptied it. "claim-signer/ empty" at 17:12Z on 2026-10-25. Check only | |
| -| R10 | `root-runner/<run>/x.test` and `root-runner/<run>/phaseN/` SSM logs | `own/after236/root-runner.py:16,74,116,145` (Plan 14 and files-seed tests, from 2026-10-14) | none | inert; never cleaned | |
| -| R11 | `releases/bab/pointer-digests` (219 bytes, digests on for `bab` since 2026-10-18T10:11:25Z) | runbook 5.0a item 3 | Pointer-digest checking on every box and the console. This is release integrity, not claims | **keep** (§2) | |
| -| R12 | `control/hosts/*`, `control/hosts-backfill.json`, `apps/*/*/admission.json` | must not exist: step 8 never ran on real dev | the claim door | pre-check only | |
| -| R13 | App `claimtrial` (account `bab`): `instances.json` with `pool: cohort1`, instance record `claimtrial.dev.carlosframework.com` (pool `cohort1`), cert `control/certs/claimtrial.dev.carlosframework.com`, releases `wc4` | step 4 | Ordinary app paths. Leo serves it. The only cohort1-pool record. | live but harmless; it blocks the pool change in B9 (#309) | |
| +| R1 | `control/moves-protocol.json` (`{"min":1,"min_release":"v0.28.4"}`, digest `1a6a7e50…4ab3`) and `control/moves-protocol-auth.json` (`3bbd48a8…`) | 7.2 `claims run` phase `publish-floor`, run on the signer (`internal/hostfloor/floor.go:121-130`) | **Console update doors.** The deployment counts as legacy only when both keys are absent (`internal/console/hostactivation.go:33-44`). While they exist, every `carlos system update`, promote and rollback has to clear four gates: <br>1. a published identity for the release tag (`:84-95`);<br>2. a roster bound to this floor (`:107`);<br>3. a report under 15 minutes old, with the guard ready, from every active roster box (`:151-161`, `internal/hostactors/census.go:66-68`);<br>4. a reservation in the signed roster (`:193`).<br>Rollback goes through the same gates (`:211-226`). **Armed boxes.** `guard-exec` compares the floor on every edge, apply and recover start (`internal/host/guardexec.go:56-66`, `internal/hostfloor/remote.go:52-80`), and an armed apply needs it (`internal/host/guardtransaction.go:202-205`). **Every box.** The agent copies it to the local moves floor at start and every hour (`internal/host/edgesfile.go:980`, `internal/host/movesfloor.go:489-505`). Root's apply does the same (`internal/host/systemapply.go:909-935`). | **LIVE** | |
| +| R2 | `control/host-actors.json`, the signed roster at rev 53. It holds leo `active` in pool `cohort1`, sophie in pool `console`, the console `dev-console`, `home_region ie`, `floor_sha256`, leo's census key and `regions.ie.pools` with `cohort1` | 5.1 `initialize`, `configure`, `invite-*`, `enroll-*`; 7.2 `publish-floor`, `home`; 7.3 `bind-key`. Since then, every console promote (`hostactivation.go:193`) and the console report loop (`internal/console/hostreports.go:86-92`) | **Console:** every update door reads it while R1 exists (`hostactivation.go:99-109`). The report loop (S4) reads it, and with the release key loaded calls `ReleaseActivation`, which **writes it** (`hostreports.go:86-92`, `internal/hostactors/activation_complete.go:56`). **Armed boxes:** `prepareGuard` and `beginGuard` read it (`guardtransaction.go:206-223, 547-605`). Other readers: §1a. | **LIVE** while R1 or S4 stand | |
| +| R3 | `control/system/router/releases/v0.28.2.json`, `v0.28.4.json` … `v0.28.16.json` | 6.1 `publish-identity`, then one signing session per dev roll | `reserveHostUpdate` (`hostactivation.go:53-95, 172-177`) and armed `prepareGuard` (`guardtransaction.go:585-602`) while R1 exists. Region HA join only, which is dormant (`internal/host/installchannel.go:457`, `internal/host/joinroot.go:175-176`). | **LIVE** until R1 goes, then inert | |
| +| R4 | `control/host-actor-invitations/leo-climbing.json`, `sophie-knitting.json`; `control/host-console-invitations/<sophie's instance>.json` | 5.1 `invite-box`, `invite-console` (`internal/claimactivation/runner.go:150-157`) | `guard-arm` for an unlisted box (`internal/host/guardarm.go:102-109`); the report loop's `InvitedConsole` (`hostreports.go:48-53`) | inert once S4 is gone | |
| +| R5 | `status/consoles/dev-console.json` | the dev console, every 5 minutes (`hostreports.go:68-87`) | the claim census and `publish-floor` (`internal/hostactors/census.go:349`) | inert, but **rewritten** every 5 minutes while S4 stands | |
| +| R6 | Claim fields in `status/boxes/{leo-climbing,sophie-knitting}.json` (`enrollment`, `floor_sha256`, `floor_guard_ready`, `activation_id`, `console_processes`) | the agent's report (`internal/host/claimreport.go:14-38`) and `console-report` | `VerifyReport` while R1 exists | They disappear on their own once B1 and B3 are gone (`claimreport.go:15-22`) | |
| +| R7 | `control/boxes/leo-climbing.json`, `sophie-knitting.json` (the AWS-signed box records) | 5.0 `carlos system box publish-record` | enrollment and region HA only (§1a) | inert. **Undeletable** while bucket policy I3 stands | |
| +| R8 | `release_tag`, `moves_protocol`, `console_artifacts` and `activation_id` in `control/system/router/{stable,canary}.json` and their history | `PrepareSystemPromotion` and `PublishActivation` under R1 | the guarded apply only (`guardtransaction.go:570-575`) | inert; the next ordinary promote writes the plain shape | |
| +| R9 | `claim-signer/<run-id>/` | each signing session's exchange prefix | none | Emptied by each session ("claim-signer/ empty", 17:12Z on 2026-10-25). Check only | |
| +| R10 | `root-runner/<run>/x.test` and `root-runner/<run>/phaseN/` | `own/after236/root-runner.py:16,74,116,145` | none | inert | |
| +| R11 | `releases/bab/pointer-digests` | runbook 5.0a | pointer-digest checks. Release integrity, not claims | **keep** | |
| +| R12 | `control/hosts/*`, `control/hosts-backfill.json`, `apps/*/*/admission.json` | must not exist | the claim door | pre-check only (step 0) | |
| ### Leo (`carlos-dev-ie-b`, i-046c7fe43620944bc) |
| | # | Path | Created by | Reads on main with claims off | State | |
| |---|---|---|---|---| |
| -| B1 | `/opt/carlos/system/guard/`: `carlos` (checker copy), `policy.json` (mode `armed`), `identities/v0.28.4.json` … `v0.28.16.json`, `activation.json`, `completed.json` | 6.2 `guard-arm` (`guardarm.go:118-156, 202`); every guarded apply (`prepareGuard` `guardtransaction.go:600-604`, `settleGuard` `:158`) | **Root's apply.** `installFloorHook` (`guardtransaction.go:515-545`) arms the floor path whenever the dir holds more than main's marker. Every apply then needs R1 and a reservation in R2 (`beginGuard` `:174-225`, `guardImage` `:34-84`), and a refused armed roll wedges its channel (runbook G4, harness Run 1). **Every exec** through B2 is verified against `identities/` at or above the floor (`guardexec.go:114`, `internal/hostfloor/report.go:20-80`). **Agent report** (`claimreport.go`). | **LIVE** | |
| -| B2 | `90-host-floor.conf` in `carlos-edge.service.d`, `carlos-system-update.service.d` and `carlos-system-recover.service.d`. The edge's adds `Requires=`/`After=carlos-system-recover.service` | 6.2 `guard-arm` (`guardarm.go:163-193`) | systemd: edge, update and recover all `ExecStart=/opt/carlos/system/guard/carlos system guard-exec …` | **LIVE** | |
| -| B3 | `/etc/carlos/host-actor.json` (enrollment) | `guard-arm` (`guardarm.go:159-161`) | `prepareGuard` (`guardtransaction.go:548`), the agent report (`claimreport.go:19`) | inert without B1 | |
| -| B4 | `/data/.hostexec/` (carlos, 2770) | `guard-arm` (`guardarm.go:111`, `internal/hostfloor/controllers_linux.go:23-60`) | `checkLegacyParticipation`: passes when absent or empty, refuses updates when non-empty (`internal/hostfloor/participation.go:25-50`). While B1 is armed the directory **must exist**: the armed path calls it with `requireDirectory` and defers the update otherwise (`internal/hostfloor/disk.go:242-256`). | inert while empty. Remove it only after step 2 | |
| -| B5 | `/data/.moves/floor.json`, `/data/.moves/floor.min-release` (`v0.28.4`) | The agent's hourly refresh and root's `armFloor`, after R1 appeared (`movesfloor.go:219`, `systemapply.go:909-935`) | **`activationRule`** (`systemapply.go:1123-1150`): no update, rollback or recovery may activate a build below v0.28.4, and while any registry row is held (offline moves hold rows) no downgrade at all. **The prev gate:** the system units let `carlos.prev` run a recovery only when the floor line is absent or matches the verdict (`internal/host/movesfloorgate.go:12-30`). **Edges file:** `moves_floor_min_release` (`movesfloor.go:507-525`). Never deleted by code, and only rises. Lowering it is a manual step on each box (`movesfloor.go:20-37`, `:175-180`). Flagship logs `no moves protocol floor is armed on this box` (flagship-roll-v0.28.9.md:618). | **LIVE** | |
| -| B6 | `/opt/carlos/carlos.prev.allowed` (the verdict) | `judgePrev` while B5 is armed | The prev gate, only while B5 exists | inert after B5 | |
| -| B7 | `/etc/carlos/fence-writer/credentials.json`, `credentials.installation.json` (root 600; access key `…VINM` for `carlos-dev-ie-b-fence-writer-root`) | 7a.2 `claims fence-credentials` | root's fence pass, claims-on (§1a) | inert, but **a live AWS credential** | |
| -| B8 | `/etc/carlos/host-evidence.key` (root 600) | 7.3 `claims evidence-key` | claims census and production only | inert, secret | |
| -| B9 | `CARLOS_POOLS=cohort1` in `/etc/carlos/host.env`, plus `host.env.bak-pool-20261018` | step 4 | provision reconcile: leo mints only cohort1-pool records, so it serves `claimtrial` and nothing pool-less (wakecheck left leo on 2026-10-18) | **LIVE**: leo isn't a normal home box, and it can't take part in an offline move (§1a) | |
| -| B10 | `/opt/carlos/system/router/channel-identity.json` | 6.1a `install-channel --policy --identity` (`installchannel.go:416, 649`) | region HA `join` only (`joinroot.go:175`) | inert | |
| -| B11 | `/root/claim-trial/` (staged policies, identities, `roster.json`, `rev`, `le`, `key-proof.json`, enrollment, `release.pub`, `fence-role-arn`) | 5.1 to 7a | none | inert | |
| -| B12 | `/opt/carlos`, `live`, `versions` and `host.env` owned by root (the session-3 chown fix, Paul's approval) | 2026-10-19 by hand. The infra branch `host-root-owned-opt` (`747f699`) is **not applied** | `OpenProtected` (guarded paths only). The platform intends root ownership (opt-ownership-report §1). | inert once B1 goes; keep (§2) | |
| +| B1 | `/opt/carlos/system/guard/`: `carlos`, `policy.json` (mode `armed`), `identities/v0.28.4.json` … `v0.28.16.json`, `activation.json`, `completed.json` | 6.2 `guard-arm` (`guardarm.go:118-156, 202`); every guarded apply (`guardtransaction.go:158, 600-604`) | **Root's apply** is guarded whenever this dir holds more than main's marker (`installFloorHook`, `guardtransaction.go:515-545`). It then needs R1 and a roster reservation (`:174-225`, `:34-84`). **Every exec** through B2 is checked against `identities/`, at or above the floor (`guardexec.go:114`, `internal/hostfloor/report.go:20-80`). **Root's generation census** accepts the edge's guard start only while `guard/carlos` is readable (`internal/host/rootgeneration_services_linux.go:226-231`). **The plain units' own selector** runs `guard-exec` only if `guard/carlos` is executable *and* a census or `guard/moves` exists (`internal/host/units/carlos-system-update.service:47`, `carlos-system-recover.service:41`). Neither exists on dev, so today the selector is inactive. | **LIVE** | |
| +| B2 | `90-host-floor.conf` in `carlos-edge.service.d`, `carlos-system-update.service.d` and `carlos-system-recover.service.d`. The edge's copy adds `Requires=` and `After=carlos-system-recover.service` | 6.2 `guard-arm` (`guardarm.go:163-193`) | systemd: `ExecStart=` is cleared and replaced by `/opt/carlos/system/guard/carlos system guard-exec …` | **LIVE** | |
| +| B3 | `/etc/carlos/host-actor.json` | `guard-arm` (`guardarm.go:159-161`) | `prepareGuard` (`guardtransaction.go:548`); the agent's report (`claimreport.go:19`) | inert without B1 | |
| +| B4 | `/data/.hostexec/` (carlos, 2770) | `guard-arm` (`guardarm.go:111`) | Absent or empty passes; non-empty refuses updates (`internal/hostfloor/participation.go:25-50`). While B1 is armed it **must exist** (`internal/hostfloor/disk.go:242-256`). | inert while empty; remove only after step 3 | |
| +| B5 | `/data/.moves/floor.json`, `/data/.moves/floor.min-release` (`v0.28.4`) | `syncLocalFloor` (`movesfloor.go:219-262`), which is called only by the agent's refresh (`:489-505`, from `edgesfile.go:980`) and root's apply (`systemapply.go:922`) | **`activationRule`** (`systemapply.go:1123-1150`) blocks any build below v0.28.4, and blocks any downgrade while a registry row is held. **The prev gate** in the update and recover units consults `carlos.prev.allowed` (`carlos-system-update.service:47`, `movesfloorgate.go:12-30`). **The edges file** advertises the floor (`movesfloor.go:507-525`). No code ever deletes these files, and the floor can only rise (`movesfloor.go:20-37, 175-180`). **The writer reads the remote floor before it takes `floor.lock`** (`movesfloor.go:224-252`), so a refresh that started before step 4 can write the floor back after a later delete. | **LIVE** | |
| +| B6 | `/opt/carlos/carlos.prev.allowed` | `judgePrev` while B5 is armed | the prev gate, only while B5 has content (`carlos-system-update.service:47`) | inert after B5 | |
| +| B7 | `/etc/carlos/fence-writer/credentials.json`, `credentials.installation.json` (root 600; access key `…VINM` for `carlos-dev-ie-b-fence-writer-root`) | 7a.2 `claims fence-credentials` | root's fence pass, which is gated off (`internal/host/hostfencepass.go:17-55`) | inert, but **a live AWS credential** | |
| +| B8 | `/etc/carlos/fence-writer/.claims-activation.lock` (root 600) | the same installer. It opens this lock and never unlinks it (`internal/host/activation_install_linux.go:95-100, 191-196`). Name at `internal/host/claimcensus.go:19` | the claim census only (`claimcensus.go:184`) | inert, but it blocks `rmdir` of the dir | |
| +| B9 | `/etc/carlos/.claims-activation.lock` | 7.3 `claims evidence-key`, whose lock lives in `/etc/carlos` (`activation_install_linux.go:117-130`) | as B8 | inert | |
| +| B10 | `/etc/carlos/host-evidence.key` (root 600) | 7.3 `claims evidence-key` | claim census and production only | inert, secret | |
| +| B11 | `/opt/carlos/system/router/channel-identity.json` | 6.1a `install-channel` (`installchannel.go:416, 649`) | region HA `join` only (`joinroot.go:175`) | inert | |
| +| B12 | `/root/claim-trial/` | 5.1 to 7a | none | inert | |
| +| B13 | root ownership of `/opt/carlos`, `live`, `versions` and `host.env` | session 3 (approved by Paul). Infra branch `host-root-owned-opt` is not applied | `OpenProtected` (guarded paths only). The platform intends root ownership (opt-ownership report §1) | **keep** (§2) | |
| ### Sophie (`carlos-dev-ie`, i-05498eada6f0afd23, the console box) |
| -Everything in B1 to B6, B10, B11 and B12 also applies to sophie: her guard |
| -dir has `console-ready.json` too, and there is no B7, B8 or B9. Sophie's own |
| -rows: |
| +B1 to B4, B5, B6, B11, B12 and B13 also apply to sophie; her guard dir also |
| +holds `console-ready.json`. B9 also applies: `console-config` locks |
| +`/etc/carlos` (`activation_install_linux.go:284-300`). Sophie has no B7, B8 |
| +or B10. Sophie's own rows: |
| | # | Path | Created by | Reads on main with claims off | State | |
| |---|---|---|---|---| |
| -| S1 | `console.service.d/90-host-floor.conf`: `ExecStart=/opt/carlos/system/guard/carlos system guard-exec console /opt/carlos/system/console/console serve` | 6.3 `guard-arm --console` (`guardarm.go:168-184`, `internal/hostfloor/report.go:101-103`) | systemd. The console runs the protected copy (S3), not the live link that a `canary/console` promote moves (roll log 17:08:52Z: staged `v0.28.16` while the running exe was still `1e36de1a`). | **LIVE** | |
| -| S2 | `/opt/carlos/system/guard/console-ready.json` | `guard-arm --console` (`guardarm.go:197-200`) | `Disk.Running("console")` (`report.go:30-42`). `proofnamed.go:126-145` reads it, but only treats the console as guarded when the file names the live link, which it doesn't. | inert without S1 | |
| -| S3 | `/opt/carlos/system/console/console`, `console.prev` (now v0.28.16 `337387dd`, `.prev` `1e36de1a`) | 6.3 `claims install-console`, then `--upgrade` on every roll | only through S1 | inert without S1 | |
| -| S4 | `console.service.d/91-claim-runtime.conf` and `/etc/carlos/claim-console.env` (`CARLOS_CONSOLE_ID=dev-console`, `CONSOLE_HOME_REGION=ie`, `CARLOS_HOST_CLAIM=`) | 6.3 and 7.4 `claims console-config`. On 2026-10-19 at 22:53Z the env file was swapped back to the off form by hand | `cmd/console/main.go:412, 438`. With `CARLOS_CONSOLE_ID` set, `StartHostReports` runs whether claims are on or off (`internal/console/claim_workers.go:30-33`, `hostreports.go:68-92`). Every 5 minutes it writes R5, reads R2, and with the release key re-signs R2 for each activation. `CONSOLE_HOME_REGION` names the home for offline moves and the regions door (`internal/console/apiinstancemove.go:276-281, 303-311`). Flagship's console has `CONSOLE_HOME_REGION=ie` too (roll-v0.28.10.md F1, 2026-10-23), so **the home region must stay**. Only the claim lines go. | **LIVE** | |
| -| S5 | `/root/claim-trial/paused-20261019/` (saved 7.4 files) | the pause | none | inert | |
| +| S1 | `console.service.d/90-host-floor.conf` (`ExecStart=/opt/carlos/system/guard/carlos system guard-exec console /opt/carlos/system/console/console serve`) | 6.3 `guard-arm --console` (`guardarm.go:168-184`, `report.go:101-103`) | systemd. The console runs the protected copy (S3), not the live link that a promote moves. | **LIVE** | |
| +| S2 | `/opt/carlos/system/guard/console-ready.json` | `guard-arm --console` (`guardarm.go:197-200`) | `Disk.Running("console")` (`report.go:30-42`). `proofnamed.go:126-145` would treat the console as guarded only if this file named the live link; it names the protected copy, so the proof check binds the live link anyway. | inert without S1 | |
| +| S3 | `/opt/carlos/system/console/console`, `console.prev` (`337387dd` = v0.28.16; `.prev` `1e36de1a`) | 6.3 `claims install-console`, then `--upgrade` on every roll | only through S1 | inert without S1 | |
| +| S4 | `console.service.d/91-claim-runtime.conf` (`[Service]` then `EnvironmentFile=/etc/carlos/claim-console.env`, **mandatory, with no `-`**, `activation_install_linux.go:318`) and `/etc/carlos/claim-console.env` (`CARLOS_CONSOLE_ID=dev-console`, `CONSOLE_HOME_REGION=ie`, `CARLOS_HOST_CLAIM=`) | 6.3 and 7.4 `claims console-config`; swapped by hand to the off form on 2026-10-19 | `cmd/console/main.go:412, 438`. With `CARLOS_CONSOLE_ID` set, `StartHostReports` runs whatever the claim switch says (`internal/console/claim_workers.go:30-33`, `hostreports.go:68-92`). It writes R5 and re-signs R2. `CONSOLE_HOME_REGION` names the home for offline moves and the regions door (`internal/console/apiinstancemove.go:276-281, 303-311`). Flagship's console has `CONSOLE_HOME_REGION=ie` too (roll-v0.28.10.md F1), so the home must stay. Only the claim lines go. | **LIVE** | |
| +| S5 | `/root/claim-trial/paused-20261019/` | the pause | none | inert | |
| ### Dennis (`carlos-dev-uk`, i-009d593f451cfd562, eu-west-2) |
| -Never enrolled. There is no guard on dennis (v0.28.16 log, 17:07:10Z), no |
| -`host-actor.json` and no roster row. **B5 and B6 apply** anyway: dennis's |
| -agent armed the moves floor from R1 like everyone else's. This is a |
| -consequence of the code (`movesfloor.go:20-37`); confirm it in step 0. Dennis |
| -also shares `stable` with leo, so while leo is armed a refused stable roll |
| -freezes dennis too (runbook G4). |
| +Dennis was never enrolled. It has no guard (v0.28.16 log, 17:07:10Z), no |
| +`host-actor.json` and no roster row. **B5 and B6 still apply**, because |
| +dennis's agent armed the moves floor from R1 like the others |
| +(`movesfloor.go:20-37`); step 0 confirms it. Dennis shares `stable` with |
| +leo, so while leo is armed, a refused stable roll would freeze dennis too. |
| +Dennis's unit files and drop-ins are the **reference for the plain units** |
| +in steps 2 and 3, because they never carried a guard. |
| ### Infra and account |
| | # | Resource | Where | Reads | State | |
| |---|---|---|---|---| |
| -| I1 | `module.fence_writer_ie_b`: role `carlos-dev-ie-b-fence-writer`, user `carlos-dev-ie-b-fence-writer-root` (path `/carlos/fence-writers/`), user policy `assume-own-fence-role`, role policy `create-termination-fences`. Plus **access key `…VINM`, made by hand and not in tofu** | `pinfra:dev/cohort1-fence-writer.tf:14-18` (#46, `beb346b2`). Module `infra/modules/box-fence-writer/main.tf:23-72`, which has no `force_destroy` | B7 | live credential, unused with claims off | |
| -| I2 | `box_fence_writer_role_arns = [module.fence_writer_ie_b.role_arn]` | `pinfra:dev/main.tf:62-64` | Bucket policy statement `OnlyBoxRolesWriteTerminationFences` (`infra/modules/deployment-buckets/main.tf:199-208`) | Drop it, and the module default (a "nobody" ARN, deny everyone) takes over | |
| -| I3 | `module.buckets.aws_s3_bucket_policy.deployment_box_records` (`BoxRecordsAreCreateOnly`, `BoxRecordsAreNeverDeleted`, …) | Unconditional in `infra/modules/deployment-buckets/main.tf:171-226` (since `abcc732d`). First applied on dev 2026-10-18 by the trial's targeted plan | Denies every principal deleting `control/boxes/*` and three sibling prefixes (`:192-196`) | **Keep**: it is the module's standard shape (§2) | |
| -| I4 | KMS key `ef26a257-fc1d-4fe3-ad9e-77a4b7b789f6` | Was `dev/cohort1-fence-kms.tf` (#45), removed by #48 | none | `PendingDeletion` until 2026-10-26T20:26:18Z. **Do nothing**, and don't cancel the deletion | |
| -| I5 | `carlos-claim-signer` role, profile, SG | Made and torn down by hand each session (`signing-host.md:45-76` on the runbook branch) | none | Should be absent (`NoSuchEntity` at 17:12Z on 2026-10-25). After the undo, no more sessions | |
| -| I6 | `carlos-root-runner` role and profile, SG `sg-0c328faf839a02986` | not in tofu | none | Plan 14 test rig. Optional removal once claims are gone from the code | |
| -| I7 | Harness: host i-06a1ec144aa5226fb (self-shutdown, terminate-on-shutdown, last TTL 2026-10-22T12:00Z), SG `sg-0b9cf4c2a508b7cec`, role and profile `carlos-harness`, bucket `carlos-harness-640012953448` | `platform-harness-build:harness/RESOURCES.md:8-14` | **Nothing in dev's bucket**: its role denies `s3:*` on `carlos-dev-*` (`harness/aws/role-policy.json:10-12`) | No teardown is recorded after 2026-10-21T16:23Z. Check, then `harness/TEARDOWN.md` | |
| -| I8 | Branch `host-root-owned-opt` (`747f699`, unmerged) | infra | — | Built on `a0b3f5a`, so it still carries `cohort1-fence-kms.tf`. Don't merge it as it stands | |
| - |
| -### 1a. Other roster and floor readers on main |
| - |
| -These are the remaining readers of R1, R2, B1 to B3 and S4, sorted by |
| -whether they run with claims off. |
| - |
| -**Run claims-off. These are the live constraints, besides those above:** |
| - |
| -- **The reserve check needs fresh reports.** `VerifyReport` refuses a box |
| - report older than 15 minutes, or one without `floor_guard_ready` and the |
| - floor digest (`internal/hostactors/census.go:66-68`). A stalled agent on |
| - leo or sophie therefore blocks **every** dev router promote and rollback, |
| - dennis's included. |
| -- **The console report worker is gated only on `CARLOS_CONSOLE_ID`.** It is |
| - registered without a claims gate (`internal/console/claim_workers.go:30-33`, |
| - `cmd/console/main.go:579`). Every 5 minutes it writes R5. With the release |
| - key loaded, which sophie has through `release-key.conf`, it calls |
| - `ReleaseActivation` for every activation, and that **writes R2** |
| - (`hostreports.go:86-92`, `internal/hostactors/activation_complete.go:56`). |
| - This is how the roster went from rev 49 to 53 during the v0.28.16 roll. |
| -- **Root's generation census accepts the edge's guard-exec `ExecStart`** |
| - only while `guard/carlos` is readable (`internal/host/rootgeneration_services_linux.go:226-231`). |
| - A drop-in left behind with the guard binary gone is refused there as well |
| - as by systemd. |
| -- **Box and group role verbs (`carlos system box role`, `group role`)** read |
| - and **write** R2 (`internal/console/apiboxroles.go:57-60`; `SetBoxRole` |
| - and `SetGroupRole` call `Replace`). They are gated on `CARLOS_REGION_HA`, |
| - not on claims (`apiboxroles.go:89`), and dev runs without it. With R2 |
| - gone they answer 503, as on flagship. |
| -- **`CARLOS_POOLS=cohort1` (B9)** makes leo's edges file say |
| - `serves_shared_pool=false`. That keeps leo out of region candidates |
| - (`internal/console/regioncandidates.go:63-75`) and out of the offline move |
| - door's box choice (`internal/console/apiinstancemove_offline.go:332, 413`). |
| - Today leo can be neither a target nor a source of an offline move. |
| -- **`carlos proof history`** (`history_cli.go:30`) needs R2. It is run by an |
| - operator and never automatically. |
| - |
| -**Gated off claims-off, so nothing changes when the residue goes:** |
| - |
| -- `internal/console/claim_runtime.go:24-60`; |
| -- `hostclaimbackfill.go:25-52`; |
| -- `apihostclaim.go:28-44` and `hostresolve/readmit.go` behind it; |
| -- `claim_sql_instance.go` (opened only with claims on); |
| -- `apiinstancemove.go:777, 1657` (Phase 1 live moves, `CARLOS_MOVES_PHASE1`; `boxselect.go:83` sits behind it); |
| -- `internal/host/hostfencepass.go:17-55` (so B7 is never used); |
| -- `relocatepass.go:678-680`; |
| -- `joinmode.go:300` and `joinroot.go` (region HA joins); |
| -- `claimproduction*.go`, `rootmigration_startup.go`, `claimcensus.go`, `claimparticipation.go` (claim construction only); |
| -- `internal/hostops/evidence.go`, `move_loss_grant.go`, `production_create.go` (built only in `ConfigureClaimRuntime`); |
| -- `roothistory_readback.go:39` (needs a readback request object, and there is none). |
| - |
| -`internal/hostexec/pending_linux.go` is reached without a gate from |
| -`guardtransaction.go:437`, but only when `.hostexec` is non-empty. The live |
| -offline move door (`apiinstancemove_offline.go`) reads none of R1, R2, R3 or |
| -the home binding. The only residue it sees is B9's pool flag. Nothing in |
| -provision or reconcile reads the roster's `regions.*.pools`. |
| +| I1 | `module.fence_writer_ie_b`: role `carlos-dev-ie-b-fence-writer`, user `carlos-dev-ie-b-fence-writer-root`, policies `assume-own-fence-role` and `create-termination-fences`, plus **access key `…VINM`, made by hand and not in tofu** | `pinfra:dev/cohort1-fence-writer.tf:14-18` (#46, `beb346b2`); module `infra/modules/box-fence-writer/main.tf:23-72` (no `force_destroy`) | B7 | a live credential, unused with claims off | |
| +| I2 | `box_fence_writer_role_arns = [module.fence_writer_ie_b.role_arn]` | `pinfra:dev/main.tf:62-64` | bucket policy `OnlyBoxRolesWriteTerminationFences` (`infra/modules/deployment-buckets/main.tf:199-208`) | drop it, and the module default (deny everyone) takes over | |
| +| I3 | `module.buckets.aws_s3_bucket_policy.deployment_box_records` | unconditional in `infra/modules/deployment-buckets/main.tf:171-226` (since `abcc732d`); first applied on dev on 2026-10-18 | denies every principal deleting `control/boxes/*` and three sibling prefixes (`:192-196`) | **keep**: it is the module standard | |
| +| I4 | KMS key `ef26a257-…` | was `dev/cohort1-fence-kms.tf`; removed by #48 | none | `PendingDeletion` until 2026-10-26T20:26:18Z. **Do nothing**; never cancel it | |
| +| I5 | `carlos-claim-signer` role, profile, SG | made by hand per session (`signing-host.md:45-76` on the runbook branch) | none | should be absent. No more sessions after this undo | |
| +| I6 | `carlos-root-runner` role and profile, SG `sg-0c328faf839a02986` | not in tofu | none | optional removal | |
| +| I7 | Harness host i-06a1ec144aa5226fb, SG `sg-0b9cf4c2a508b7cec`, role and profile `carlos-harness`, bucket `carlos-harness-640012953448` | `platform-harness-build:harness/RESOURCES.md:8-14` | none in dev's bucket: its role denies `carlos-dev-*` (`harness/aws/role-policy.json:10-12`) | no teardown recorded after 2026-10-21T16:23Z. Check, then follow `harness/TEARDOWN.md` | |
| +| I8 | infra branch `host-root-owned-opt` (`747f699`, unmerged) | infra | — | still carries `cohort1-fence-kms.tf`; don't merge it as it is | |
| + |
| +### 1a. Other readers on main |
| + |
| +**Running claims-off (live, beyond the rows above):** |
| + |
| +- **Fresh reports.** `VerifyReport` requires a report under 15 minutes old |
| + from leo and sophie (`census.go:66-68`). A stalled agent on either box |
| + blocks every dev router promote and rollback, dennis's included. |
| +- **Box and group role verbs** read and **write** R2 |
| + (`internal/console/apiboxroles.go:57-60`). They are gated on |
| + `CARLOS_REGION_HA` (`:89`), which dev doesn't set. With R2 gone they |
| + answer 503, as on flagship. |
| +- **`carlos proof history`** (`history_cli.go:30`) needs R2. It runs only |
| + when an operator runs it. |
| + |
| +**Gated off claims-off:** |
| + |
| +- `internal/console/claim_runtime.go:24-60` |
| +- `hostclaimbackfill.go:25-52` |
| +- `apihostclaim.go:28-44` (and `hostresolve/readmit.go`) |
| +- `claim_sql_instance.go` |
| +- `apiinstancemove.go:777, 1657` (`CARLOS_MOVES_PHASE1`; `boxselect.go:83` sits behind it) |
| +- `internal/host/hostfencepass.go:17-55` |
| +- `relocatepass.go:678-680` |
| +- `joinmode.go:300` and `joinroot.go` |
| +- `claimproduction*.go`, `rootmigration_startup.go`, `claimcensus.go`, `claimparticipation.go` |
| +- `internal/hostops/evidence.go`, `move_loss_grant.go`, `production_create.go` |
| +- `roothistory_readback.go:39` (it needs a request object, and none exists) |
| + |
| +**Other notes:** |
| + |
| +- `internal/hostexec/pending_linux.go` is reachable from |
| + `guardtransaction.go:437`, but only when `.hostexec` is non-empty. |
| +- The live offline-move door (`apiinstancemove_offline.go`) reads none of |
| + R1, R2 or R3. Nothing in provisioning reads the roster's pools. |
| +- Retained root-participation census state would stay authoritative with |
| + claims off (`internal/rootparticipation/production.go:54`). That is why |
| + step 0 has to prove `/var/lib/carlos-claims` is absent. |
| ## 2. Reverses: supported, manual, and what breaks out of order |
| -**There is no supported reverse for any claim artefact.** The code is |
| -one-way on purpose: |
| +There is **no supported reverse** for any claim artefact: |
| -- `Persist` refuses to move a policy from armed back to unpublished, or to a |
| - different floor (`internal/hostfloor/disk.go:72-80`). |
| +- `Persist` refuses armed→unpublished (`internal/hostfloor/disk.go:72-80`). |
| - `install-channel` refuses an armed box (`installchannel.go:301-305`). |
| -- The claims runner's store refuses every delete (`internal/claimactivation/runner.go:349`). |
| -- `console-config` refuses to go from on to off (runbook, "Paused state"). |
| +- The claims runner refuses every delete (`runner.go:349`). |
| +- `console-config` refuses on→off (runbook, "Paused state"). |
| - The local moves floor only rises (`movesfloor.go:175-180`). |
| -- `cancel-activation` releases only a reservation that was never published |
| - (`hostactivation.go:248-345`). |
| +- `cancel-activation` releases only unpublished reservations (`hostactivation.go:248-345`). |
| -What the code does define is the **legacy shape**, and every manual reverse |
| -below aims at it: |
| +The code does define a **legacy shape**, and every manual reverse aims at |
| +it: |
| -- no guard dir, or one holding only main's marker → unarmed (`guardtransaction.go:515-537`); |
| -- no `.hostexec`, or an empty one → idle (`participation.go:25-40`); |
| +- no guard dir → unarmed (`guardtransaction.go:515-537`); |
| +- `.hostexec` absent or empty → idle (`participation.go:25-40`); |
| - no `/data/.moves/floor.json` → "no moves protocol floor is armed on this box" (`systemapply.go:1127-1133`); |
| - both floor keys absent → no reservation (`hostactivation.go:34-44`); |
| -- no `host-actor.json` → no claim fields in the report (`claimreport.go:19-22`); |
| -- no `CARLOS_CONSOLE_ID` → no console report loop (`hostreports.go:70`). |
| +- no `host-actor.json` → no claim report fields (`claimreport.go:19-22`); |
| +- no `CARLOS_CONSOLE_ID` → no report loop (`hostreports.go:70`). |
| -Hand edits therefore leave root state the code already accepts as "never |
| -armed". **No code change is needed before the undo** (§3, "Code"). |
| +Astra confirmed this reading. Hand edits therefore leave the state that main |
| +already treats as "never armed". **No platform code change is needed |
| +first.** A `guard-disarm` verb would be new claims code written only to be |
| +deleted. |
| -| Item | Minimal safe manual reverse | Wrong order, and what breaks | |
| +| Item | Minimal safe reverse | Wrong order, and what breaks | |
| |---|---|---| |
| -| S1 (console guard) | Before anything else on sophie: check that `/opt/carlos/live/platform.dev.carlosframework.com` resolves to a build with the same sha256 as the protected console. Move `90-host-floor.conf` aside, `daemon-reload`, restart `console.service`. It then runs the live link, as flagship's does. | **Remove sophie's guard dir (B1) first:** `ExecStart` points at a missing `/opt/carlos/system/guard/carlos`, and the dev console fails with exit 203 at its next start. **Remove S3 first:** the same failure. **Live link on another build:** the console silently changes build at the restart. | |
| -| S4 (claim runtime) | First add a console-only drop-in with `Environment=CONSOLE_HOME_REGION=ie`. Then move `91-claim-runtime.conf` and `claim-console.env` aside, `daemon-reload`, restart (the same restart as S1). | **Drop the home region:** offline moves and the regions door lose the home name, and the console stops matching flagship. **Remove the env file but not the drop-in:** `EnvironmentFile=` without `-` fails the unit start. | |
| -| B2 (unit drop-ins) | Under the apply lock (`flock -n /opt/carlos/system/router/lock`), with `carlos-system-update.path` stopped: move the three `90-host-floor.conf` aside, `daemon-reload`, check `ExecStart` is the plain unit's. Don't restart: the running edge was exec'd from `/opt/carlos/carlos` and stays the same process. | **Move B1 first:** the next edge, update or recover start exits 203. The edge `Requires=` the recover unit, so a reboot leaves the box dark. | |
| -| B1, B3 (guard, enrollment) | After B2, under the same lock: move `/opt/carlos/system/guard` and `/etc/carlos/host-actor.json` aside to `/root/claim-undo-<date>/` (root 700, **not** under `/opt/carlos/system/`). Preconditions: no `system/router/journal.json`, no `update-begun.json*`, `completed.json` equals `activation.json`'s id, and the roster's `activations` and `holds` are empty. | **With an unsettled transaction:** the box loses its half of a reservation, and the console holds that channel (`activationHeldError`, `hostactivation.go:123-129`) until R1 goes. **While R1 and R2 remain:** the console refuses every router promote and rollback, because the disarmed box's report no longer verifies (`hostactivation.go:155-161`). That fails closed and wedges nothing. Hold the freeze until step 5. | |
| -| R1 (floor) | After **both** boxes are disarmed: delete both keys in one `s3api delete-objects` call. The bucket is versioned, so the old versions stay as the rollback. | **Before disarming:** armed boxes refuse every update (`beginGuard`, `guardtransaction.go:202-205`). Serving is fine, because `guard-exec` accepts "neither key" for an armed policy (`remote.go:57-63`). **One key only:** the console refuses every router update (`hostactivation.go:38-41`), and on any still-armed box `guard-exec` refuses to start edge, apply and recover (`remote.go:57-79`). That is an outage at the next restart. | |
| -| B5 (local moves floor) | After R1 is gone: on each of leo, sophie and dennis, holding `/data/.moves/floor.lock`, move `floor.json` and `floor.min-release` aside. Leave `.moves/` and the lock file. | **Before R1 goes:** the agent's hourly refresh, or the next apply, writes them back (`movesfloor.go:496-505`, `systemapply.go:921`). | |
| -| B6 | Leave it. It is read only beside a floor line. Optionally move it aside after B5. | none | |
| -| R2, R4, R5 (roster, invitations, console report) | After R1 and S4: delete them by exact key. Pre-check: `activations` and `holds` are empty. | **R2 before R1:** every promote is refused (`hostactivation.go:100-103`, `d.Read` returns not-exist). **R5 before S4:** the console rewrites it within 5 minutes. **R2 before S4:** the console logs a report error every 5 minutes. | |
| -| R3 (identities) | Optional, last: delete by exact key. | **Before R1 goes:** promotes of those releases are refused. | |
| -| R7 (box records) | Keep. Deleting them needs I3 changed first, and I3 is the module standard. Nothing claims-off reads them. | — | |
| -| R8 | Nothing to do. The next legacy promote rewrites the pointer. | — | |
| -| R10 (root-runner objects) | Optional: list them, then delete by exact key. | none | |
| -| R11 (pointer digests) | **Keep.** It is release integrity, not a claim. Turning it off is a separate decision, and flagship parity is unknown: run `carlos channels digests --account-id bab` against flagship read-only. | — | |
| -| R13, B9 (claimtrial, leo's pool) | Delete the `claimtrial` instance through the console, and wait for leo's route to retire. Then remove `CARLOS_POOLS=cohort1` from leo's `host.env` and restart the edge. Then trash the app. | **Pool first:** the cohort1 row falls out of leo's scope and is never retired, an orphan route (#309, runbook step 4.3). **Trash first:** the dev trap, where routes survive a trashed app (memory: dev-console-unit). | |
| -| B7, I1 (fence credentials) | `iam delete-access-key` for `…VINM`, then `shred -u` both files on leo, then the targeted tofu destroy of I1 together with I2. | **tofu before the key:** `DeleteConflict` on the user, because the module has no `force_destroy`. **Files before the key:** harmless, but the key stays live. | |
| -| B8, B10, B11, S2, S3, S5, B4 | After the steps above: `shred -u` the evidence key, remove the rest by exact path. `rmdir` `.hostexec` only if it is empty. | **S3 before S1:** console exit 203. | |
| -| B12 (root-owned `/opt/carlos`) | **Keep.** It is the platform's intended layout, and nothing claims-off depends on either owner. Flagship is `carlos:carlos` from infra's `host-init.sh`, so the boxes differ on this one point. Changing it back is Paul's call. Changing flagship's is the unmerged infra branch, which restarts every box. | — | |
| -| I3 | **Keep.** | — | |
| -| I4 | Nothing to do. It finishes deleting on 2026-10-26 at 20:26Z. | Cancelling the deletion brings the trial key back. | |
| +| S1, S4 (sophie console) | Step 1, in this order: <br>1. make sure the home region is set by a non-claim drop-in (keep an existing one);<br>2. move `90-host-floor.conf` and `91-claim-runtime.conf` aside;<br>3. `daemon-reload`, restart, check;<br>4. only then archive `claim-console.env`.<br>Rollback: restore the env file **before** its drop-in. | **Env file moved before reload and restart:** the loaded unit still names the file in a mandatory `EnvironmentFile=`, so the next start fails (Astra 7). **Guard dir (B1) or S3 removed first:** the start fails with exit 203. **Home region dropped:** offline moves and the regions door lose the home name. | |
| +| B2 (unit drop-ins) | Under the apply lock, with `carlos-system-update.path` stopped: move the three drop-ins aside and `daemon-reload`. No restart is needed: the running edge is `/opt/carlos/carlos agent` already. | **Guard dir moved first:** the next edge, update or recover start exits 203, and the edge `Requires=` recover, so a reboot leaves the box dark. | |
| +| B1, B3 | After B2, under the same lock: move them aside. Preconditions: no `journal.json`, no `update-begun.json*`, `completed.json` equals `activation.json`'s id, and the roster's `activations` and `holds` are empty. | **With an unsettled transaction:** the console holds that channel (`hostactivation.go:123-129`) until R1 goes. **While R1 and R2 stand:** every router promote and rollback is refused (`hostactivation.go:155-161`). That fails closed, and the freeze covers it. | |
| +| R1 | After both boxes are disarmed: delete both keys in one `s3api delete-objects` call. | **Before disarming:** armed boxes refuse updates (`guardtransaction.go:202-205`), though they keep serving (`remote.go:57-63`). **One key only:** the console refuses updates (`hostactivation.go:38-41`), and a still-armed `guard-exec` refuses to start its units (`remote.go:57-79`). | |
| +| B5 | After R1 is gone and its absence re-confirmed, **stop the writers**: the agent (`carlos-edge.service`) and root's apply (`carlos-system-update.path`, with the update and recover services inactive). Then move the files aside holding `floor.lock`, and start the writers again. Rollback uses the same exclusion. | **Without stopping the writers:** a refresh that read the old floor before step 4 takes the lock after the delete and writes both files back (`movesfloor.go:224-252`, Astra 6), and nothing ever removes them. | |
| +| R2, R4, R5 | After R1 and S4: delete them by exact key. | **R2 before R1:** every promote is refused (`hostactivation.go:100-103`). **R5 before S4:** rewritten within 5 minutes. | |
| +| B7, B8, I1 | Delete access key `…VINM`. Prove nothing holds B8 (`flock -n`). Shred the two credential files, remove B8 by exact path, `rmdir` the dir. Then the targeted tofu destroy of I1 together with I2. | **tofu before the key is deleted:** `DeleteConflict`. **Removing the dir before B8:** `rmdir` fails after the key is already gone (Astra 8). | |
| +| B9, B10, B11, B12, S2, S3, S5, B4 | After step 7: shred B10, prove B9 has no holder and remove it, remove the rest by exact path, `rmdir` `.hostexec` if empty. | **S3 before S1:** console exit 203. | |
| +| R3, R10 | Optional, last, by exact key. | **R3 before R1:** promotes of those releases are refused. | |
| +| R7, I3, R11, B13 | **Keep.** R7 cannot be deleted without changing the module's bucket policy, and nothing claims-off reads it. R11 and B13 are integrity and layout choices, not claims. | — | |
| +| I4 | Nothing to do. | Cancelling the deletion would bring the trial key back. | |
| ## 3. The undo, in order |
| -Rules for every step: |
| - |
| -- One step at a time, each on Paul's go. |
| -- Read-only pre-check, then the action, then the post-check. A 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`. Dennis is eu-west-2. |
| -- "Aside" means `/root/claim-undo-20261026/<step>/`, root 700, made with `install -d -m 0700`. Every move there is `mv -T` of one exact path. No globs, no `rm -r` on patterns. |
| -- **Freeze, from step 1 until step 8:** no `carlos system update`, `rollback` or `cancel-activation`, no `canary/console` promote, no `install-console`, no other session's dev roll. Tell other sessions on #404. |
| - |
| -Kinds: **[SSM]** touches a box over SSM. **[S3]** writes the bucket. **[IAM]** |
| -is a hand change in IAM. **[INFRA]** is targeted tofu. **[CONSOLE]** is a |
| -console API call. **[READ]** is read-only. |
| - |
| -### Step 0 [READ]: inventory and the claim emptiness check |
| - |
| -Pre-check and action are the same thing here. Reuse the runbook's "Pre-roll |
| -emptiness check" blocks 1 and 2 unchanged. Expected: `leo: all empty` and |
| -`bucket and roster: all empty`. Then add: |
| - |
| -- Bucket: |
| - - `aws s3 ls` on `control/hosts/`, `control/hosts-backfill.json`, `control/host-actor-invitations/`, `control/host-console-invitations/`, `control/system/router/releases/`, `status/consoles/`, `claim-signer/` and `root-runner/`, plus a recursive `admission.json` search under `apps/`; |
| - - `rosterview` (rev, `activations`, `holds`, `regions.ie.pools`); |
| - - the sha256 of both floor keys; |
| - - the version IDs of R1 and R2, recorded for rollback. |
| -- Each box: |
| - - `ls -la /opt/carlos/system/guard /opt/carlos/system/guard/identities`; |
| - - `cat completed.json`, and the `id` from `activation.json`; |
| - - `test ! -e /opt/carlos/system/router/journal.json`; |
| - - no `update-begun.json*`; |
| - - `test ! -e /opt/carlos/system/guard/moves` (no root moves floor); |
| - - `test ! -e /var/lib/carlos-claims`; |
| - - `ls -A /data/.hostexec`; |
| - - `cat /data/.moves/floor.json /data/.moves/floor.min-release`; |
| - - `systemctl cat carlos-edge carlos-system-update carlos-system-recover | grep -E 'ExecStart|Requires'`. |
| -- Sophie also: |
| - - `systemctl cat console.service`, to read the plain `ExecStart` (the opt-ownership report says `/opt/carlos/live/platform.dev.carlosframework.com`); |
| - - the sha256 of `readlink -f` of that link against `/opt/carlos/system/console/console`; |
| - - the environ of the running console. |
| -- IAM: |
| - - `list-access-keys` for `carlos-dev-ie-b-fence-writer-root`; |
| - - `get-role carlos-claim-signer` (expect `NoSuchEntity`). |
| -- SG: sg-054aa165db842b6ba has 80 and 443 from 0.0.0.0/0. |
| - |
| -Post-check: none. Any non-empty claim item (control/hosts, backfill, |
| -admission, /var/lib/carlos-claims, guard/moves, a non-empty .hostexec, roster |
| -activations or holds) is a STOP: real claim state exists, and this plan |
| -doesn't cover it. |
| - |
| -Rollback: none. |
| - |
| -### Step 1 [SSM sophie]: the dev console back to the plain unit |
| - |
| -Pre-check: |
| - |
| -- step 0 is clean; |
| -- the live link's target sha256 equals the protected console's (both `337387dd…` at v0.28.16); |
| -- `console.service` is active; |
| -- no `.next` in `/opt/carlos/system/console`. |
| - |
| -Action: |
| +### Rules for every step |
| + |
| +- One step at a time, each on Paul's go: a read-only pre-check, the action, then a post-check. |
| +- 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. |
| +- **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 |
| +console from `--console`, then `CARLOS_CONSOLE`, then the configured default |
| +(`auth.go:252-290`), and this machine's default is flagship (runbook line |
| +1044). An explicit `--console` is authoritative and never falls back to |
| +another credential (`auth.go:259-263`). So every console command in this |
| +plan, verification and rollback included, runs as: |
| + |
| +```bash |
| +DEV=https://platform.dev.carlosframework.com |
| +devcli() { env -u CARLOS_CONSOLE -u CARLOS_DEPLOYMENT_BUCKET -u CARLOS_DEPLOYMENT_DIR -u CARLOS_SERVICE_TOKEN -u AWS_PROFILE carlos "$@"; } |
| +# always: devcli <verb> --console "$DEV" ... |
| +``` |
| -1. Write `/etc/systemd/system/console.service.d/home-region.conf` (root 644): `[Service]` then `Environment=CONSOLE_HOME_REGION=ie`. |
| -2. Move `90-host-floor.conf`, `91-claim-runtime.conf` and `/etc/carlos/claim-console.env` aside. |
| -3. `systemctl daemon-reload`, then `systemctl restart console.service`. |
| +`ship-app.sh` (`pinfra:scripts/ship-app.sh:5-14`) has no console. It works |
| +in direct-bucket mode, on the AWS profile and bucket given as its first two |
| +arguments, with `AWS_REGION=eu-west-1` hard-coded, and it reads |
| +`/carlos/release-key` from that profile's account. So it is only ever run |
| +as `env -u CARLOS_CONSOLE CARLOS_BIN=<cli> ship-app.sh kass carlos-dev-640012953448 …`. |
| +AWS calls always name `--profile kass`. |
| + |
| +**Step kinds:** |
| + |
| +- **[READ]** read-only |
| +- **[SSM]** a box over SSM |
| +- **[S3]** writes to the bucket |
| +- **[IAM]** a hand IAM change |
| +- **[INFRA]** targeted tofu |
| +- **[CONSOLE]** a dev console API call |
| + |
| +### Step 0 [READ]: target, inventory and emptiness |
| + |
| +**Target.** Any mismatch below is a STOP: |
| + |
| +1. `carlos auth whoami`, with no flag. Record which console the default |
| + resolves to. If it is flagship, that is expected, and the reason for |
| + `devcli`. |
| +2. `devcli auth whoami --console "$DEV"` must print |
| + `… at https://platform.dev.carlosframework.com`. Anything else is a STOP, |
| + and so is any error. |
| +3. `aws --profile kass sts get-caller-identity` must show account |
| + `640012953448`. Anything else, including `271376211898` (flagship), is a |
| + STOP. |
| +4. `devcli system status --console "$DEV"` must list exactly |
| + `dennis-stenciling`, `leo-climbing` and `sophie-knitting`. |
| + |
| +**Claim emptiness.** Run the runbook's "Pre-roll emptiness check" blocks 1 |
| +and 2 unchanged; expect `leo: all empty` and `bucket and roster: all empty`. |
| +Then, on every box: `test ! -e /var/lib/carlos-claims`, |
| +`test ! -e /opt/carlos/system/guard/moves`, and no |
| +`/var/lib/carlos-claims/authority/exec/census.json`. Any hit is a STOP. |
| + |
| +**Bucket inventory.** |
| +- Key lists for every R row. |
| +- `rosterview`: rev, `activations`, `holds`. |
| +- The sha256 and version IDs of R1 and R2. |
| +- The edges files, recording each box's `serves_shared_pool` and |
| + `moves_floor_min_release`. |
| + |
| +**Box inventory** (all three boxes): |
| +- `ls -la` of the guard dir and `identities/`. |
| +- `completed.json`, and the `id` from `activation.json`. |
| +- `journal.json` and `update-begun.json*` (both must be absent). |
| +- `ls -A /data/.hostexec`. |
| +- `cat /data/.moves/floor.json /data/.moves/floor.min-release`. |
| +- `ls -la /opt/carlos/carlos.prev.allowed`. |
| +- `/opt/carlos/carlos version` and `carlos.prev version`. |
| +- For each of `.claims-activation.lock` in `/etc/carlos`, |
| + `/etc/carlos/fence-writer`, `/etc/systemd/system/console.service.d` and |
| + `/etc/systemd/system`: `ls -la` of the exact path. |
| + |
| +**Unit baseline.** For `carlos-edge`, `carlos-system-update` and |
| +`carlos-system-recover`, on every box, record: |
| +- `systemctl show -p FragmentPath -p DropInPaths -p ExecStart -p Requires -p After`; |
| +- the sha256 of each fragment file. |
| + |
| +Dennis's values are the **expected plain units**. |
| + |
| +On sophie, also record: |
| +- `systemctl cat console.service` (its plain `ExecStart` runs |
| + `/opt/carlos/live/platform.dev.carlosframework.com/…`); |
| +- the sha256 of `readlink -f` of that path, against the protected console's; |
| +- the environ of the running console; |
| +- every drop-in under `console.service.d` that sets `CONSOLE_HOME_REGION`. |
| + |
| +**Serving baseline, per box** (Astra 5): |
| +- **Leo** serves only its cohort1 records. Record its registry hosts with |
| + `devcli status --layout --console "$DEV"`, then `curl --resolve <host>:443:18.200.150.210` |
| + for `claimtrial.dev.carlosframework.com`. Expect 200 with |
| + `host=ip-172-31-19-180`. |
| +- **Sophie:** `https://wakecheck.dev.carlosframework.com/` through DNS |
| + (`host=ip-172-31-14-16`) and the dev console `/healthz`. |
| +- **Dennis:** its hosts from the same layout listing, each with `--resolve` |
| + to 18.135.60.181. If it lists none, record that. Its check is then |
| + "edge active, listening on 443". |
| + |
| +On every box, record the edge's `MainPID`, `NRestarts` and listen sockets. |
| + |
| +**IAM and network.** |
| +- `list-access-keys` for `carlos-dev-ie-b-fence-writer-root`. |
| +- `get-role carlos-claim-signer` must be `NoSuchEntity`. |
| +- sg-054aa165db842b6ba allows 80 and 443. |
| + |
| +Post-check: none. Rollback: none. |
| + |
| +### Step 1 [SSM sophie]: the dev console onto the plain unit (Astra 7's order) |
| -This is a few seconds of dev console downtime, like a roll. |
| +Pre-check: |
| +- Step 0 passed. |
| +- The live link's target sha256 equals the protected console's (both |
| + `337387dd…` at v0.28.16). |
| +- `console.service` is active, and there is no `console.next`. |
| + |
| +Action, one root shell: |
| + |
| +1. **Home region.** If step 0 found a non-claim drop-in already setting |
| + `CONSOLE_HOME_REGION=ie`, keep it. If it sets another value, STOP. |
| + Otherwise write `/etc/systemd/system/console.service.d/home-region.conf` |
| + (root 644, created with `set -o noclobber`, so it never overwrites): |
| + `[Service]` then `Environment=CONSOLE_HOME_REGION=ie`. Record which case |
| + happened. |
| +2. Move `console.service.d/90-host-floor.conf` and |
| + `console.service.d/91-claim-runtime.conf` aside. **Do not touch |
| + `claim-console.env` yet.** |
| +3. `systemctl daemon-reload`, then `systemctl restart console.service`, then |
| + `systemctl is-active console.service`. This is a few seconds of downtime, |
| + like a roll. |
| +4. Check, before going on: |
| + - `DropInPaths` lists neither drop-in; |
| + - `readlink /proc/$PID/exe` is under `/opt/carlos/versions/`, with an |
| + unchanged sha256; |
| + - the environ has `CONSOLE_HOME_REGION=ie` and no `CARLOS_CONSOLE_ID` or |
| + `CARLOS_HOST_CLAIM`; |
| + - `/healthz` answers 200. |
| +5. Only then move `/etc/carlos/claim-console.env` aside. |
| Post-check: |
| - |
| -- `console.service` is active, and `readlink /proc/$PID/exe` is `/opt/carlos/versions/<v>/console`, not `system/console/console`; |
| -- the exe sha256 is unchanged; |
| -- the environ has `CONSOLE_HOME_REGION=ie` and no `CARLOS_CONSOLE_ID` or `CARLOS_HOST_CLAIM`; |
| -- `/healthz` is 200; |
| -- the runbook's P9 check still passes; |
| -- after 6 minutes, `status/consoles/dev-console.json` has not changed (R5) and the roster revision has not moved; |
| -- `carlos move offline status` still answers for a dev host. |
| - |
| -Rollback: move the three files back, remove `home-region.conf`, |
| -`daemon-reload`, restart. The protected copy is untouched. |
| +- The runbook's P9 check passes. |
| +- After 6 minutes, `status/consoles/dev-console.json` and the roster |
| + revision are unchanged. |
| +- `devcli move offline status --console "$DEV" --host wakecheck.dev.carlosframework.com` |
| + answers. |
| + |
| +Rollback, in this order: |
| +1. Move `claim-console.env` back first. |
| +2. Then `91-claim-runtime.conf` and `90-host-floor.conf`. |
| +3. Remove `home-region.conf` only if this step created it. |
| +4. `daemon-reload`, restart. |
| ### Step 2 [SSM leo]: disarm leo |
| -Pre-check, again just before acting: |
| - |
| -- no `journal.json`; |
| -- no `update-begun.json*`; |
| -- `completed.json` equals `activation.json`'s id; |
| -- `.hostexec` is empty; |
| -- `rosterview` shows `activations []` and `holds []`; |
| -- the edge is active, and its PID is noted. |
| +Pre-check, immediately before the action: |
| +- No `journal.json` and no `update-begun.json*`. |
| +- `completed.json` equals `activation.json`'s id. |
| +- `.hostexec` is empty. |
| +- `rosterview` shows `activations []` and `holds []`. |
| +- `carlos-system-update.service` and `carlos-system-recover.service` are |
| + inactive. |
| -Action, as one root shell: |
| +Action, one root shell: |
| 1. `systemctl stop carlos-system-update.path`. |
| -2. `flock -n /opt/carlos/system/router/lock` around steps 3 to 6. |
| -3. Move aside `/etc/systemd/system/{carlos-edge,carlos-system-update,carlos-system-recover}.service.d/90-host-floor.conf`, one exact path each. |
| +2. Hold `flock -n /opt/carlos/system/router/lock` around steps 3 to 6. |
| +3. Move aside `/etc/systemd/system/carlos-edge.service.d/90-host-floor.conf`, |
| + `…/carlos-system-update.service.d/90-host-floor.conf` and |
| + `…/carlos-system-recover.service.d/90-host-floor.conf`. |
| 4. `systemctl daemon-reload`. |
| -5. Check `systemctl show -p ExecStart` for each of the three units: no `guard-exec`. Check the edge shows no `Requires=carlos-system-recover`. |
| -6. `mv -T /opt/carlos/system/guard <aside>/guard` and `mv -T /etc/carlos/host-actor.json <aside>/host-actor.json`. |
| -7. Release the lock, then `systemctl start carlos-system-update.path`. |
| +5. **Unit comparison** (Astra 5). For each of the three units: |
| + - `DropInPaths` equals dennis's from step 0 (no `90-host-floor.conf`); |
| + - `ExecStart` equals dennis's. For update and recover that is the |
| + template's `/bin/sh -c 'if [ -x /opt/carlos/system/guard/carlos ] && … guard-exec …'`, |
| + which is expected; |
| + - the edge's `ExecStart` is `/opt/carlos/carlos agent`, and `Requires` |
| + no longer names `carlos-system-recover.service` (as on dennis); |
| + - the fragment sha256 is unchanged from step 0. |
| +6. Move `/opt/carlos/system/guard` and `/etc/carlos/host-actor.json` aside. |
| +7. Prove the template's guard selector is inactive: |
| + - `test ! -x /opt/carlos/system/guard/carlos`; |
| + - `test ! -e /var/lib/carlos-claims/authority/exec/census.json`; |
| + - `test ! -e /opt/carlos/system/guard/moves`. |
| +8. Release the lock, then `systemctl start carlos-system-update.path`. |
| Post-check: |
| - |
| -- the edge has the same PID and is active; |
| -- `test ! -e /opt/carlos/system/guard`; |
| -- the next `status/boxes/leo-climbing.json` (within about 6 minutes) has no `floor_guard_ready` or `enrollment`; |
| -- wakecheck and claimtrial answer 200 through `--resolve` to leo. |
| - |
| -Rollback, in reverse order: |
| - |
| -1. Move the guard dir and `host-actor.json` back first. |
| +- The edge has the same PID, `NRestarts` 0, and is active. |
| +- Leo's serving check from step 0 still passes (claimtrial through |
| + `--resolve`). Wakecheck is not checked on leo: leo does not serve it |
| + (section 5). |
| +- The next `status/boxes/leo-climbing.json`, within about 6 minutes, has no |
| + `floor_guard_ready` or `enrollment`. |
| + |
| +Rollback, in this order: |
| +1. The guard dir and `host-actor.json` back first. |
| 2. Then the three drop-ins. |
| 3. `daemon-reload`. |
| -Never put the drop-ins back before the guard dir. |
| +The drop-ins never go back before the guard. |
| ### Step 3 [SSM sophie]: disarm sophie |
| -As step 2, on sophie. Step 1 must have passed: `console.service` no longer |
| -execs through the guard. Add `console-ready.json` to the pre-check listing. |
| -It moves with the guard dir. |
| +As step 2 on sophie, with two differences. Step 1 must have passed, so the |
| +console no longer execs through the guard; `console-ready.json` moves with |
| +the guard dir. Sophie's serving check is wakecheck through DNS and the |
| +console's `/healthz`. Claimtrial is not checked: it is cohort1-only and not |
| +on sophie (`internal/provision/reconcile.go:443`). |
| -Between steps 2 and 5 the console refuses router promotes and rollbacks |
| -(R1 and R2 are still published and the boxes' reports no longer verify). |
| +From step 2 to step 4 the console refuses router promotes and rollbacks. |
| That is expected, and the freeze covers it. |
| ### Step 4 [S3]: remove the floor |
| Pre-check: |
| +- Neither leo nor sophie has `/opt/carlos/system/guard`, and dennis never did. |
| +- `rosterview` shows `activations []`. |
| +- Both keys are present, with step 0's hashes. |
| -- neither leo nor sophie has `/opt/carlos/system/guard`; |
| -- `rosterview` shows `activations []`; |
| -- dennis has no guard; |
| -- both keys are present with the hashes from step 0. |
| - |
| -Action: `aws s3api delete-objects` for exactly `control/moves-protocol.json` |
| -and `control/moves-protocol-auth.json` in one request. |
| +Action: `aws --profile kass s3api delete-objects` naming exactly |
| +`control/moves-protocol.json` and `control/moves-protocol-auth.json`. |
| Post-check: |
| +- `head-object` returns 404 for both. |
| +- `devcli system status --console "$DEV"` answers. |
| +- The console log has no `hostfloor` refusal. |
| -- `head-object` returns 404 for both; |
| -- `carlos system status --console https://platform.dev.carlosframework.com` 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: restore the step-0 version IDs. Copy each prior version over its |
| -key, auth key first, then the floor (the order `Publish` uses). This only |
| -helps if steps 2 and 3 are rolled back too, because otherwise the restored |
| -floor wedges promotes again. |
| +### Step 5 [SSM dennis, leo, sophie, one box at a time]: remove the local moves floor (Astra 6) |
| -### Step 5 [SSM leo, sophie, dennis]: remove the local moves floor |
| +The only writers are `syncLocalFloor`'s two callers (`movesfloor.go:219`): |
| +- the agent, in `carlos-edge.service`, at its start and every hour |
| + (`movesfloor.go:489-505`, `edgesfile.go:980`); |
| +- root's apply, in `carlos-system-update.service` (fired by |
| + `carlos-system-update.path`) and `carlos-system-recover.service` |
| + (`systemapply.go:922`). |
| -Pre-check: |
| +No timer writes the floor: the adopt timer only writes `carlos.prev` |
| +verdicts. |
| -- step 4 is done (404 on both keys); |
| -- on each box, `/data/.moves/floor.json` holds `v0.28.4` (or is absent on a box that never armed it); |
| -- no offline move is in flight (`carlos move offline status` for every dev host). |
| +Pre-check, on each box: |
| +- `head-object` returns 404 for both R1 keys again, read now. |
| +- `/data/.moves/floor.json` holds `v0.28.4`. |
| +- No offline move is in flight: `devcli move offline status --console "$DEV"` |
| + for each host the box serves. |
| Action, on each box: |
| -1. `flock /data/.moves/floor.lock`. |
| -2. Move `floor.json` and `floor.min-release` aside. |
| -3. Optionally move `/opt/carlos/carlos.prev.allowed` aside too. |
| +1. `systemctl stop carlos-system-update.path`. |
| +2. Wait until `carlos-system-update.service` and |
| + `carlos-system-recover.service` are both `inactive`. |
| +3. `systemctl stop carlos-edge.service`. Check `MainPID` is 0 and no |
| + `carlos agent` process is left. This is the same stop a roll makes; the |
| + box serves nothing for those seconds. |
| +4. `flock -n /data/.moves/floor.lock -c '<move floor.json and floor.min-release aside>'`. |
| + If `flock -n` fails, a writer still holds the lock: start the edge and the |
| + path again, and STOP. |
| +5. Optionally move `/opt/carlos/carlos.prev.allowed` aside (B6). |
| +6. Re-read: R1 is still 404. |
| +7. `systemctl start carlos-edge.service`, then |
| + `systemctl start carlos-system-update.path`. |
| + |
| +On leo and sophie, step 7 is also **the first start through the plain edge |
| +unit**. |
| Post-check: |
| +- The edge is active, `ExecStart` is `/opt/carlos/carlos agent`, and |
| + `NRestarts` is 0. |
| +- The box's step-0 serving check passes. |
| +- Both floor files are absent. |
| +- The box's edges file has no `moves_floor_min_release`. |
| +- The agent's start-up refresh has left them absent. Check again after the |
| + next hourly refresh. |
| -- both files are absent; |
| -- after the agent's next hourly refresh they are still absent, which proves R1 is gone; |
| -- the edges file shows no `moves_floor_min_release`. |
| +Rollback, under the same exclusion: |
| +1. Stop path and edge as in actions 1 to 3. |
| +2. Restore the files while holding `floor.lock`. |
| +3. Start edge and path again. |
| -Rollback: move them back. |
| +Then roll back step 4 if wanted. |
| ### Step 6 [S3]: remove the roster, invitations and console report |
| Pre-check: |
| +- Step 1 is done, and R5 hasn't changed since. |
| +- Step 4 is done. |
| +- `rosterview` shows `activations []` and `holds []`. |
| +- No box has `host-actor.json`. |
| -- step 1 is done and R5 hasn't changed since; |
| -- step 4 is done; |
| -- `rosterview` shows `activations []` and `holds []`; |
| -- no box has `host-actor.json`. |
| - |
| -Action: delete `control/host-actors.json`, the two |
| -`control/host-actor-invitations/*.json`, the one |
| -`control/host-console-invitations/*.json` and |
| -`status/consoles/dev-console.json`. Each is one exact key, named from step 0. |
| +Action: delete, one exact key at a time from step 0's list: |
| +- `control/host-actors.json`; |
| +- the two `control/host-actor-invitations/*.json`; |
| +- the one `control/host-console-invitations/*.json`; |
| +- `status/consoles/dev-console.json`. |
| Post-check: |
| - |
| -- all of them return 404; |
| -- the console logs nothing about the roster; |
| -- `carlos system status` is fine. |
| +- 404 for each. |
| +- `devcli system status --console "$DEV"` is fine. |
| +- The console logs nothing about the roster. |
| Rollback: restore the prior versions. |
| -### Step 7 [CONSOLE, then SSM leo]: claimtrial and leo's pool |
| - |
| -Pre-check: claimtrial is the only record with pool `cohort1` |
| -(`aws s3 ls` on the instance records, read the pool). |
| - |
| -Action: |
| - |
| -1. `carlos instances delete` the host through the dev console. |
| -2. Wait for leo's route to retire: `registry.db` has no `claimtrial` row. |
| -3. On leo, copy `host.env` to `host.env.bak-undo-<date>`. |
| -4. Remove the `CARLOS_POOLS=cohort1` line by exact match. |
| -5. `systemctl restart carlos-edge.service`. This is also the first start through the plain unit. |
| -6. `carlos apps trash claimtrial`. |
| -7. Optionally move `host.env.bak-pool-20261018` aside. |
| - |
| -Post-check: |
| - |
| -- the edge is active, and the log line reads `instances loop armed … pools []`; |
| -- within 5 minutes leo mints the pool-less records again (wakecheck); |
| -- wakecheck answers 200 on both boxes. |
| - |
| -The #286 two-home-box hazard is back. That is the state before the trial. |
| - |
| -Rollback: restore `host.env` and restart the edge. A deleted instance |
| -isn't restored; it was disposable. |
| - |
| -### Step 8 [READ, then normal operation]: prove dev updates like flagship |
| - |
| -This step ends the freeze. Use the next real release, or the current one if |
| -none is due. |
| - |
| -1. `carlos system update --channel canary` (sophie), then `--channel stable` (leo, dennis). There is no signing session and no `publish-identity`. |
| -2. `carlos system rollback --channel canary`, then forward again. |
| -3. Ship and promote the console with `ship-app.sh` to `canary/console`, as on flagship. |
| - |
| -Pass: |
| - |
| -- every promote and rollback succeeds with no `activation … is held` and no `hostfloor` error; |
| -- `control/host-actors.json` stays absent, and no `releases/<tag>.json` appears; |
| -- each box's journal logs `no moves protocol floor is armed on this box` (as flagship-roll-v0.28.9.md:618); |
| -- the console's `/proc` exe changes to the promoted build with no `install-console`; |
| -- every box `current`, 0 `REFUSING`, wakecheck 200. |
| - |
| -Rollback: `carlos system rollback` works now. That is the point of the step. |
| - |
| -### Step 9 [IAM, SSM leo]: the fence-writer credential |
| +### Step 7 [CONSOLE, READ, one SSM reboot]: prove dev updates like flagship (Astra 9) |
| + |
| +This step ends the freeze. A re-promote of the version already running is |
| +not a test: apply notes it and returns before any activation check |
| +(`systemapply.go:435`). So every transition below is **between two distinct |
| +releases**. |
| + |
| +**Pinned releases:** v0.28.16 (router `carlos-linux-arm64` sha256 |
| +`578bab0f…d553`) and v0.28.15 (its sha256 is taken from v0.28.15's |
| +signature-verified `SHA256SUMS.txt` on the day). Both have been rolled on dev |
| +and flagship. If a newer release has been cut and approved for dev by then, |
| +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**: |
| +- `/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. |
| + |
| +Then run every box's step-0 serving check. |
| + |
| +The transitions: |
| + |
| +1. **Canary back.** Pre-check: `canary.json`'s `history[0]` is v0.28.15. |
| + Run `devcli system rollback --console "$DEV" --channel canary --yes`. |
| + Expect sophie on v0.28.15, and no `activation … is held` or `hostfloor` |
| + error. |
| +2. **Canary forward.** `devcli system update --console "$DEV" --channel canary --version v0.28.16 --yes`. |
| + Expect sophie on v0.28.16 with `.prev` v0.28.15. |
| +3. **Stable back.** Pre-check: `stable.json`'s `history[0]` is v0.28.15. |
| + Run `devcli system rollback --console "$DEV" --channel stable --yes`. |
| + Expect leo and dennis on v0.28.15. |
| +4. **Stable forward.** `devcli system update --console "$DEV" --channel stable --version v0.28.16 --yes`. |
| + Expect leo and dennis on v0.28.16 with `.prev` v0.28.15. |
| +5. **No claim residue came back.** `control/host-actors.json` is still |
| + absent, no new `control/system/router/releases/*.json` appeared, there was |
| + 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`; |
| + - the edge started after it, as `/opt/carlos/carlos agent`, `NRestarts` 0; |
| + - leo's serving check passes; |
| + - `carlos version` is unchanged. |
| +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 |
| + existing version. Use the script's promote half alone if `ship` refuses a |
| + second ship. Expect `/proc/$PID/exe` to resolve to the v0.28.15 console |
| + (`1e36de1a…`) within about 20 seconds, with no `install-console`. Then |
| + promote v0.28.16 the same way and expect `337387dd…`. Check `/healthz` |
| + both times. |
| +8. **Offline move, both directions.** Dev's topology supports this today: |
| + leo's edges file says `serves_shared_pool=false`, so the ie placement has |
| + exactly one eligible box (sophie) and uk has one (dennis). The door's |
| + rule is at `apiinstancemove_offline.go:327-333, 384-389`; step 0 recorded |
| + the edges files. Follow the passed dev rehearsal recipes |
| + (`own/after236/dev-move-rehearsal-v0.28.6.md`, |
| + `dev-precopy-rehearsal-v0.28.7.md`), with every command through |
| + `devcli … --console "$DEV"`, on a new disposable app in `bab`: |
| + - write three marker rows, and record the `hits=` count and the rows' |
| + content; |
| + - move ie → uk, and check the same rows and count on dennis |
| + (`--resolve` to 18.135.60.181); |
| + - write one more row; |
| + - move uk → ie, and check all four rows on sophie; |
| + - delete the instance, then trash the app. |
| + |
| + A 200 alone is not a pass. If step 0 shows the topology differs (two |
| + eligible ie boxes, or none in uk), skip this item and record it under |
| + section 5. |
| + |
| +**Pass:** every transition reached `current` with the expected `carlos` and |
| +`.prev` on every box, no refusals, item 5 clean, the reboot witness clean, |
| +the console followed both promotes, and the move rows survived both ways. |
| + |
| +Rollback: ordinary `devcli system update` or `rollback` against |
| +`--console "$DEV"`, which this step has just shown to work. |
| + |
| +### Step 8 [IAM, SSM leo]: the fence-writer credential (Astra 8) |
| Pre-check: |
| - |
| -- the key `…VINM` is listed and `Active`; |
| -- leo's file fingerprint is `3fe9f5d9`; |
| -- `CARLOS_HOST_CLAIM` is still unset on leo. |
| +- Key `…VINM` is listed and `Active`. |
| +- Leo's credential fingerprint is `3fe9f5d9`. |
| +- Step 0 listed `/etc/carlos/fence-writer/.claims-activation.lock`, and |
| + nothing else in that dir apart from the two credential files. |
| +- `flock -n /etc/carlos/fence-writer/.claims-activation.lock true` |
| + succeeds, so no installer holds it. Nothing runs these installers but an |
| + operator. |
| Action: |
| -1. `aws iam update-access-key --status Inactive`, then `delete-access-key` for `…VINM`. |
| -2. On leo, `shred -u /etc/carlos/fence-writer/credentials.json /etc/carlos/fence-writer/credentials.installation.json /etc/carlos/host-evidence.key`. |
| -3. `rmdir /etc/carlos/fence-writer`. |
| +1. `aws --profile kass iam update-access-key --status Inactive`, then |
| + `delete-access-key`, for `…VINM`. |
| +2. On leo, as one shell: |
| + - `shred -u` both credential files; |
| + - `flock -n` again, then `rm -- /etc/carlos/fence-writer/.claims-activation.lock`; |
| + - `rmdir /etc/carlos/fence-writer`. |
| Post-check: |
| - |
| -- `list-access-keys` is empty; |
| -- the three files are gone; |
| +- `list-access-keys` is empty. |
| +- The dir is gone. |
| - CloudTrail shows no `AssumeRole` on the fence-writer role since 2026-10-19. |
| -Rollback: none for the key, which is the point. A new one can be made if |
| -claims ever return. |
| +Rollback: none for the key, which is the point. |
| -### Step 10 [INFRA, targeted]: remove the fence writer |
| +### Step 9 [INFRA, targeted]: remove the fence writer |
| -Pre-check: |
| - |
| -- step 9 is done (the user has no access keys); |
| -- on a branch from infra `origin/main` (`5cf9a0ed`), remove `dev/cohort1-fence-writer.tf` and the `box_fence_writer_role_arns` line plus its comment (`dev/main.tf:62-64`). |
| +Pre-check: step 8 is done. On a branch from infra `origin/main` |
| +(`5cf9a0ed`), remove `dev/cohort1-fence-writer.tf` and the |
| +`box_fence_writer_role_arns` line, with its comment, from `dev/main.tf:62-64`. |
| Action: |
| -``` |
| +```bash |
| tofu plan -target=module.fence_writer_ie_b -target=module.buckets.aws_s3_bucket_policy.deployment_box_records -out=undo-fence.plan |
| ``` |
| -Read the whole plan. Expect 0 to add, 1 to change (the bucket policy's |
| -`OnlyBoxRolesWriteTerminationFences` ARN list becomes the module's "nobody" |
| -ARN) and 4 to destroy (the user, its policy, the role and its policy). |
| -Anything else, and any `user_data` change, is a STOP. Then apply the saved |
| -plan, and merge the PR. |
| +Expect 0 to add, 1 to change (the fence statement's ARN list becomes the |
| +module's deny-everyone ARN) and 4 to destroy. Anything else, or any |
| +`user_data` change, is a STOP. Apply the saved plan, then merge the PR. |
| Post-check: |
| +- `get-role` and `get-user` return `NoSuchEntity`. |
| +- The bucket policy has four statements, with none of our ARNs. |
| -- `get-role carlos-dev-ie-b-fence-writer` and `get-user …-root` return `NoSuchEntity`; |
| -- the bucket policy has four statements, and no ARN of ours in the fence statement. |
| +Rollback: revert the branch and run a targeted apply. It makes a new role |
| +and user, with no key. |
| -Rollback: revert the branch and run a targeted apply. That makes a new role |
| -and user, but no key. |
| +### Step 10 [SSM leo, sophie; S3]: inert leftovers |
| -### Step 11 [SSM leo, sophie; S3]: inert leftovers |
| - |
| -After step 8 passes. Pre-check: steps 1 to 8 passed and a week has gone by |
| -without a problem. |
| +Pre-check: steps 1 to 9 passed, and a week has gone by without a problem. |
| Action: |
| -- **On both boxes:** remove `/root/claim-trial` by exact path (and sophie's `paused-20261019` inside it). |
| -- **On sophie:** remove `/opt/carlos/system/console` (S3). Step 1 must have passed and the console must run from `versions/`. |
| -- **On both boxes:** |
| - - remove `/opt/carlos/system/router/channel-identity.json`; |
| +- **Leo:** |
| + 1. `shred -u /etc/carlos/host-evidence.key` (B10). |
| + 2. If `flock -n /etc/carlos/.claims-activation.lock true` succeeds, |
| + `rm --` that exact path (B9). |
| +- **Sophie:** the same B9 removal. |
| +- **Both:** |
| + - remove by exact path `/root/claim-trial` (sophie's |
| + `paused-20261019/` included) and `/opt/carlos/system/router/channel-identity.json`; |
| - `rmdir /data/.hostexec` if it is empty; |
| - remove the aside dirs from steps 1 to 5. |
| -- **In S3:** delete the identities `control/system/router/releases/*.json` (R3) one exact key at a time, from the step-0 list. Optionally do the same for `root-runner/` (R10). |
| +- **Sophie:** remove `/opt/carlos/system/console` (S3). |
| +- **S3:** optionally, the R3 identities and R10's root-runner objects, one |
| + exact key at a time from step 0's list. |
| -Post-check: each path is absent, and `carlos system status` is fine. |
| +Post-check: each path is absent, and `devcli system status --console "$DEV"` |
| +is fine. |
| -Rollback: none needed. Everything here is inert, and the bucket keeps |
| -versions. |
| +Rollback: none needed. |
| -### Step 12 [IAM, by hand; optional, separate go]: account leftovers |
| +### Step 11 [IAM, by hand; optional, separate go]: account leftovers |
| -- **Root runner:** first check no instance is tagged `purpose=plan14-root-runner`. Then delete role and profile `carlos-root-runner` and SG `sg-0c328faf839a02986`. |
| -- **Harness:** check i-06a1ec144aa5226fb is `terminated`, then follow `harness/TEARDOWN.md` (role, profile, SG, bucket). |
| -- **Claim signer:** check `carlos-claim-signer` is absent. |
| +- **Root runner:** with no instance tagged `purpose=plan14-root-runner` |
| + running, delete `carlos-root-runner` (role and profile) and |
| + `sg-0c328faf839a02986`. |
| +- **Harness:** check that i-06a1ec144aa5226fb is `terminated`, then follow |
| + `harness/TEARDOWN.md`. |
| +- **Signer:** check that `carlos-claim-signer` is still absent. |
| -### Step count by kind |
| +### Steps by kind |
| | Kind | Steps | |
| |---|---| |
| -| READ only | 0 (inventory); 8 is the verification | |
| -| SSM on boxes | 1 (sophie), 2 (leo), 3 (sophie), 5 (all three), 7 (leo, after a console call), 9 (leo, with IAM), 11 | |
| -| S3 writes | 4, 6, 11 (identities, optional root-runner) | |
| -| IAM by hand | 9 (access key), 12 (optional) | |
| -| Targeted tofu | 10 | |
| -| Console API | 7 (instance delete, app trash) | |
| +| READ | 0 | |
| +| SSM on boxes | 1, 2, 3, 5 (all three boxes), 7 (the leo reboot), 8 (leo), 10 | |
| +| S3 writes | 4, 6, 10 (optional) | |
| +| IAM by hand | 8, 11 (optional) | |
| +| Targeted tofu | 9 | |
| +| Console API | 7 (promotes, rollbacks, console promotes, the move) | |
| | Platform code change first | none | |
| -Thirteen steps (0 to 12): |
| - |
| -- seven touch boxes over SSM; |
| -- three write S3; |
| -- two change IAM by hand; |
| -- one runs targeted tofu; |
| -- one uses the console API; |
| -- one is read-only; |
| -- one is the end-to-end proof. |
| - |
| -Steps 1 to 6 are the core undo. They must run in that order, under one |
| -freeze, ideally in one sitting. |
| - |
| -**Code.** No platform change is needed first. The hand edits produce the |
| -legacy shape that main already handles as "never armed" (§2). A |
| -`guard-disarm` verb would only package steps 2 and 3, and it would be new |
| -claims code written just to be deleted with the rest. Write one only if Paul |
| -wants the order and checks enforced by the binary rather than the runbook. |
| -If he does, it needs: the apply flock, `guardArmIdle`, a settled |
| -transaction, byte-equal drop-ins, a move-aside receipt, and a root-runner |
| -witness that a hand-disarmed box applies and recovers exactly as main does. |
| +That is twelve steps, 0 to 11. Steps 1 to 6 are the core and run in order |
| +under one freeze. Step 7 is the proof and ends the freeze. |
| ## 4. Flagship |
| -Flagship has none of this residue. The evidence, all from 2026-10-21 to 10-25: |
| +Flagship has none of this residue: |
| -- **No guard on any flagship box.** `ls /opt/carlos/system/guard` answers "No such file or directory" on all four boxes before both the v0.28.15 and the v0.28.16 roll (`own/after236/flagship-roll-v0.28.16.md:56,93,130,167`, `flagship-roll-v0.28.15.md:56,92,128,164`). |
| +- **No guard on any of its four boxes.** `ls /opt/carlos/system/guard` |
| + answers "No such file or directory" before the v0.28.15 and v0.28.16 rolls |
| + (`own/after236/flagship-roll-v0.28.16.md:56,93,130,167`; `flagship-roll-v0.28.15.md:56,92,128,164`). |
| - **No floor.** |
| - - Flagship rolls with plain `carlos system update` (`flagship-roll-v0.28.16.md:252-264`) and never runs a signing session or `publish-identity`. With a floor published, `reserveHostUpdate` would refuse a release that has no identity (`hostactivation.go:84-87`). |
| - - Root's apply on flagship logs `no moves protocol floor is armed on this box` (`flagship-roll-v0.28.6.md:372`, `v0.28.7.md:471`, `v0.28.8.md:534`, `v0.28.9.md:618`), which is the `floor == nil` branch at `systemapply.go:1131`. |
| -- **The console is unguarded.** It runs `/opt/carlos/versions/<sha>/console` with no `90-host-floor.conf` or `91-claim-runtime.conf` in its drop-ins. It has `CONSOLE_HOME_REGION=ie` and no `CARLOS_CONSOLE_ID` (roll-v0.28.10.md F1, 2026-10-23). It rolls by `ship-app.sh` and promote (`flagship-roll-v0.28.16.md:604-607`). |
| -- **Never in scope.** The runbook names dev cohort 1 only. Memory (host-lifecycle-claim, 2026-10-19) says "FLAGSHIP boxes have the same layout: probe and remediate before any arming", and no arming happened. |
| - |
| -Two parity points to check read-only, because they are not claims: |
| - |
| -1. Whether flagship's bucket carries `deployment_box_records` (I3). That depends on the module tag `carloku-infrastructure` pins. |
| -2. Whether pointer digests are on for `bab` on flagship (R11). |
| + - Flagship rolls with a plain `carlos system update` |
| + (`flagship-roll-v0.28.16.md:252-264`), with no signing session and no |
| + identity. A floor would refuse a release without one |
| + (`hostactivation.go:84-87`). |
| + - Root's apply logs `no moves protocol floor is armed on this box` |
| + (`flagship-roll-v0.28.6.md:372`, `v0.28.7.md:471`, `v0.28.8.md:534`, |
| + `v0.28.9.md:618`; `systemapply.go:1131`). |
| +- **An unguarded console.** |
| + - It runs `/opt/carlos/versions/<sha>/console`, with no 90 or 91 drop-ins |
| + and no `CARLOS_CONSOLE_ID`, and it does have `CONSOLE_HOME_REGION=ie` |
| + (roll-v0.28.10.md F1). |
| + - It rolls by `ship-app.sh` and promote (`flagship-roll-v0.28.16.md:604-607`). |
| +- **No cohort.** The runbook names dev cohort 1 only. |
| + |
| +Two read-only parity checks remain, since neither is a claim: whether |
| +flagship's bucket has `deployment_box_records` (I3), which depends on the |
| +module tag `carloku-infrastructure` pins; and whether pointer digests are on |
| +for `bab` there (R11). |
| + |
| +## 5. Deferred: dev topology |
| + |
| +The controller ruled this out of the undo. These are dev's topology |
| +questions, not claim residue, and none of them blocks the goal. They are |
| +recorded here with Astra's evidence. Nothing in sections 1 to 3 changes |
| +them. |
| + |
| +- **Leo stays `CARLOS_POOLS=cohort1`** (the trial's step 4, with its backup |
| + `host.env.bak-pool-20261018`). Leo mints only cohort1-pool records |
| + (`internal/provision/reconcile.go:443, 2771-2775`) and serves only |
| + `claimtrial`. Its edges file says `serves_shared_pool=false`, which keeps |
| + it out of region candidates and out of offline moves |
| + (`apiinstancemove_offline.go:327-333`). That is also why dev's offline |
| + moves work today: ie has exactly one eligible box. |
| +- **Leo holds a stale wakecheck database** (Astra 1). Leo's wakecheck route |
| + was removed on 2026-10-18 and its local database left on disk (runbook, |
| + step 4 record). A claims-off wake trusts an existing local database as a |
| + warm cache and restores nothing newer (`internal/activator/backend_exec.go:784-796`), |
| + on a single-box assumption (`internal/activator/activator.go:2302`). Before |
| + leo ever serves the shared pool again, that database needs an |
| + authoritative copy chosen, a procedure that rules out alternating |
| + writers, and a content check rather than a 200. |
| +- **A pool restore can't simply be undone** (Astra 4). Once leo serves the |
| + shared pool, routes it mints fall out of scope if the pool is set back, |
| + and are then neither converged nor retired (`reconcile.go:1790-1796`). This |
| + is the #309 orphan problem again. Any future change must record leo's |
| + routes first, and define how they are stopped and retired before the |
| + config is reverted. |
| +- **Two eligible Irish boxes stop offline moves into Ireland** (Astra 3). The |
| + door needs exactly one box in the destination region and returns 409 |
| + otherwise (`apiinstancemove_offline.go:384-389`). Moves out can refuse when |
| + more than one source box holds local data (`:1031-1041`). Normal pools on |
| + both leo and sophie and working moves both ways can't hold together on dev |
| + today. One of these is needed first: a supported one-target-per-region |
| + arrangement, or reviewed multi-target support. The same limit applies to |
| + any flagship region with two shared-pool boxes. |
| +- **`claimtrial`** (account `bab`, pool `cohort1`) stays as it is. It is |
| + leo's only route and serves step 7's leo check. Deleting it belongs with |
| + the pool decision above. |
| + |
| +## Response to Astra r1 |
| + |
| +| # | Finding | Disposition | What changed, and why | |
| +|---|---|---|---| |
| +| 1 | P1: step 7 could revive leo's stale wakecheck database | **Deferred** (controller's scope ruling) | The pool restore is gone. Nothing in rev 2 makes leo eligible for the shared pool, so leo never wakes wakecheck, and the stale-database risk cannot arise. Astra's evidence and fix are recorded in section 5 as a precondition for any future pool change. | |
| +| 2 | P1: step 8 could update or roll back flagship | **Accepted, fixed** | Every console command now goes through `devcli … --console "$DEV"`, verification and rollback included (section 3 rules; `auth.go:252-290`). Step 0 prints the default console, proves `--console "$DEV"` resolves to dev, and checks `sts` is account `640012953448`, with a STOP otherwise. `ship-app.sh` was inspected: it is direct-bucket on its profile and bucket arguments, with eu-west-1 hard-coded, so it is run only with `kass` and the dev bucket. | |
| +| 3 | P2: normal pools stop offline moves into Ireland | **Deferred** (scope ruling) | Leo keeps `cohort1`, so ie keeps one eligible box and today's moves keep working. Step 7 now tests a move both ways on that topology, with a content check. The two-box limit is recorded in section 5 with Astra's citations. | |
| +| 4 | P2: the pool rollback leaves orphan routes | **Deferred** (scope ruling) | With no pool change there is nothing to roll back. Recorded in section 5 as a requirement for any future pool change. | |
| +| 5 | P2: unit checks that cannot pass; serving checks per box | **Accepted, fixed** | Steps 2 and 3 now compare each unit's `ExecStart`, `DropInPaths`, `Requires` and fragment sha256 with dennis's plain units. The template's conditional `guard-exec` branch is expected (`carlos-system-update.service:47`, `carlos-system-recover.service:41`), and its selector is proved inactive by file tests. Serving checks are now per box: leo is claimtrial through `--resolve`, sophie is wakecheck and the console, dennis is its own hosts or the listener. | |
| +| 6 | P2: a delayed floor refresh can re-arm after the delete | **Accepted, fixed** | Step 5 names the writers (the agent in `carlos-edge.service`; root's apply through `carlos-system-update.path`, `-update.service` and `-recover.service`) and stops them. It re-confirms R1 is absent, removes the files under `flock -n floor.lock`, then starts the writers again. Rollback uses the same exclusion. | |
| +| 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. | |