carlos / platform Public

Plan 1 rev 3 after Astra R2; Paul's rulings on the two repeated fault families; R3 brief

Astra R2 NOT READY (3 P1, 5 P2), findings committed unedited. Paul
2026-10-31: refuse the engine_silent backstop for root-run agents; a
git-grep guard plus go vet for the watcher removal. Other findings
accepted: never-written beat grace, exact request multiset, durable
one-off details, transactional per-recipient cutover, confirmation for
every connector kind, full webhook content.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a5504c1c9c86694a940e022704a7882de6daf725 parent 5e17b11
4 files changed, +295 −28
  • docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md +72 −27
  • docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R2.md +106 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan-R3.md +113 −0
  • docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md +4 −1

CI failed — run details

diff --git a/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md b/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md
index 1e24d530e..2b8f85569 100644
--- a/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md
+++ b/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md
@@ -1,4 +1,4 @@
-# Fleet alerts Plan 1: engine, connectors, fleet rules — Implementation Plan (rev 2)
+# Fleet alerts Plan 1: engine, connectors, fleet rules — Implementation Plan (rev 3)
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
@@ -14,7 +14,7 @@
**Spec:** `docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md` (APPROVED 2026-10-30, amended after plan review R1). Read §2, §5, §6, §7.1, §7.2, §8, §9, §11.1 and §13 before any task.
-**Review history:** Astra R1 on 84997183 was NOT READY, with 14 P1s and 6 P2s: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R1.md`. Each finding's disposition is at the end of this plan. This is rev 2, for round 2 of 3.
+**Review history:** Astra R1 on 84997183 was NOT READY, with 14 P1s and 6 P2s: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R1.md`. Astra R2 on 5e17b11a was NOT READY, with 3 P1s and 5 P2s: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R2.md`. Stopping rule 2 fired on two fault families (root traversal, buildable integration), and Paul chose the approach for both on 2026-10-31. Each finding's disposition is at the end of this plan. This is rev 3, for round 3 of 3, the last.
## Global Constraints
@@ -173,16 +173,21 @@
- `func alerting.IsSlackWebhook(u string) bool`
- `func alerting.SlackBody(subject, body string) []byte`, giving `{"text":"*<subject>*\n<body>"}`
- `func (d *status.AlertDelivery) NotDelivered() bool`, which equals `alertsWord`'s test
- - `func engineBeatAge(path string, now time.Time) (age time.Duration, ok bool)`
- - opens with `rootstate.OpenTrustedFileFrom(filepath.Dir(path), path)` (regular file, one link, owned by the directory's owner, no group or other write) and reads the mtime with `Fstat` on that descriptor
- - `ok = false` when the file is missing, untrusted, not regular, or has an mtime in the future
- - on non-linux it always returns `ok = false`
+ - **Root mode is refused up front** (Paul's ruling 2026-10-31, after R2 #1):
+ - `func engineBeatArmed(getenv func(string) string, euid int) (path string, armed bool, why string)`
+ - when `euid == 0` it returns `armed = false` with why `"agent runs as root"` before any path lookup
+ - the status line and `carlos status --live` show `engine-beat=off (agent runs as root)`
+ - a root-run agent never opens, stats or resolves the path
+ - `type beatState int`, with the values `beatFresh`, `beatStale`, `beatMissing`, `beatNotRegular` and `beatFuture`
+ - `func readEngineBeat(path string, now time.Time) (beatState, time.Duration)`
+ - non-root only: `os.Lstat`, so a symlink reads as `beatNotRegular`
+ - stale means over 10 min old
- Box rule `"engine_silent"`, level incident:
- - armed only when `CARLOS_ALERT_ENGINE_BEAT` is set
- - fires when `ok` and age > 10 min
- - also fires when the file is missing for 10 consecutive minutes after it was once seen
- - an untrusted file logs once and holds the rule's state
- - clears when fresh
+ - armed when `engineBeatArmed` says so; the arming time is the agent's start
+ - fires on `beatStale`
+ - fires on `beatMissing`, `beatNotRegular` or `beatFuture` once the armed agent has run 10 minutes without a fresh read, whether or not a beat was ever seen (R2 #3)
+ - an agent restart restarts that 10-minute grace
+ - clears on `beatFresh`
- [ ] **Step 1: Write failing tests.**
- `TestPageSlackBody`
@@ -190,13 +195,16 @@
- `TestBoxDeliverSlackBody`
- `TestPostJSONRefusesRedirect`
- `TestAlertDeliveryNotDelivered`
- - `TestEngineBeatAgeSymlinkRefused` (linux): the beat is a symlink to a fresh root file, so `ok` is false.
- - `TestEngineBeatAgeFutureMtime`
+ - `TestEngineBeatRootRefusedBeforeLookup`: with `euid = 0`, a stat hook counts zero calls and the rule is absent.
+ - `TestReadEngineBeatSymlinkNotRegular`
+ - `TestReadEngineBeatFutureMtime`
+ - `TestEngineSilentNeverCreatedBeatFires`: armed, the file never exists, and the rule fires at 10 min.
+ - `TestEngineSilentRestartWhileMissing`: fires again 10 min after the restart.
- `TestEngineSilentFiresThroughAlertTick`: an 11-min-old beat fires and reaches the sink. A fresh beat clears. With the env unset the rule is absent.
- [ ] **Step 2: Run them, expect FAIL.**
- [ ] **Step 3: Implement** to the interfaces above. `PostJSON` sets `CheckRedirect` to return `http.ErrUseLastResponse`.
- [ ] **Step 4: Run them, expect PASS.**
-- [ ] **Step 5: Census and commit.** Run `make census-card` and save the output to `docs/superpowers/notes/census-card-fleet-alerts-1.txt`. The `engine_silent` read goes through `rootstate.OpenTrustedFileFrom`. Then `git commit -m "alerting: Slack body, no redirects; host: anchored engine_silent backstop"`.
+- [ ] **Step 5: Census and commit.** Run `make census-card` and save the output to `docs/superpowers/notes/census-card-fleet-alerts-1.txt`. The card should show no new root read, because root mode is refused before any lookup. Then `git commit -m "alerting: Slack body, no redirects; host: engine_silent backstop, refused for root agents"`.
### Task 4: Alert store: tables, transactional step, seal
@@ -220,13 +228,22 @@
- `alert_tokens`: `hash PK, action, scope, connector_id NULL, rule NULL, subject NULL, expires_at NULL, used_at NULL`. The action is `confirm`, `unsubscribe` or `snooze`.
- `alert_snoozes`: `scope, rule, subject, until, PK(...)`
- `alert_oneoffs`: `id PK, scope, rule, subject, level, title, body, quiet_secs, at`. Rows are durable from `raise` until a step consumes them.
+ - `alert_incidents` also carries `details TEXT` (JSON `[]{subject, title, body, at}`, at most 20 entries). A one-off's title and body move here in the same transaction that consumes the row, so the delayed first message still has them (R2 #5).
+ - `alert_meta`: `k TEXT PK, v TEXT`. Holds `cutover_done`.
- Produces:
- `type alertConnector struct{ ID int64; Scope, Kind, Name, TargetHint, OwnerAddress string; Confirmed, Suspended, NeedsReentry bool; FailingSince time.Time }`
- `type alertRuleSetting struct{ Enabled bool; Threshold *float64; ConnectorIDs []int64 }`
- `type alertIncident struct{ ID int64; Scope, Rule, Level string; OpenedAt, NotifyAt, LastSeenAt, ClosedAt time.Time; CloseReason string; Members []string; Flapping, OneOff, Notified bool; Quiet time.Duration; LastReminderAt, LastUpdateAt time.Time }`
- `type alertOutboxRow struct{ ID int64; DeliveryID string; IncidentID, ConnectorID int64; Kind string; Body []byte; Attempts int; NextAt time.Time }`
- `func (s *Store) CommitAlertStep(changed []alertIncident, fires []alertFire, outbox []alertOutboxRow, consumedOneOffs []int64) error`, one transaction
- - `func (s *Store) AlertStepInputs(now time.Time) (open []alertIncident, recentFires map[alertKey][]time.Time, oneOffs []alertOneOff, err error)`
+ - These value types are defined here in `alertstore.go`, and Tasks 7 and 8 use them:
+ - `type alertKey struct{ Scope, Rule, Subject string }`
+ - `type alertFire struct{ Key alertKey; At time.Time }`
+ - `type alertOneOff struct{ Key alertKey; Level, Title, Body string; Quiet time.Duration }`
+ - `type alertOneOffRow struct{ ID int64; At time.Time; alertOneOff }`
+ - `func (s *Store) AlertStepInputs(now time.Time) (open []alertIncident, recentFires map[alertKey][]time.Time, oneOffs []alertOneOffRow, err error)`
+ - `alertIncident` gains `Details []alertDetail`, where `type alertDetail struct{ Subject, Title, Body string; At time.Time }`
+ - `func (s *Store) AlertCutover(f func(tx *sql.Tx) error) (ran bool, err error)` runs `f` and sets `cutover_done` in one transaction, only when the marker is absent
- `DueOutbox(now time.Time, limit int) ([]alertOutboxRow, error)`
- `FinishOutbox(id int64, cat string, ok bool, now time.Time) error`, with backoff 1m·2^attempts capped at 12 h
- Connector accessors:
@@ -320,11 +337,11 @@
- Produces:
- `type alertNote struct{ Scope, Rule, Level, Kind, Subject, What, HowLong, WhatToDo, IncidentURL, SnoozeURL, UnsubscribeURL string; Members []string; At time.Time; DeliveryID string }`. It is named to avoid the existing `func alertMessage`.
- `func renderSlack(n alertNote) []byte` gives `{"text", "blocks"}`
- - `func renderWebhook(n alertNote) []byte` gives `{"v":1,"delivery_id","scope","rule","level","kind","subject","members","at","incident_url"}`
+ - `func renderWebhook(n alertNote) []byte` gives `{"v":1,"delivery_id","scope","rule","level","kind","subject","members","what","how_long","what_to_do","at","incident_url","snooze_url"}` (R2 #8)
- `func renderEmail(n alertNote) (subject, body string)`, whose body always ends with the unsubscribe link
- `func (s *Server) alertDrainOutbox(ctx context.Context) error`, at most 50 rows a pass. Before each send it checks:
- the connector is not deleted, suspended or `needs_reentry`
- - email is confirmed (confirmation rows are exempt)
+ - the connector is confirmed, whatever its kind (R2 #7). Only outbox rows of kind `verify` (the email confirm link, the Slack test with its link, the signed webhook test) go to an unconfirmed connector. Rule subscriptions may name unconfirmed connectors, but nothing ordinary reaches them until they are confirmed.
- a connector with `OwnerAddress` is still an operator (`s.store.IsOperator`). If not, the row and the connector are deleted (Review Focus 4).
- Delivery:
- email goes through `s.deliver(ctx, addr, subject, body, 12*time.Second)`
@@ -346,6 +363,8 @@
- `TestDrainSkipsNeedsReentry`
- `TestDrainSkipsRevokedOperatorQueued`: queue a row, revoke the operator, drain. There is no send, and the row and connector are gone.
- `TestDrainUnconfirmedEmailGetsNothing`
+ - `TestDrainUnconfirmedSlackSubscribedGetsNothing`: an explicit subscription and a queued retry both stay unsent until confirmed. A `verify` row is sent.
+ - `TestRenderWebhookCarriesContent`: a signed delivery carries `what`, `how_long`, `what_to_do` and a `snooze_url` whose token is bound to the incident's key.
- `TestTestSendRefusedForUnconfirmedEmail`
- `TestTestSendRateLimited`: the 11th in an hour is refused.
- `TestDrainErrorStoredHasNoSecret`: the `err_category` column and the captured log hold no `sekrit-XYZ`.
@@ -361,9 +380,9 @@
**Interfaces:**
- Produces:
- - `type alertKey struct{ Scope, Rule, Subject string }`
+ - Uses `alertKey`, `alertFire` and `alertOneOffRow` from Task 4.
- `type alertSignal struct{ Key alertKey; Level string; Firing, OneOff bool; Quiet time.Duration; Value float64; At time.Time; Gone bool }`. `Gone` means the source vanished, which closes the incident with `close_reason "box gone"`.
- - `type alertFire struct{ Key alertKey; At time.Time }`
+ - One-off rows enter the step as signals. Their title and body are appended to the incident's `Details`.
- `type alertEmit struct{ Incident alertIncident; Kind string }`. `Kind` is `fire`, `clear`, `update` or `reminder`.
- `func stepIncidents(open []alertIncident, recentFires map[alertKey][]time.Time, signals []alertSignal, snoozed func(alertKey) bool, now time.Time) (changed []alertIncident, fires []alertFire, emits []alertEmit)`, implementing spec §6:
- **Grouping:** signals with the same (scope, rule) that fire before an open incident's `NotifyAt` join its members.
@@ -398,14 +417,16 @@
- `internal/console/alertwatch.go`: delete `StartAlertWatcher` and `alertPass`. Keep `alertRecipients`, `grantRecipients`, `alertDue`, `recordAlertSeen`, `alertMessage` and `alertValueText`, which are used by `claim_runtime.go:328`, `storenotify.go:64` and the engine's message text.
- `alertwatch_test.go`: delete the `alertPass` tests. Their behaviours (recipient set, unmailable operator, fire and clear text) move to `alertengine_pass_test.go`.
- `alertnow_test.go`: drive `alertEnginePass` instead of `alertPass` (:64 and others).
+ - `opdashboard_test.go:147` and `jobs_test.go:188`: drive `alertEnginePass`.
+ - **Guard** (Paul's ruling 2026-10-31, after R2 #2): the step 4 check below must return nothing. The list above is the starting point, not the definition of done.
- Registries:
- `claim_workers.go:5-43`
- - `cmd/console/main.go:678`: start `StartAlertEngine` only when `!cfg.HostClaim`
+ - `cmd/console/main.go:678`: start `StartAlertEngine` as the watcher was. The refusal lives in the worker itself: on `s.cfg.HostClaim` it records job status `"refused: host-claim console"` and returns before any read or write.
- `jobs.go:278` (`"StartAlertEngine": "Alert engine"`)
- `jobs_test.go:35`
- `testdata/claim-routes.txt`
- `claim_invariant_fixtures_test.go:2174`
- - `claim_invariant_probes_worker_test.go:104-125`: the effect is now one `alert_incidents` row in place of the `alert_seen` assertion at :121
+ - `claim_invariant_probes_worker_test.go:104-125`: its world is HostClaim (`claim_invariant_world_test.go:521`), so the probe asserts the refusal: the job status says so, and the worker made no store calls and wrote no `alert_*` rows. This replaces the `alert_seen` assertion at :121. Successful incident creation is tested in a non-HostClaim fixture in `alertengine_pass_test.go`.
- One-off callers:
- `nocapacity.go:59,133`: rule `no_room`, subject the region, quiet 2 h
- `egressfleet.go:161,451`: `egress_conflict`, subject the box
@@ -420,7 +441,6 @@
**Interfaces:**
- Consumes: Tasks 3, 4, 6, 7; `release.ConditionalGetter.GetIfChanged` (`internal/release/store.go:221`), with the `condGet` pattern from `internal/provision/recordview.go:387`
- Produces:
- - `type alertOneOff struct{ Key alertKey; Level, Title, Body string; Quiet time.Duration }`
- `func (s *Server) raise(ctx context.Context, o alertOneOff) error`
- persists with `RaiseOneOff` before returning
- also calls `alerting.Page(ctx, o.Level, o.Title, o.Body)` for the HostClaim backstop, unchanged
@@ -434,7 +454,10 @@
1. **First run only:**
- Open the seal. On error, report it in job status, raise `seal_key` (incident) and treat sealed connectors as unusable. On a created key while sealed rows exist, call `MarkSealedConnectorsNeedReentry` and raise `seal_key`.
- Seed each operator a personal email connector (`owner_address` = their address, confirmed), idempotently.
- - **Cutover:** for each currently firing box rule where `alert_seen` shows `firing = 1` for every operator, open the incident with `Notified = true`, so no repeat fire is sent and the clear still is.
+ - **Cutover** (R2 #6) is a one-time migration inside `AlertCutover`, so it runs once in one transaction and never again after a restart. It reads the box alert state from step 2 and `alert_seen` per (box, rule, operator):
+ - **Firing now:** open the incident with `Notified = true`. For each operator whose `alert_seen` is not `firing = 1`, queue a `fire` outbox row to that operator's seeded connector only.
+ - **Not firing now, but some operator has `alert_seen` `firing = 1`:** a clear is owed. Queue a `clear` row to each such operator's seeded connector, and open no incident.
+ - Seeding happens in the same transaction, before these rows.
2. **Box signals:** LIST `alerts/boxes/`, then `reads.get` for each key. A key that disappears gives `Gone` signals for that box's open incidents.
3. **Every 5th pass, heartbeat signals** from `reads.boxes`:
- `box_silent` (incident) for any box whose heartbeat is older than 15 min. Membership is every box with a `status/boxes/` object, so a box that never fired is included (Review Focus 3).
@@ -466,7 +489,15 @@
- [ ] **Step 1: Write failing tests.**
- `TestEnginePassFiresSlackForDiskETA`: s3fake plus a TLS `httptest` server, with a client built with a loopback-permitting `refused`. The first pass sends nothing. The pass at minute 5 sends one POST.
- - `TestEnginePassFiveCycleRequests`: a recording `release.Store` wrapper logs method, key and whether the GET was conditional. Over 5 idle passes after a warm-up, every GET is conditional. The LISTs are 5× `alerts/boxes/` and 1× `status/boxes/`. There is one GET of `status/fleet.json`, conditional.
+ - `TestEnginePassFiveCycleRequests` (R2 #4): fixture with A = 3 alert objects and B = 4 heartbeat objects. A recording `release.Store` wrapper logs method, key and whether each GET was conditional. Over 5 idle passes after a warm-up, the exact request multiset is:
+ - LISTs: 5× `alerts/boxes/`, 1× `status/boxes/`
+ - GETs: 5A = 15 alert GETs, B = 4 heartbeat GETs, 1 `status/fleet.json` GET
+ - every GET is conditional
+ - no other request
+ - `TestEnginePassCutoverMixedRecipients`: operator 1 was told the fire and operator 2 wasn't. Only operator 2 gets a fire.
+ - `TestEnginePassCutoverPendingClear`: the rule has stopped firing and one operator was told the fire. That operator gets one clear.
+ - `TestEnginePassCutoverSecondStartNoop`
+ - `TestEnginePassOneOffDetailsSurviveRestart`: raise an egress one-off, step (consumed), restart before `notify_at`. The first message carries the account, app and address from the details.
- `TestEnginePassNeverAlertedBoxGoesSilent` (Review Focus 3)
- `TestEnginePassBoxGoneCloses`
- `TestEnginePassSeedsOperatorEmailOnce`
@@ -475,14 +506,15 @@
- `TestEnginePassSealKeyUnreadable` (Review Focus 5): connectors are skipped, a `seal_key` incident is emailed, and email connectors still deliver.
- `TestRaiseOneOffDurable`
- `TestRaiseNoRoomQuietCloses2h`
- - `TestEngineNotStartedInHostClaim`
+ - `TestEngineRefusesInHostClaim`: the job status says it refused, with zero store calls and no `alert_*` writes.
- `TestEnginePassFeedsAlertsNow`
- `TestEnginePassWritesBeat`
- Registry tests (`TestClaimConsoleRouteCensus`, the jobs and probe tests) fail until they are renamed.
- [ ] **Step 2: Run them, expect FAIL.** Run `go test ./internal/console -run 'EnginePass|RaiseOneOff|RaiseNoRoom|EngineNotStarted|ClaimConsoleRouteCensus|Jobs|NoCapacity|Egress|Lifetimes|MovesRecovery|ClaimLoss|HostsUsed' -count=1`.
- [ ] **Step 3: Implement.**
-- [ ] **Step 4: Run them, expect PASS.** Also run `go test ./internal/console -run 'Alert|Dashboard|Claim|StoreNotify' -count=1`.
-- [ ] **Step 5: Commit.** `git commit -m "console: alert engine replaces the alert watcher"`
+- [ ] **Step 4: Run them, expect PASS.** Also run `go test ./internal/console -run 'Alert|Dashboard|Claim|StoreNotify|Jobs' -count=1` and `go vet ./internal/console ./cmd/console`, which compiles every test file in the package.
+- [ ] **Step 5: Guard.** Run `git grep -n -E '\balertPass\b|StartAlertWatcher' -- internal cmd`. Expected: no output. Any hit is a caller to migrate before commit.
+- [ ] **Step 6: Commit.** `git commit -m "console: alert engine replaces the alert watcher"`
### Task 9: Copy deck
@@ -603,3 +635,16 @@
| 18 | P2 | Accepted. Typed `alertOneOff` with rule and subject at every call site, persisted before return, with no global server binding (Task 8). |
| 19 | P2 | Accepted. Unreadable or new key paths raise `seal_key`, email still works, and `alert_seen` is imported at cutover (Task 8). |
| 20 | P2 | Accepted. The live witness has controlled growth, real timings and Paul's go. Commit before push (Task 11). |
+
+## R2 dispositions (Astra, `CODEX-FINDINGS-fleet-alerts-1-plan-R2.md`)
+
+| # | Sev | Disposition |
+|---|---|---|
+| 1 | P1 | Paul's ruling (2026-10-31): refuse in root mode. `engineBeatArmed` returns unarmed when `euid == 0`, before any path lookup, and the status line says why. Non-root agents use `os.Lstat`. There is no root read and no rootstate dependency (Task 3). |
+| 2 | P1 | Paul's ruling (2026-10-31): a guard check. Task 8 Step 5's `git grep` must be empty, `go vet` compiles every test file, `opdashboard_test.go:147` and `jobs_test.go:188` are named, and the HostClaim probe asserts the refusal. Incident creation is tested without HostClaim. |
+| 3 | P1 | Accepted. A grace period starts at arming, whether or not a beat was ever seen. `beatState` distinguishes the five states. Tests cover a never-created beat and a restart while missing (Task 3). |
+| 4 | P2 | Accepted. The test asserts the exact request multiset over 5 passes (Task 8). |
+| 5 | P2 | Accepted. `alertOneOffRow` carries the ID and time. Details move to `alert_incidents.details` in the consuming transaction. There's a restart test (Tasks 4, 8). |
+| 6 | P2 | Accepted. A one-time transactional cutover (`AlertCutover`, marker `cutover_done`) with per-recipient fire and clear rows. Tests cover mixed recipients, a pending clear and a second start (Tasks 4, 8). |
+| 7 | P2 | Accepted. The drain requires confirmation for every kind, and only `verify` rows are exempt (Task 6). |
+| 8 | P2 | Accepted. The webhook body carries what, how long, what to do and a snooze URL, with a signed-delivery test (Task 6). |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R2.md
new file mode 100644
index 000000000..549db5f4d
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R2.md
@@ -0,0 +1,106 @@
+- R1 #1, P1 — **Resolved:** proxy disabled; send-time URL validation and address normalization specified.
+- R1 #2, P1 — **Resolved:** URL-free errors at the HTTP boundary, with storage/log witnesses.
+- R1 #3, P1 — **Partly resolved:** final-component symlinks refused; the root trust boundary remains unsafe.
+- R1 #4, P1 — **Resolved:** seeded recipients’ operator status is checked before queued sends.
+- R1 #5, P1 — **Resolved:** unconfirmed email test sends are refused.
+- R1 #6, P1 — **Resolved:** atomic incident/outbox commit and explicit at-least-once delivery.
+- R1 #7, P1 — **Resolved by cut:** HostClaim deployments are excluded.
+- R1 #8, P1 — **Resolved:** no-growth and insufficient-data verdicts are distinct.
+- R1 #9, P1 — **Resolved:** flap history survives incident closure.
+- R1 #10, P1 — **Resolved:** the first notification waits five minutes.
+- R1 #11, P1 — **Resolved:** membership comes from heartbeat objects.
+- R1 #12, P1 — **Resolved by cut:** box thresholds remain read-only.
+- R1 #13, P1 — **Partly resolved:** watcher removal still leaves incompatible consumers and tests.
+- R1 #14, P1 — **Resolved:** the record-write census selects the new inventory.
+- R1 #15, P2 — **Partly resolved:** conditional reads are covered; their complete request count is not.
+- R1 #16, P2 — **Resolved:** token action, target, expiry and replay rules are specified.
+- R1 #17, P2 — **Resolved:** Slack has a confirmation-link completion step.
+- R1 #18, P2 — **Partly resolved:** durable one-off records lose required identity and message data downstream.
+- R1 #19, P2 — **Partly resolved:** key-loss handling is covered; cutover preserves only the all-recipients-notified case.
+- R1 #20, P2 — **Resolved:** controlled growth, warm-up, scoped approval and commit-before-push are specified.
+
+Reviewed `5e17b11ab7163e18dd4ef64dc21caace964c5f3d` against `c24e7a04`. No files changed; no tests run. **Plan** below means [the revised implementation plan](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md); **Spec** means [the approved design](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md).
+
+1. **P1 — Task 3: the heartbeat read still crosses the root trust boundary.** Carries R1 #3.
+
+ **Evidence:** Plan:177 anchors `OpenTrustedFileFrom` at `filepath.Dir(path)`. [file_linux.go:48](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/rootstate/file_linux.go:48) opens that anchor by pathname: `O_NOFOLLOW` protects its final component, not preceding components. Lines 54–61 derive trust from whichever owner that open finds. Root-run agents remain supported at [agent.go:2516](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/host/agent.go:2516). [AGENTS.md:359](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/AGENTS.md:359) also rejects new root opens through agent-writable inputs.
+
+ **Failure:** A symlink above the selected anchor is followed. Even without a symlink, the proposed root path accepts a regular file written by the console user; calling it “trusted” does not satisfy the census rule.
+
+ **Fix:** Prefer refusing this backstop in root mode before any path lookup, with an operator-visible explanation. If root-mode coverage is required, choose an explicit privilege boundary before implementation. Test ancestor substitution as well as the final-file symlink.
+
+ **Fault family:** Root filesystem traversal.
+
+2. **P1 — Task 8: watcher removal still leaves compilation failures and a contradictory claim probe.** Carries R1 #13.
+
+ **Evidence:** Plan:398–408 removes `alertPass` and enumerates migrations, but [opdashboard_test.go:147](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/opdashboard_test.go:147) still calls it. [jobs_test.go:188](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/jobs_test.go:188) also needs migration beyond the named registry entry. Separately, Plan:408 requires an incident row from the claim-worker probe, whose fixture sets `HostClaim: true` at [claim_invariant_world_test.go:521](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/claim_invariant_world_test.go:521).
+
+ **Failure:** The prescribed removal leaves the console tests uncompilable. Enforcing the accepted HostClaim cut also makes the prescribed incident-row probe fail.
+
+ **Fix:** Include every remaining caller in the migration. Change the HostClaim probe to assert refusal, explanatory status and zero engine effects; test successful incident creation in a non-HostClaim fixture.
+
+ **Fault family:** Buildable task integration.
+
+3. **P1 — Task 3: an engine that never writes its first heartbeat is never reported.** New.
+
+ **Evidence:** Plan:181–184 fires for a missing file only “after it was once seen.” Plan:448 writes the file only at the end of an engine pass. Spec:434–436 requires paging when the engine has not written its heartbeat for ten minutes.
+
+ **Failure:** Enable the backstop on a fresh installation or replica-only restore, then let the engine fail before completing its first pass. The beat remains absent forever, and `engine_silent` never fires.
+
+ **Fix:** Start a bounded grace period when the configured backstop is armed, independent of whether a beat was previously observed. Return distinguishable missing/untrusted/future/fresh states instead of only `ok`, and test a never-created beat and an agent restart while it remains absent.
+
+ **Fault family:** Backstop liveness.
+
+4. **P2 — Task 8: the request-budget witness does not bound all GET counts.** Carries R1 #15.
+
+ **Evidence:** Plan:469 specifies conditional headers, exact LIST counts and one fleet-summary GET. It does not assert the number of alert-object or heartbeat GETs. Plan:52 and Spec:455–462 constrain request volume, not only response-body reuse.
+
+ **Failure:** Fetching every alert or heartbeat twice still satisfies the listed assertions if both requests are conditional.
+
+ **Fix:** For a fixed fixture with A alert objects and B heartbeat objects, assert the complete five-pass request multiset: `5A` alert GETs, `B` heartbeat GETs, one summary GET and the stated LISTs. Reject additional requests.
+
+ **Fault family:** Store-request accounting.
+
+5. **P2 — Tasks 4, 7 and 8: one-off consumption loses data needed for delayed notification.** Carries R1 #18.
+
+ **Evidence:** Plan:222 stores one-off `id`, `at`, `title` and `body`. `AlertStepInputs` returns `[]alertOneOff` at Plan:229, but that type at Plan:423 contains neither ID nor timestamp. `CommitAlertStep` requires consumed IDs at Plan:228. The signal and incident types at Plan:365 and Plan:226 also provide no durable home for the title/body while the first message waits five minutes.
+
+ **Failure:** The caller cannot identify returned rows for consumption through the specified interface. Consuming them before the grouping deadline also discards details such as the account, app and conflicting address from an egress alert; those details exist in [egressfleet.go:448](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/egressfleet.go:448).
+
+ **Fix:** Return stored one-off records with their IDs and timestamps. Preserve their notification details transactionally until the initial outbox message is created. Test a restart between consumption and the grouping deadline.
+
+ **Fault family:** Durable signal identity.
+
+6. **P2 — Task 8: cutover collapses per-recipient history into one bit.** Carries R1 #19.
+
+ **Evidence:** Plan:437 imports only currently firing rules already reported to every operator. The existing watcher deliberately records delivery separately per recipient at [alertwatch.go:215](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/alertwatch.go:215). Plan:434 describes first-run initialization without a durable cutover-completed marker.
+
+ **Failure:** If one operator received the fire and another did not, cutover sends another fire to both. A clear pending at cutover is omitted because the rule is no longer firing. Reapplying old `alert_seen` state after a later restart can also suppress a new episode.
+
+ **Fix:** Make cutover a durable, transactional, one-time migration. Preserve outstanding fire and clear deliveries per recipient, including mixed-success histories. Add those cases and a second-start witness.
+
+ **Fault family:** Restore and rollout continuity.
+
+7. **P2 — Tasks 6 and 8: confirmation is not enforced for explicitly subscribed Slack/webhook connectors.** New.
+
+ **Evidence:** Plan:325–328 requires the drain to check confirmation only for email. Plan:445 restricts the fallback connector list to confirmed connectors, but states no equivalent restriction on explicit rule subscriptions. Spec:149–154 requires verification before first use.
+
+ **Failure:** A Slack connector awaiting its confirmation click can be explicitly subscribed and receive ordinary incidents. The same gap permits an unverified webhook subscription.
+
+ **Fix:** Require confirmation for ordinary deliveries of every connector kind at the shared drain boundary. Allow only the narrowly defined verification messages before confirmation. Test explicit subscriptions and queued retries.
+
+ **Fault family:** Connector verification lifecycle.
+
+8. **P2 — Task 6: the webhook payload omits required message content and snooze links.** New.
+
+ **Evidence:** Plan:321 defines `What`, `HowLong`, `WhatToDo` and `SnoozeURL`, but the explicit webhook shape at Plan:323 omits them. Spec:297–299 requires every message to explain the problem, time remaining and action, and provide a scoped snooze link.
+
+ **Failure:** A disk-forecast webhook reports the rule and members without the promised ETA, action or snooze capability.
+
+ **Fix:** Include these fields in the versioned webhook body and verify their values and token scope through a signed delivery test.
+
+ **Fault family:** Notification content contract.
+
+Stopping rule 2 now applies to **root filesystem traversal** and **buildable task integration**, which remain outstanding across R1 and R2. Do not start a third patch cycle without choosing the prescribed approach. For the root read, I recommend refusing root-mode execution up front; the alternatives are cutting the local-file backstop or defining one enforced privilege boundary with a guard test.
+
+**NOT READY**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan-R3.md
new file mode 100644
index 000000000..823ad49d1
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan-R3.md
@@ -0,0 +1,113 @@
+# Review brief: fleet alerts Plan 1 (engine, connectors, fleet rules) and its spec, round 3 of 3
+
+Repo carlos/platform, branch `design-fleet-alerts`, commit: this brief's parent (plan rev 3).
+
+Under review:
+- `docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md`, the plan
+- `docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md`, the spec, insofar as Plan 1 builds it
+
+Authorities: the spec above (APPROVED by Paul 2026-10-30; it lives on this branch), main's code at the branch base c24e7a04, and AGENTS.md (census, request budget, stopping rules, production-wired witnesses).
+
+You are an independent reviewer. Read the spec, then the plan, then the code each task names, and check every claim against that code (file:line).
+
+## Fixed: do not re-argue
+
+These are recorded in spec §2. Report only mechanisms that fail to honour them.
+
+- Paul's rulings:
+ - warn before it breaks, with the disk forecast as the reference case
+ - Slack first
+ - the same alert at 3am by default
+ - one engine at three levels
+ - ready-made alerts for end users
+ - traffic page layout A
+ - noise is the anti-goal
+ - plan order: engine, then traffic, then account and app alerts
+- Plan-time calls already folded into the spec. Argue one only if it is unsafe or does not work:
+ - the connector seal key lives in its own file beside console.db
+ - the disk forecast keeps its own ring and is silent for 2 h after a restart
+ - SMS, quiet hours and "also send to" move to Plan 3
+ - operators are seeded with confirmed email connectors
+ - box sinks carry incident rules only
+ - app thresholds are fleet-wide (Plan 3)
+
+## What to check
+
+1. **Interfaces and names.** Does every signature, file:line and registry the plan names exist as described on main? Would a task as written compile against the code? Pay special attention to:
+ - `alertTick`'s parameters and `readDiskFrac`
+ - `GetIfChanged` and the `condGet` pattern
+ - the `claimSQLTables` classification
+ - the claim worker and route registries, and the record-write census re-pin
+ - `s.limits`
+ - `operatorOnly`
+2. **Outbound URL guard (Task 5).** Can a Slack or webhook connector reach loopback, private, link-local, CGNAT, metadata or a fleet box address by any path? Consider:
+ - DNS rebinding
+ - IPv4-mapped IPv6 addresses
+ - an HTTP proxy taken from the environment (`http.ProxyFromEnvironment` in the transport)
+ - redirects
+ - a non-443 port reached through a URL that passes validation
+
+ Is checking in `Dialer.Control` sufficient?
+3. **Secrets.** Can a sealed target leak through:
+ - a page, the job status line or a log
+ - an error string from `postAlert` (the URL inside `*url.Error`)
+ - the console.db replica
+
+ Is the "key file lost" path safe?
+4. **Public token doors (Task 10).** Can confirm, snooze or unsubscribe be guessed, replayed or used across scopes? Can confirm-link sends be used to mail arbitrary addresses beyond the rate limit? Does a rate limit held in memory reset on restart in a way that matters?
+5. **Engine correctness (Task 7).** Do the noise rules as specified hold across:
+ - a restart (state persisted before messages are sent? an at-least-once versus at-most-once gap?)
+ - a pass that fails halfway
+ - two consoles in claim mode (is the worker single-runner?)
+6. **Retiring the watcher (Task 8).**
+ - Does anything still depend on `alertPass` or `StartAlertWatcher`?
+ - Do `claim_runtime.go:328` and `storenotify.go:64` keep working?
+ - Does the dashboard's `alertsNow` keep working?
+ - Is there a window during the roll where operators get nothing, or get everything twice?
+7. **Request budget (spec §9).** Does any task add an unconditional GET, a new object or a timer? Is the test in Task 8 strong enough?
+8. **Root census.** Tasks 1-3 touch `internal/host`, `internal/metrics` and `internal/alerting`. Is the `engine_silent` root read of an env-named path safe? Does `os.Stat` follow a symlink placed by the console's user? Is the census step in the right place?
+9. **Order (AGENTS.md stopping rule 6).** Is there a visible first merge, and are any tasks mis-ordered against their dependencies?
+
+## Round 3 (the last)
+
+Earlier rounds:
+- R1 on 84997183: `CODEX-FINDINGS-fleet-alerts-1-plan-R1.md`, NOT READY
+- R2 on 5e17b11a: `CODEX-FINDINGS-fleet-alerts-1-plan-R2.md`, NOT READY
+
+The plan's "R1 dispositions" and "R2 dispositions" tables give the response to each finding.
+
+Stopping rule 2 fired in R2 for two fault families, and Paul chose the approach for both on 2026-10-31. These are now fixed rulings. Judge only whether the plan implements them:
+- **Root filesystem traversal:** the engine_silent backstop is refused for a root-run agent before any path lookup.
+- **Buildable task integration:** a `git grep` guard plus `go vet` gate Task 8, and the HostClaim worker probe asserts the refusal.
+
+Spec amendments since R2: §8 covers the never-written beat and the root-mode refusal.
+
+First give one line per R2 P1 and P2: resolved, partly, or not. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings. The verdict covers everything outstanding.
+
+This is round 3. A NOT READY must also say whether the P1s share one cause, and whether refusing the case up front or cutting the feature would remove them.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The census, and review of any newly changed security, root, termination or production-storage behaviour, still check the fix; see AGENTS.md, "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives:
+- the section or task
+- the problem
+- the evidence (file:line, verified)
+- the failure scenario
+- a concrete fix
+- the invariant or trust boundary it breaks (that is its fault family)
+
+End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.
diff --git a/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md b/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md
index f3a59ef58..784f5104c 100644
--- a/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md
+++ b/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md
@@ -433,7 +433,10 @@ design:
The plan adds one rule: on the box that runs the console, the agent
pages its own sinks if the console's engine has not written its
-heartbeat for 10 minutes.
+heartbeat for 10 minutes, or has never written it within 10 minutes of
+the agent starting. A root-run agent does not run this check and says so
+in its status line, because reading a console-written file as root
+crosses the root trust boundary (Paul, 2026-10-31, after plan review R2).
Flagship boxes already deliver through SNS topics with confirmed email
subscriptions, so that backstop reaches Paul by email today.