carlos / platform Public

Plan 1 rev 4 after Astra R3: fix the forecast witness, cut one-offs, fresh-cutover path

Astra R3 NOT READY (1 P1 wrong test expectation, 2 P2), findings
committed unedited. Paul 2026-10-31: fix and build, no fourth round;
console one-off pages stay on alerting.Page and move to a later plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a59a6d884553919b7245e0e4ff416c2bb88245ce parent a5504c1
3 files changed, +79 −45
  • docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md +28 −43
  • docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R3.md +46 −0
  • docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md +5 −2

CI cancelled — superseded by a newer push — run details

Intent

Attributed to this commit: 44.0 g CO₂e (5,116,957 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-fleet-alerts, 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/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 2b8f85569..ffe5f3e5e 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 3)
+# Fleet alerts Plan 1: engine, connectors, fleet rules — Implementation Plan (rev 4)
> **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.
@@ -6,7 +6,7 @@
**Architecture:**
- Each box adds a disk-full forecast rule to its existing `metrics.Evaluate`, and keeps only incident-level rules on its own sinks.
-- A new console worker, the alert engine, replaces `alertPass`. It reads box alert state, heartbeats, the fleet summary, and typed one-off events from console code, then folds them into incidents.
+- A new console worker, the alert engine, replaces `alertPass`. It reads box alert state, heartbeats and the fleet summary, then folds them into incidents. Console-side one-off pages (`alerting.Page` callers) are out of Plan 1 (Paul, 2026-10-31, after R3).
- Incidents and their outbound messages are committed together in console.db under the spec's noise rules.
- A notifier drains that outbox through the subscribed connectors (Slack, webhook, email).
@@ -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`. 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.
+**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. Astra R3 on a5504c1c was NOT READY, with 1 P1 (a wrong test expectation) and 2 P2s: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R3.md`. Paul on 2026-10-31: fix and build, with no fourth round, and console one-off pages cut from Plan 1. This is rev 4, the build plan.
## Global Constraints
@@ -29,7 +29,6 @@
- updates are silent until the group is 30 min old, then at most one an hour
- daily reminder after 24 h open
- flapping is 3 fires in 1 h for one (scope, rule, subject), held until 1 h with no firing signal
- - one-offs close after 2 h quiet (`no_room`) or 24 h quiet (the others)
- **Delivery is at least once:** each incident transition and its outbox rows commit in one SQLite transaction. Webhook bodies carry `delivery_id`.
- **Outbound HTTP** (Slack and webhook):
- `Transport.Proxy = nil`
@@ -86,7 +85,7 @@
| `internal/console/alertdial.go` (new) | Guarded client, error categories |
| `internal/console/alertsign.go` (new) | Signing key, signing |
| `internal/console/alertengine.go` (new) | Pure `stepIncidents` |
-| `internal/console/alertsignals.go` (new) | Conditional loaders, signal collection, typed one-offs |
+| `internal/console/alertsignals.go` (new) | Conditional loaders, signal collection |
| `internal/console/alertnotify.go` (new) | Senders, outbox drain |
| `internal/console/alertpages.go` (new) | `/fleet/alerts` and token doors |
| `internal/console/alertwatch.go` | `alertPass` and `StartAlertWatcher` removed. Shared helpers kept |
@@ -149,7 +148,8 @@
- [ ] **Step 1: Write failing tests.**
- `TestDiskTrendRingKeeps360`
- `TestAlertTickSinksIncidentOnly`: a `disk_eta` fire reaches the state file but not the sink. A `disk` fire reaches both.
- - `TestAlertTickDeletionClearsForecast`: drive the ring through `alertTick` with growth until it fires, then flat for 2 h. Expect one clear.
+ - `TestAlertTickDeletionClearsForecast` (R3 #1): on a 100 GiB disk, start at 46 GiB, grow 1 GiB/h through `alertTick` until it fires, then drop 4 GiB. Expect one clear within the next 2 h.
+ - `TestAlertTickSustainedFlatClears`: after it fires, hold usage flat. Expect a clear once the 6 h window holds only flat points, and none before the fitted slope reaches ≤ 0.
- `TestSnapshotCarriesDiskETA`
- [ ] **Step 2: Run them, expect FAIL.** Run `go test ./internal/host -run 'DiskTrend|AlertTick|SnapshotCarriesDiskETA' -count=1`.
- [ ] **Step 3: Implement.** `metricsLoop` owns one `diskTrend` and adds a point each tick from `probes.diskBytes`. `alertTick` sets the observation from `trend.verdict`. The sink loop (:531-535) skips any event where `!boxSinkRule(ev.Rule)`. The snapshot writer reads the trend's last ETA, and only when the verdict is `TrendGrowing`.
@@ -222,27 +222,22 @@
- `owner_address` is set for an operator's seeded personal connector.
- `alert_rules`: `scope, rule, enabled, threshold REAL NULL, PK(scope, rule)`
- `alert_subscriptions`: `scope, rule, connector_id, PK(...)`
- - `alert_incidents`: `id PK, scope, rule, level, opened_at, notify_at, last_seen_at, closed_at NULL, close_reason, members JSON, flapping, one_off, quiet_secs, notified INTEGER, last_reminder_at, last_update_at`. `notify_at` is `opened_at + 5 min`. `notified` is 0 until the first message is queued.
+ - `alert_incidents`: `id PK, scope, rule, level, opened_at, notify_at, last_seen_at, closed_at NULL, close_reason, members JSON, flapping, notified INTEGER, last_reminder_at, last_update_at`. `notify_at` is `opened_at + 5 min`. `notified` is 0 until the first message is queued.
- `alert_fires`: `scope, rule, subject, fired_at`, pruned past 1 h. This is the flap history, independent of incidents.
- `alert_outbox`: `id PK, delivery_id TEXT UNIQUE, incident_id, connector_id, kind, body_json, attempts, next_at, sent_at NULL, err_category TEXT`
- `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 alertIncident struct{ ID int64; Scope, Rule, Level string; OpenedAt, NotifyAt, LastSeenAt, ClosedAt time.Time; CloseReason string; Members []string; Flapping, Notified bool; 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) CommitAlertStep(changed []alertIncident, fires []alertFire, outbox []alertOutboxRow) error`, one transaction
- 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) AlertStepInputs(now time.Time) (open []alertIncident, recentFires map[alertKey][]time.Time, err error)`
- `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
@@ -257,7 +252,6 @@
- Rule accessors: `AlertRuleSettings(scope string) (map[string]alertRuleSetting, error)`, `SetAlertRule(scope, rule string, s alertRuleSetting) error`
- Snooze accessors: `Snooze(scope, rule, subject string, until time.Time) error`, `Snoozed(scope, rule, subject string, now time.Time) (bool, error)`
- Token accessors: `NewAlertToken(t alertToken) (raw string, err error)`, `UseAlertToken(raw, action string, now time.Time) (alertToken, error)`. `UseAlertToken` checks the action, the expiry and, for confirm, single use.
- - `RaiseOneOff(o alertOneOff) error`
- Seal:
- `type connectorSeal struct`
- `func openConnectorSeal(path string) (seal *connectorSeal, created bool, err error)`: creates a 32-byte key at 0600 only when the path is absent. An unreadable key is an error, never a fresh key.
@@ -380,14 +374,13 @@
**Interfaces:**
- Produces:
- - 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"`.
- - One-off rows enter the step as signals. Their title and body are appended to the incident's `Details`.
+ - Uses `alertKey` and `alertFire` from Task 4.
+ - `type alertSignal struct{ Key alertKey; Level string; Firing bool; Value float64; At time.Time; Gone bool }`. `Gone` means the source vanished, which closes the incident with `close_reason "box gone"`.
- `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.
- **First message:** `fire` is emitted when `now ≥ NotifyAt` and the incident is still open. An incident closed before `NotifyAt` emits nothing.
- - **Clear:** every member not firing, a one-off quiet for `Quiet`, or `Gone`. A clear is emitted only when the incident was `Notified`. One-off and gone clears carry the reason "no further reports".
+ - **Clear:** every member not firing, or `Gone`. A clear is emitted only when the incident was `Notified`. A gone clear carries the reason "no further reports".
- **Flapping:** 3 entries in `recentFires` for a key within 1 h set `Flapping`. The incident then stays open until 1 h with no firing signal.
- **Reminder:** at most one per 24 h.
- **Updates:** a member joining after `NotifyAt` and after 30 min gives at most one `update` an hour.
@@ -400,7 +393,6 @@
- `TestStepLateMemberUpdateHourly`
- `TestStepFlappingAcrossIncidents`: fire, clear, fire, clear, fire, with incidents closing in between. Flapping is set from `recentFires`.
- `TestStepDailyReminder`
- - `TestStepOneOffQuietCloses` at 2 h and at 24 h
- `TestStepGoneCloses`
- `TestStepSnoozeSuppresses`
- `TestStepRestartNoDuplicate`: replay `changed` as `open` with the same signals, and `emits` is empty.
@@ -409,7 +401,7 @@
- [ ] **Step 4: Run them, expect PASS.**
- [ ] **Step 5: Commit.** `git commit -m "console: incident step with noise rules"`
-### Task 8: Engine worker, signals, typed one-offs, watcher retired
+### Task 8: Engine worker, signals, watcher retired
**Files:**
- Create: `internal/console/alertsignals.go`, `internal/console/alertengine_pass_test.go`
@@ -427,23 +419,11 @@
- `testdata/claim-routes.txt`
- `claim_invariant_fixtures_test.go:2174`
- `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
- - `hostsused.go:394`: `hosts_used`, subject the reason code
- - `lifetimes_floor.go:42,164`: `lifetimes`, subject the box
- - `lifetimes_cutover.go:474`: `lifetimes`, subject `"marker"`
- - `movesrecovery.go:620`: `moves_recovery`, subject the move rule
- - `claim_loss_pages.go:138`: `claim_loss`, subject the loss ID
-
- The package vars `pageNoCapacity`, `pageEgressConflict` and `lifetimesPage` are kept as test seams but given the typed signature below. Each call site passes `s` explicitly; nothing is bound to a single global server. Existing tests that swap these vars (e.g. `nocapacity_test.go:45`) are updated to the new signature.
+ - One-off callers (`nocapacity.go`, `egressfleet.go`, `hostsused.go`, `lifetimes_*.go`, `movesrecovery.go`, `claim_loss_pages.go`) are NOT changed. They keep calling `alerting.Page`, which is armed only on HostClaim consoles as today. Routing them through the engine is a later plan (Paul, 2026-10-31, after R3).
**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:
- - `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
- `type engineReads struct`: the engine's own etag cache, holding `map[key]{etag string; body []byte}`
- `func (r *engineReads) get(ctx, store, key) (body []byte, changed bool, err error)`, always conditional after the first read
- `func (r *engineReads) boxes(ctx, store) ([]status.Box, error)`: LIST `status/boxes/` plus a conditional GET per key, decoding as `status.LoadBoxes` does
@@ -452,10 +432,11 @@
- `func (s *Server) StartAlertEngine(ctx context.Context)`: a one-minute ticker running `s.jobs.Run(ctx, "StartAlertEngine", s.alertEnginePass)`
- `func (s *Server) alertEnginePass(ctx context.Context) error`:
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`.
+ - Open the seal. On error, report it in job status and treat sealed connectors as unusable. On a created key while sealed rows exist, call `MarkSealedConnectorsNeedReentry`. Each pass emits a `seal_key` signal (incident), firing while the key is unreadable or any connector needs re-entry, and clear otherwise.
- Seed each operator a personal email connector (`owner_address` = their address, confirmed), idempotently.
- **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.
+ - **Firing now, and at least one operator has `alert_seen` `firing = 1`:** 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.
+ - **Firing now, with no legacy history** (a fresh database, or no operator was ever told): cutover does nothing. The rule enters the ordinary path: it is grouped, sent at `notify_at`, and goes to every subscribed connector, Slack included (R3 #3).
- **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.
@@ -481,11 +462,9 @@
| `geoip` | warning | |
| `box_silent` | incident | threshold minutes, editable |
| `service_down` | incident | |
- | `no_room` | incident | |
| `cert_expiring` | warning | threshold days, editable |
| `alert_delivery_broken` | warning | |
| `seal_key` | incident | |
- | `egress_conflict`, `hosts_used`, `lifetimes`, `moves_recovery`, `claim_loss` | at their callers' current levels | |
- [ ] **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.
@@ -497,20 +476,18 @@
- `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.
+ - `TestEnginePassCutoverFreshDatabaseOrdinaryPath`: no `alert_seen` rows and a confirmed Slack connector. Nothing is sent before `notify_at`, then one Slack fire is sent.
- `TestEnginePassNeverAlertedBoxGoesSilent` (Review Focus 3)
- `TestEnginePassBoxGoneCloses`
- `TestEnginePassSeedsOperatorEmailOnce`
- `TestEnginePassCutoverNoRefire`: `alert_seen` already records a fire, so no fire is sent and the later clear is.
- `TestEnginePassCrashBetweenCommitAndSend`: commit, close the store, reopen, drain. One send.
- `TestEnginePassSealKeyUnreadable` (Review Focus 5): connectors are skipped, a `seal_key` incident is emailed, and email connectors still deliver.
- - `TestRaiseOneOffDurable`
- - `TestRaiseNoRoomQuietCloses2h`
- `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 2: Run them, expect FAIL.** Run `go test ./internal/console -run 'EnginePass|EngineRefuses|ClaimConsoleRouteCensus|Jobs' -count=1`.
- [ ] **Step 3: Implement.**
- [ ] **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.
@@ -648,3 +625,11 @@
| 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). |
+
+## R3 dispositions (Astra, `CODEX-FINDINGS-fleet-alerts-1-plan-R3.md`)
+
+| # | Sev | Disposition |
+|---|---|---|
+| 1 | P1 | Accepted. The deletion test now deletes 4 GiB, and a separate test covers sustained flat usage (Task 2). It was a wrong witness, not a model fault. |
+| 2 | P2 | Removed by cutting (Paul, 2026-10-31). Console one-off pages stay on `alerting.Page`, which is armed only on HostClaim consoles as today, so nothing that works now is lost. The durable-signal-identity family failed three rounds running, so it was cut rather than patched again. |
+| 3 | P2 | Accepted. Only rules with legacy notification history are marked notified at cutover. Everything else takes the ordinary path, with a fresh-database test (Task 8). |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R3.md b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R3.md
new file mode 100644
index 000000000..b55089825
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-1-plan-R3.md
@@ -0,0 +1,46 @@
+- R2 #1, P1 — **Resolved:** root mode is refused before any path lookup.
+- R2 #2, P1 — **Resolved:** caller migrations, grep/vet gates and the HostClaim refusal probe are specified.
+- R2 #3, P1 — **Resolved:** a never-created heartbeat fires after the startup grace period.
+- R2 #4, P2 — **Resolved:** the complete five-pass request multiset is asserted.
+- R2 #5, P2 — **Partly resolved:** durable storage exists, but the step’s input still cannot carry message details.
+- R2 #6, P2 — **Resolved:** transactional cutover preserves per-recipient history and runs once.
+- R2 #7, P2 — **Resolved:** ordinary delivery requires confirmation for every connector kind.
+- R2 #8, P2 — **Resolved:** webhook content and scoped snooze links are included.
+
+Reviewed commit `a5504c1c9c86694a940e022704a7882de6daf725` against base `c24e7a04`. No files changed, no subagents spawned, no test suites run. I used a read-only numerical calculation to check the forecast witness.
+
+1. **P1 — Task 2: the prescribed forecast-clear test contradicts the estimator.**
+
+ **Evidence:** [Plan:152](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md:152) requires a clear after growth followed by two hours flat. [Plan:128](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md:128) retains six hours of samples and clears only for nonpositive growth or ETA above 108 hours.
+
+ **Failure:** On a 100 GiB disk, start at 46 GiB and grow 1 GiB/hour for four hours. The forecast fires after warm-up and hold. After two hours flat, the specified 360-point fit still has a positive slope of approximately 0.739 GiB/hour and ETA **66.47 hours**. No clear occurs; the required test fails.
+
+ **Fix:** Make the named deletion test actually delete data. Dropping those 4 GiB after firing produces a negative fitted slope within the following two hours. Test sustained flat usage separately over a sufficiently long window.
+
+ **Fault family:** Forecast clearing semantics—acceptance expectations must match the specified estimator.
+
+2. **P2 — Tasks 4, 7 and 8: one-off details still cannot enter the pure step.** Carries R2 #5.
+
+ **Evidence:** [Plan:243](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md:243) adds stored row identity, and line 245 adds incident details. However, [Plan:384](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md:384) defines `alertSignal` without title/body. The step accepts only those signals, existing incidents and fire history, while line 385 requires it to append the missing details.
+
+ **Failure:** A newly raised egress event’s account, app and address cannot reach the incident through the declared interface. Those details originate at [egressfleet.go:448](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/internal/console/egressfleet.go:448).
+
+ **Fix:** Carry `alertDetail` in `alertSignal`, or pass `[]alertOneOffRow` explicitly into `stepIncidents`. Preserve details and consume row IDs in the same commit; retain the restart witness.
+
+ **Fault family:** Durable signal identity.
+
+3. **P2 — Task 8: cutover treats previously unseen incidents as already notified.**
+
+ **Evidence:** [Plan:458](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md:458) sets `Notified = true` for every currently firing rule and queues immediate email to operators without a firing history. This includes a fresh database with no legacy history. It conflicts with the five-minute first-message rule at [Spec:283](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md:283).
+
+ **Failure:** A first-start forecast sends email immediately. If a confirmed Slack connector is already configured, its initial fire is suppressed because the incident is marked notified; cutover queued only seeded-email deliveries.
+
+ **Fix:** Distinguish legacy delivery reconciliation from new incidents. Incidents without legacy notification history should enter the ordinary grouping and subscription path. Add a fresh-database witness alongside the mixed-recipient migration tests.
+
+ **Fault family:** Restore and rollout continuity.
+
+The sole P1 is a test/model contradiction. Refusing runtime cases would not fix it; cutting forecasting would remove it but lose the plan’s main purpose. Correct the witness.
+
+For the repeatedly unresolved durable-signal-identity family, either defer one-off ingestion or enforce complete details at the single step-input boundary with the restart witness. No fourth review round was started.
+
+**NOT READY**
\ No newline at end of file
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 784f5104c..cb78c2a7e 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
@@ -325,7 +325,7 @@ and the rest are warnings.
| GeoIP database | box | warning | exists |
| Box silent | console | incident | no heartbeat for 15 min |
| Service down | console | incident | a platform service the fleet summary reports not up (`status/fleet.go:81`, the same source as the dashboard's "is down" line, `opdashboard.go:101`) |
-| Region has no room | console | incident | exists (`nocapacity.go`), moves onto the engine |
+| Region has no room | console | incident | exists (`nocapacity.go`), moves onto the engine in a later plan (cut from Plan 1, Paul 2026-10-31) |
| Certificate expiring | console | warning | any served host whose cert expires within 14 days (`CertExpiresAt`) |
| Fleet 5xx rate (Plan 2) | console | warning | above 1% for 15 min, at least 500 requests |
| Abuse surge (Plan 2) | console | warning | blocked + watched above 5x the 7-day same-hour median, at least 1,000 requests. Until 7 days of history exist: above 10,000 an hour |
@@ -354,7 +354,10 @@ Other forecasts (memory creep, a region filling) are left for later.
The same fitting function should be reusable.
The existing console pages that call `alerting.Page` (moves recovery,
-egress conflict, lifetimes, claim loss) become engine rules too. They
+egress conflict, lifetimes, claim loss) become engine rules in a later
+plan, not Plan 1 (Paul, 2026-10-31: they reach nobody on a non-host-claim
+console today, and carrying their details was the one fault plan review
+kept finding). They
keep their current SNS/webhook path as well, as the backstop (§8).
### 7.2 Where box signals travel