roll-fleet-alerts-1: host.env changes ride a roll, not a bare restart
A bare systemctl restart carlos-edge holds no requests: on flagship's console box (2026-11-01, 11:04:52-11:05:03Z) it stopped the instances and the console refused connections for about 11 s. The CARLOS_ALERT_ENGINE_BEAT step now adds the line just before a platform roll, or in an announced quiet window; both dev and flagship already have it. The witness section no longer calls its restarts the same as a roll's. Reported by platform-86.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+32
−13
docs/superpowers/notes/roll-fleet-alerts-1.md+32 −13
Intent
Human
Note from platform-86, for your Plan 2 branch: please also fix docs/superpowers/notes/roll-fleet-alerts-1.md. Its CARLOS_ALERT_ENGINE_BEAT section says to run 'systemctl restart carlos-edge'. On flagship's console box (2026-11-01, 11:04:52-11:05:03Z) that bare restart stopped the box's instances and the console refused connections for about 11 s, because unlike a platform roll's queued restart it holds no requests. Reword it: add the host.env line just before a roll, so it rides the roll's own restart, or do it in an announced quiet window. Your own roll notes must say the same for any host.env step. Both dev and flagship already have the line, so nothing is left to run.
diff --git a/docs/superpowers/notes/roll-fleet-alerts-1.md b/docs/superpowers/notes/roll-fleet-alerts-1.md| index 5ac97e0dc..6b6ce9c5c 100644 |
| --- a/docs/superpowers/notes/roll-fleet-alerts-1.md |
| +++ b/docs/superpowers/notes/roll-fleet-alerts-1.md |
| @@ -13,6 +13,15 @@ change real dev or flagship boxes, so each needs Paul's explicit go under |
| AGENTS.md "Production infrastructure needs scoped approval". One approval |
| covers one whole section, including cleanup. |
| +**A bare `systemctl restart carlos-edge` is not a roll's restart.** A |
| +platform roll queues requests through its restart, but a bare restart holds |
| +none. It stops the box's instances, and on a console box the console refuses |
| +connections until the agent is back. On flagship's console box (2026-11-01, |
| +11:04:52-11:05:03Z) that was about 11 seconds. So a `host.env` change goes |
| +in just before a platform roll of that box, and rides that roll's own |
| +restart. If it can't wait for a roll, do it in a quiet window announced |
| +beforehand. |
| + |
| ## What changes when it rolls |
| On the boxes (the `carlos` binary): |
| @@ -95,10 +104,14 @@ deployment's boxes before its console. |
| ## `CARLOS_ALERT_ENGINE_BEAT` on each console box |
| +**Done on dev and flagship (2026-11-01).** Both console boxes already have |
| +the line, so nothing is left to run there. The steps stay here for any |
| +other deployment. |
| + |
| Set `CARLOS_ALERT_ENGINE_BEAT=/data/console/alert-engine.beat` in |
| -`/etc/carlos/host.env` on the box that runs the console, and restart the |
| -agent. If the console unit sets `CONSOLE_DB`, use `alert-engine.beat` in that |
| -directory instead. Each deployment is its own go: |
| +`/etc/carlos/host.env` on the box that runs the console. The agent picks it |
| +up when it next restarts. If the console unit sets `CONSOLE_DB`, use |
| +`alert-engine.beat` in that directory instead. Each deployment is its own go: |
| - **Dev.** Account 640012953448, region eu-west-1, profile `kass` (works |
| with the sandbox on). Box carlos-dev-ie, i-05498eada6f0afd23, console |
| @@ -107,10 +120,12 @@ directory instead. Each deployment is its own go: |
| (an assumed role: run it with the sandbox off). Box i-092c0c1eea75723cb, |
| console console.carloku.com. |
| -Both are reached as root over SSM. The change on each is one `host.env` line |
| -and one restart of `carlos-edge`; there is no AWS resource change. |
| +Both are reached as root over SSM. The change on each is one `host.env` line, |
| +picked up by the next platform roll's restart of `carlos-edge`. There is no |
| +AWS resource change. |
| -Do it **after** the console has rolled and the beat file exists. An agent |
| +Add the line **after** the console has rolled and the beat file exists, and |
| +just before the next platform roll of that box. An agent |
| watching a beat that never appears fires `engine_silent` through the box's |
| own sinks 10 minutes after it starts, which on flagship is a real SNS email. |
| @@ -129,13 +144,15 @@ Then: |
| [ -z "$(tail -c1 /etc/carlos/host.env)" ] || printf '\n' >>/etc/carlos/host.env |
| printf '%s\n' 'CARLOS_ALERT_ENGINE_BEAT=/data/console/alert-engine.beat' >>/etc/carlos/host.env |
| tail -n 3 /etc/carlos/host.env |
| - systemctl restart carlos-edge |
| + |
| +Then roll the box as usual. Don't follow the edit with a bare |
| +`systemctl restart carlos-edge` (see the warning at the top). |
| The `tail -c1` line adds a newline first if the file does not end in one, so |
| the new line cannot fuse onto the last one. `tail -n 3` shows the result |
| -before the restart. |
| +before the roll. |
| -Use the same edge restart as a platform roll. Check that `carlos status |
| +After the roll, check that `carlos status |
| --live` shows `engine-beat=on` for the console box and that no new |
| `engine_silent` alert fires in the next 15 minutes. `engine-beat=off (agent |
| runs as root, so the backstop is off)` would mean the agent runs as root, |
| @@ -143,7 +160,7 @@ which no box does today. |
| Optionally, after this, point a box's `CARLOS_ALERT_WEBHOOK` at a Slack |
| incoming webhook so `disk` and `engine_silent` reach Slack too. That is one |
| -more `host.env` line and agent restart per box, and its own go. |
| +more `host.env` line per box, again added just before a roll, and its own go. |
| ## Other console deployments |
| @@ -200,9 +217,11 @@ engine's 5 minute group window and the clear. |
| - Messages: one Slack message to the dev connector on fire and one on |
| clear. Each operator's email connector on the dev console gets the same |
| two emails. |
| -- Traffic effects: two edge restarts on the witness box, each the same as a |
| - platform roll's. At the last check, the witness box carried the least |
| - traffic of the dev boxes, on the far side of the test app. |
| +- Traffic effects: two bare edge restarts on the witness box. Unlike a |
| + platform roll's restart, these hold no requests: each stops the box's |
| + instances for about 10 seconds. Announce both restarts beforehand and run |
| + them in a quiet window. At the last check, the witness box carried the |
| + least traffic of the dev boxes, on the far side of the test app. |
| - Cost: about 1.3 GB written to the box's EBS volume and deleted again, a |
| little CPU for `/dev/urandom`. No new bucket objects: the box's alert |
| object is written twice (fire, clear), as for any alert. |