docs: region HA runbook, group boxes rebuild host.env from SSM
Branch review round 2 P2-1: a carlos-edge restart does not read SSM again, so after updating the identity map's SSM parameter each group box's host.env must be rebuilt with carlos system host-env write (or the box replaced) before the restart. Adds the round 2 P3s to the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/region-ha-runbook.md+1 −1docs/superpowers/notes/region-ha-followups-p3.md+2 −0
CI passed — run details
Intent
<task-notification> <task-id>a9553afa820de5bfb</task-id> <tool-use-id>toolu_0169WvmRSghBWrnUSqMyw6mP</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/acef84d4-5254-488e-9bf2-166a4d113752/tasks/a9553afa820de5bfb.output</output-file> <status>completed</status> <summary>Agent "Opus whole-branch review" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Round 2 verdict: READY AFTER FIXES.** One P2 remains, in the runbook's step for updating group boxes. Findings are in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-followups/.superpowers/sdd/2026-11-03-region-ha-followups/branch-review-r2.md`. Round 1's file is `branch-review-r1.md` in the same directory. **Round-1 P1/P2 status:** - **P1-1, deleting the old box record:** resolved. Nothing is deleted under `control/boxes/` any more, and a recreated fixed box now takes a new reference. - **P2-1, the quoting sentence:** resolved. It now matches the systemd man page. - **P2-2, the SSM grant:** resolved. The text names the explicit Deny, recommends an operator credential, and otherwise says to widen `ssm_parameter_arn` or turn `scope_ssm_parameter_reads` off. - **P2-3, group boxes and SSM:** partly resolved. The SSM parameter is named now, but see the new P2. **Your three questions, checked against the code:** - **Does the old departure finish once its edges file is deleted, with its entry still in the map?** Yes. The finishing code decides "fixed" from the reference and instance ID, not from the map (`hadepartures_scan.go:425`). A missing file then lets the departure complete. The evidence check reads only the local identity history. - **Is removing the entry afterwards safe?** Yes. The old binding stays in the local history, and the checks that matter never read the map. The identity walk skips a reference that is already bound. On a box that never bound it, the walk blocks only the old instance ID. - **Is any new step impossible under the bucket or IAM policies?** No. No step touches the protected record prefixes. Deleting `control/edges/...` with an operator credential is allowed. The new box publishes its record under a new key in the normal way. **New P2:** step 3 (and step 5) tells the operator to update the SSM parameter and then restart `carlos-edge.service`. On a group box a restart does not re-read SSM: host.env is rebuilt only by `carlos system host-env write`, which runs as root and is never invoked on restart. Those boxes keep the stale map. They can't verify the new fixed box, and when that box is later terminated they page `ha_departure_pending` until they are rebuilt. Fix: rerun `host-env write` on group boxes (or replace them) before the restart. **P3s:** - **P3-1:** Records of departed fixed references now pile up for good. Boxes that never bound one re-read it on each identity walk, with a backoff of up to 300 s. - **P3-2:** The SSM scope sentence is still unqualified ("only `/carlos/*` in its own region" depends on `ssm_parameter_arn`). The role-level route also doesn't mention KMS decrypt for a parameter encrypted in another region. - **P3-3:** I didn't verify the P3 list's claim about what Ruling P17 assumed. Confirm that wording before filing the list. I only ran checks; no tracked files were edited.</result> <usage><subagent_tokens>172568</subagent_tokens><tool_uses>3</tool_uses><duration_ms>74505</duration_ms></usage> </task-notification>
Attributed to this commit: 13.5 g CO₂e (1,701,038 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-followups, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/region-ha-runbook.md b/docs/region-ha-runbook.md| index 7b6148d4c..5c0190a54 100644 |
| --- a/docs/region-ha-runbook.md |
| +++ b/docs/region-ha-runbook.md |
| @@ -42,7 +42,7 @@ Give a recreated fixed box a new reference instead. Do these steps in order: |
| 1. Check that the old box's termination has been seen. A surviving box logs the departure for the old instance ID. |
| 2. Create the new box under a new reference. |
| -3. Add the new reference and its instance ID to `CARLOS_HA_FIXED_BOX_IDENTITIES`. Keep the old box's entry until its departure has finished. Update the value on every fixed box in the region, and in the region's SSM parameter if group boxes read it from there. Restart `carlos-edge.service` on one box at a time. |
| +3. Add the new reference and its instance ID to `CARLOS_HA_FIXED_BOX_IDENTITIES`. Keep the old box's entry until its departure has finished. Update the value on every fixed box in the region. If group boxes read it from the region's SSM parameter, update the parameter too, then rebuild each group box's host.env with `carlos system host-env write` (as root) or replace the box. A restart alone does not read SSM again. Restart `carlos-edge.service` on one box at a time. |
| 4. Remove the old box's edges file (previous section). The old departure then finishes and stops paging. |
| 5. Once the departure has finished, remove the old box's entry from `CARLOS_HA_FIXED_BOX_IDENTITIES` the same way. The old box record stays in the bucket. It grants nothing. |
diff --git a/docs/superpowers/notes/region-ha-followups-p3.md b/docs/superpowers/notes/region-ha-followups-p3.md| index 9f8d49119..7bcc5766c 100644 |
| --- a/docs/superpowers/notes/region-ha-followups-p3.md |
| +++ b/docs/superpowers/notes/region-ha-followups-p3.md |
| @@ -17,3 +17,5 @@ From the per-task and branch reviews of branch region-ha-followups (2026-11-03/0 |
| - Branch r1 P3-4: the runbook should quote the exact `publish-record` command and name the departure log line an operator searches for. |
| - Branch r1 P3-5: the permission notice says "read and delete edges files"; the same fault also comes from opening the bucket and indexing the deletion. |
| - Branch r1 P1-1 (fixed as docs): Ruling P17 assumed an operator could replace `control/boxes/<ref>.json`; the bucket policy `BoxRecordsAreNeverDeleted` forbids it. The runbook now says a recreated fixed box takes a new reference. If reusing a reference is ever needed, it needs a ruling to lift that policy statement. |
| +- Branch r2 P3-1: records of departed fixed references stay in the bucket for good; boxes that never bound one re-read it on each identity walk (backoff up to 300 s). |
| +- Branch r2 P3-2: the runbook's SSM scope sentence depends on `ssm_parameter_arn`; the role-level copy route does not mention KMS decrypt for a parameter encrypted in another region. |