carlos / platform Public

docs: fleet alerts plan 1 copy deck (draft for copy review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 911b1d7f441d4a88770e06a9ed0220b96c3f41c2 parent 3fd70d4
1 file changed, +473 −0
  • docs/superpowers/notes/copy-fleet-alerts-1.md +473 −0

Intent

Human

<task-notification> <task-id>a228356c85f7c1bde</task-id> <tool-use-id>toolu_01SJwknV5ZXNQqib6xjLnxeM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/6112a34e-476e-4b5e-8e07-f93a46fc6d50/tasks/a228356c85f7c1bde.output</output-file> <status>completed</status> <summary>Agent "Implement Task 8: alert engine worker" 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>- **Status:** DONE - **Commit:** 3fd70d49 `console: alert engine fix round 2 (heartbeat horizon restored, revoked operators re-seed, unreachable is a note)` - **What changed:** - **R-25:** the 24-hour horizon is back on `status/boxes/`, measured from the pass's own clock as `status.LoadBoxes` does. A box whose heartbeat drops out counts as gone, so its silent-box incident closes as "no further reports" on the next heartbeat pass. A stale object is never read, so it can't hold up certificate checks or fill the 200-box limit. - **R-26 (a):** when the drain deletes a revoked operator's connector, it deletes their `seeded:` marker in the same transaction, so making them an operator again seeds them again. A person deleting their own connector still keeps the marker (R-24). - **R-26 (b):** operators no connector reaches are now a job-status note rather than a failure. They are still named on every pass until a check finds them reachable, and the job stays OK. - The stale `alertMessage` mention in `alertnotify.go` is gone. - **Tests:** - `TestEnginePassNamesUnreachableOperators` now expects OK with a note naming the operator. - Three new tests: a revoked operator is re-seeded when granted again; a heartbeat older than 24 hours closes its incident with the clear sent; a stale corrupt heartbeat is not read and doesn't block the certificate check. - All 29 engine tests pass, as do Alert, Dashboard, Jobs, StoreNotify and the route census (29.7 s). `go vet` is clean, the Step 5 guard prints nothing, and the five-cycle request counts are unchanged. - Removing the horizon or keeping the marker on revocation makes all three new tests fail; restored, they pass. - **Concerns:** none new. The job status still flips to Failed on a heartbeat read failure, left as you instructed. - **Report:** /home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-alerts/.superpowers/sdd/2026-10-30-fleet-alerts-1-engine-connectors/task-8-report.md (round 2 appended)</result> <usage><subagent_tokens>446578</subagent_tokens><tool_uses>8</tool_uses><duration_ms>225172</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>a5ee4e736fc404c65</task-id> <tool-use-id>toolu_01JW1bDXfN75UNpwpPdk5EAP</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/6112a34e-476e-4b5e-8e07-f93a46fc6d50/tasks/a5ee4e736fc404c65.output</output-file> <status>completed</status> <summary>Agent "Re-review Task 8 fix round 2" 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>### Finding Verdicts - **1. Replaced boxes were permanent `box_silent` members (R-25)** — ADDRESSED. - `engineBoxKeyList` (`alertsignals.go`, about lines 169-189) uses `ListMod` and keeps only keys with `Mod` zero or not before `now - 24h`. `now` is the pass's clock, passed from `heartbeatSignals`. It matches `status.LoadBoxes`, and a store without `ListMod` falls back to a whole listing. - A dropped box is not in `boxes`, so `heartbeatBoxSignals` adds no signal for it. `sig.cover("box_silent", unread)` and `cover("alert_delivery_broken", unread)` mark those rules as read. `withGone` (`alertsignals.go:261-281`) then emits `Gone` for any open member that is neither signalled nor in `unread`. Both heartbeat-rule members therefore get `Gone`, and the close reason is `alertCloseGone` = "box gone" (`alertengine.go:67`). - A stale object is never listed, so it is never read. It cannot enter `unread`, which would have blocked `cert_expiring` (`len(unread) &gt; 0` returns early). It also cannot count toward `engineBoxKeys`, which caps only the filtered list. - Tests: - `TestEnginePassHeartbeatPastTheHorizonCloses` ages the object 48 h, checks the incident stays open until the +10m heartbeat pass, then checks the "box gone" close and the "No further reports of box_silent on box-9" mail. - `TestEnginePassStaleCorruptHeartbeatIsNotListed` has a 48 h corrupt object beside a fresh box with an expiring certificate. It checks the job is OK, `cert_expiring` opens, and `listedBoxes` lacks `box-old`. - The cap half has no dedicated test. It follows from the filter running before the cap, so I count it covered. - The report claims a mutation check (horizon dropped) makes all three new tests fail. - **2. Revoked-then-re-granted operator never re-seeded; unreachable operator kept the engine Failed (R-26)** — ADDRESSED. - (a) `alertOwnerRevoked` (`alertnotify.go:~503-515`) now calls `DeleteRevokedOperatorConnector(c.Scope, c.ID, c.OwnerAddress)`. In one transaction (`alertstore.go:~554-566`) it runs `deleteAlertConnectorTx` and then `DELETE FROM alert_meta WHERE k = alertSeededMarker(owner)`. Seeding and deletion both build the key through `alertSeededMarker`, so the normalisation is identical. Both drain callers (`alertnotify.go:411`, `:731`) go through `alertOwnerRevoked`. `DeleteAlertConnector` still keeps the marker (R-24), via the shared `deleteAlertConnectorTx`. - (b) `noteUnreachableOperators` (`alertengine_pass.go:~573-591`) reports through `jobNoteOn(ctx, note)` and no longer calls `jobFailed`. The cadence logic is unchanged: it re-checks and names them every pass from the daily check until a check finds them reachable. An empty note is a no-op, so reachable means no note. It logs only when the set changes. The `Operators()` query failure still uses `jobFailed`, which is correct. - Tests: - `TestEnginePassNamesUnreachableOperators` now expects `JobOK` with `Note` naming B and not A at +24h, +24h+1m and +24h+5m. It expects `JobOK` with no note inside the day and after `ResumeAlertConnector`. - `TestEnginePassRevokedOperatorIsSeededOnRegrant` covers revoke, queue a row, drain, connector and marker both gone, B receives nothing, re-grant, next pass seeds a confirmed connector. - The report claims the mutation check (marker left in place) makes it fail. - **3. Stale `alertMessage` comment in `alertnotify.go` (Minor)** — ADDRESSED. The `alertNote` doc comment (`alertnotify.go:~288-291`) no longer mentions it, and `git grep alertMessage -- internal cmd` returns nothing. ### New Breakage in the Fix Diff None. I read the fix diff and the surrounding code for `withGone`, `heartbeatBoxSignals`, `jobNoteOn` and both `alertOwnerRevoked` call sites. The report names the covering tests and shows output for the engine tests, the wider alert/jobs/census set, `go vet` and the step 5 guard. I did not re-run anything. ### Out-of-Scope Observations - **Marker stays after a self-deleted connector is revoked.** - `DeleteRevokedOperatorConnector` removes the marker only when the revoked operator's connector still exists at drain time. If the operator first deleted their own connector, which keeps the marker per R-24, and was later revoked, nothing drains and the marker stays. A re-grant then does not re-seed. - It is consistent with R-24 (a person's deleted connector is not restored) and is arguably intended. R-26 worded the revoke cleanup as a drain-time step. It is not blocking. - **Revoked operators with no queued rows.** A revoked operator whose connector has no queued rows keeps the connector and marker until a row is drained, so re-granting them is a no-op and they stay reached. That is harmless. ### Verdict **Fix round:** All findings addressed, no new Critical/Important breakage.</result> <usage><subagent_tokens>70789</subagent_tokens><tool_uses>7</tool_uses><duration_ms>55261</duration_ms></usage> </task-notification>

diff --git a/docs/superpowers/notes/copy-fleet-alerts-1.md b/docs/superpowers/notes/copy-fleet-alerts-1.md
new file mode 100644
index 000000000..5703e6140
--- /dev/null
+++ b/docs/superpowers/notes/copy-fleet-alerts-1.md
@@ -0,0 +1,473 @@
+# Fleet alerts plan 1: copy deck (draft, for copy review)
+
+Every user-facing string of fleet alerts plan 1 (engine and connectors),
+for the copy review in Task 9. Nothing here is approved. A reviewer
+rewrites the `current` column against the house rules; Task 9 step 3 then
+puts the approved text into the code verbatim.
+
+How to read it:
+
+- `key`: the `alertCopy` key where there is one. A key starting `new:` does
+ not exist yet; its `current` column is a draft written for this deck
+ (groups 14 to 18 are all drafts, because Task 10 has not built them).
+- `current`: the text as the code has it now, or the draft. `%s`, `%d`,
+ `%[1]s` and `%[2]s` are Go format verbs; the notes column says what each
+ one holds. `{{.Name}}`-style fields are template fields.
+- `where it shows`: who reads it and where.
+- `notes`: problems, constraints and open questions.
+
+## Where each group appears
+
+| Group | Where a person reads it |
+|---|---|
+| 1 to 7 | Alert messages the console sends: an email, a Slack post, or the text fields of a signed webhook body. Operators only in plan 1. Groups 1 to 5 are the engine's messages. Group 6 is the connector confirm, the test and the suspended notice. |
+| 8 | The operator pages' background jobs table (`/fleet/boxes`), as the job's name and its status note. |
+| 9 | The `/fleet/alerts` page, as the message after a test send fails, and anywhere a held message's reason is shown. |
+| 10 | The `/fleet/alerts` page, when an operator adds a Slack or webhook connector with a bad URL. |
+| 11 to 13 | Each box's own alert path (`internal/host/alertsink.go`): the SNS email subject and body, and since plan 1 the Slack post when a box's `CARLOS_ALERT_WEBHOOK` is a Slack URL. Group 13 is `carlos status --live`. |
+| 14 to 16 | New: the `/fleet/alerts` operator pages (Connectors, Rules, History). |
+| 17 | New: the public token doors (`/alerts/confirm`, `/alerts/unsubscribe`, `/alerts/snooze`), opened from an email or Slack link by anyone holding the link. |
+| 18 | New: `/alerts/signing-key`, fetched by webhook receivers. |
+
+Voice for drafts: plain and direct, no em or en dashes, no exclamation
+marks, no marketing tone. Operator-facing, so "webhook" and "host.env" are
+fine.
+
+## Flags for the reviewer
+
+1. **Job label.** "Alert engine" (`jobs.go:301`) replaces the approved "Alert checks" (copy record OPS-84, `2026-10-25-operator-pages-copy.md:177`, "Says what the job does"). It has not been through copy review. `jobs_test.go:344` pins "Alert engine". If the reviewer keeps "Alert checks", that test changes with it. See group 8.
+2. **The box text posts to Slack now, and still says "you will get another email when it clears."** `formatAlert` (`alertsink.go`) feeds the SNS email and, since this plan, the Slack post (`alerting.SlackBody`). For a Slack channel the line is false. See group 11.
+3. **Clears and headlines use raw rule IDs** ("disk has cleared on box-1", "Cleared: cpu on box-1"). Group 2 drafts a display name per rule for the reviewer to approve; the headline and clear rows use it.
+4. **A clear where every member is snoozed reads "... on the fleet."** The emit leaves out snoozed members, the subject falls back to `subject.none`, and the same happens to a fire or update. See `subject.none` and the clear rows.
+5. **`seal_key` wording.** The text says the key "cannot be used" but the rule also fires when the key was re-made and connectors need entering again. Its subject is always the word "console". The shipped `what_to_do` names a "key file beside console.db"; the file is `alert-connectors.key`. See group 3.
+6. **Format verbs.** `alertEmitNote` always calls `Sprintf(what, subject)`. A `what` with no verb prints `%!(EXTRA string=...)`. Any rewrite of a `what` keeps exactly one `%s`, or Task 9 step 3 changes the call.
+7. **A reminder does not say how long the incident has been open**, and an update names only new members. Group 1 drafts one new key for the age.
+8. **Late engine_silent.** `engine_silent` is a box rule. While the engine is dead only the box's own text (group 11) goes out. The console's text (group 3) is sent only after the engine is back and reads the box, so it arrives late and is followed at once by its clear. Group 3 words it for that.
+9. **The `what` names the first member only**, while the "Affected" line lists all of them. A message about three boxes opens with one box's name.
+10. **Hard-coded numbers in text.** `rule.disk_eta.how_long` says "3 days" although a box can set `CARLOS_ALERT_DISK_ETA_HOURS`.
+
+---
+
+## 1. Headlines and framing (engine messages)
+
+Headlines take two verbs: `%[1]s` is the rule (today the raw ID; group 2 supplies a display name) and `%[2]s` is the subject (first affected box, host or service, or the connector's label on verify and suspended messages). The email subject wraps a headline.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `head.fire` | `%[1]s on %[2]s` | Email subject (after the prefix), Slack bold first line, plain-text fallback | Reads "disk on box-1" today. Also the fallback for an unknown kind. |
+| `head.clear` | `Cleared: %[1]s on %[2]s` | Same | Raw rule ID. With every member snoozed, `%[2]s` is "the fleet". |
+| `head.update` | `More affected: %[1]s on %[2]s` | Same | Sent when members join an open incident. |
+| `head.reminder` | `Still open: %[1]s on %[2]s` | Same | Daily, at most, for an incident still open after 24 hours. |
+| `head.suspended` | `Alerts to %[2]s have stopped` | Same | `%[2]s` is the connector label, such as a name and its address hint. `%[1]s` is unused (empty). |
+| `head.verify` | `Check alerts reach %[2]s` | Same | Test sends and confirmations. `%[2]s` is the connector label. |
+| `email.subject` | `[carlos] %s` | Every email's subject line | `%s` is the headline. Newlines in it become spaces. |
+| `label.what` | `What is wrong` | Email body line, Slack bold label | Followed by a colon and the text. |
+| `label.how_long` | `How long you have` | Same | |
+| `label.what_to_do` | `What to do` | Same | |
+| `label.members` | `Affected` | Same, only when more than one member | The members, comma separated. |
+| `link.incident` | `See the incident` | Email line, Slack link | Goes to the history page, at the incident. Not on a test. |
+| `link.snooze` | `Snooze this alert` | Same | Opens the snooze door (group 17). Not on a verify message. A webhook body carries it as `snooze_url`. |
+| `link.confirm` | `Confirm alerts here` | Same | Only on a verify message to an unconfirmed email or Slack connector. In place of the snooze and unsubscribe links. |
+| `link.unsubscribe` | `Stop these alerts` | Same, last in the message, after a blank line | This is the unsubscribe footer. It turns off the whole connector, not one rule, and the label does not say so. Shared by email and Slack. Webhook bodies have no such link. |
+| `subject.none` | `the fleet` | In place of a subject when no member is left to name | Known issue: appears as "... on the fleet" when every member is snoozed, on a fire, update or clear. |
+| `what.value` | `The last reading was %s.` | Appended to a fire's "what is wrong" for rules with a reading | `%s` is a reading from group 5. Grammar breaks for geoip (see group 5). |
+| `update.what` | `Now also affected: %s.` | Starts the "what is wrong" of an update | `%s` is the newly joined members, comma separated. |
+| `new:footer.unsubscribe.slack` | `Stop alerts to this channel` | Slack link, in place of `link.unsubscribe` | Draft, needs a code change to pick by kind. For email the draft of `link.unsubscribe` is `Stop alerts to this address`. |
+| `new:reminder.what` | `This has been open for %s.` | Starts a reminder's "what is wrong" | Draft, new. `%s` is a duration such as "2 days". Fixes flag 7. |
+
+## 2. Rule display names (new)
+
+The code has no display names today; clears and headlines print the ID. These drafts follow spec §7.1 where it names the rule. They would replace `%[1]s` in groups 1 and 4.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:rule.disk_eta.title` | `Disk full forecast` | Headlines, clears, Rules and History pages | Spec §7.1. |
+| `new:rule.disk.title` | `Disk nearly full` | Same | Spec says "Disk full now". Drafted "nearly full" because it fires at the threshold, before full. |
+| `new:rule.mem.title` | `High memory use` | Same | |
+| `new:rule.cpu.title` | `High CPU use` | Same | |
+| `new:rule.lag.title` | `Mail relay behind` | Same | |
+| `new:rule.geoip.title` | `Location database` | Same | Spec says "GeoIP database". The job label for the same thing is "Location data". |
+| `new:rule.engine_silent.title` | `Alert engine silent` | Same | Fires on the console box only. |
+| `new:rule.box_silent.title` | `Box silent` | Same | |
+| `new:rule.service_down.title` | `Service down` | Same | |
+| `new:rule.cert_expiring.title` | `Certificate expiring` | Same | |
+| `new:rule.alert_delivery_broken.title` | `Alert delivery broken` | Same | |
+| `new:rule.seal_key.title` | `Connector key` | Same | |
+
+## 3. Fire texts (also used by updates and reminders)
+
+Each rule has three lines: what is wrong, how long you have, what to do. `%s` in a `what` is the subject: the box, host or service, or for `seal_key` the word "console". Updates and reminders reuse these lines. The default row applies to a rule without its own lines; all twelve rules have their own, so the default is unreachable today.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `rule.default.what` | `%s needs attention.` | Fallback fire | `%s` is the subject. |
+| `rule.default.how_long` | `It is not known how long you have.` | Fallback fire | |
+| `rule.default.what_to_do` | `Look at it on the fleet page.` | Fallback fire | |
+| `rule.disk_eta.what` | `The disk on %s is filling up.` | Fire, update, reminder for `disk_eta` | `%s` is a box. Reading follows: "N hours to full". |
+| `rule.disk_eta.how_long` | `At this rate it is full within 3 days.` | Same | Flag 10: "3 days" is the default 72 hours, but a box can override it. |
+| `rule.disk_eta.what_to_do` | `Free space on it or give it a bigger disk.` | Same | Draft: "Free space on it, or give it a bigger disk before then." |
+| `rule.disk.what` | `The disk on %s is nearly full.` | Fire for `disk` | Reading follows, a percent. |
+| `rule.disk.how_long` | `Writes fail once it is full, which may be soon.` | Same | Gives no time. Draft: "Once it is full, writes fail. That can be soon, so treat this as urgent." |
+| `rule.disk.what_to_do` | `Free space on it now, or give it a bigger disk.` | Same | |
+| `rule.mem.what` | `Memory on %s is running high.` | Fire for `mem` | Reading follows, a percent. It has held for 10 minutes by default. |
+| `rule.mem.how_long` | `Processes may be stopped if it keeps climbing.` | Same | Gives no time. Draft: "There is no fixed time. If memory runs out, the system stops processes, and the apps on the box go down with them." |
+| `rule.mem.what_to_do` | `Check what is using memory on it.` | Same | |
+| `rule.cpu.what` | `The processor on %s has been busy for a while.` | Fire for `cpu` | Reading follows. "A while" is 15 minutes by default. |
+| `rule.cpu.how_long` | `Requests are slower while it stays this busy.` | Same | Draft: "Nothing is down, but requests are slower for as long as it stays this busy." |
+| `rule.cpu.what_to_do` | `Check what is using it, or move apps to another box.` | Same | |
+| `rule.lag.what` | `Mail relay on %s is falling behind.` | Fire for `lag` | Reading follows, in seconds. |
+| `rule.lag.how_long` | `Messages are late until it catches up.` | Same | Draft: "Messages are already late. The delay grows until the relay catches up." |
+| `rule.lag.what_to_do` | `Check the relay on that box.` | Same | |
+| `rule.geoip.what` | `The location database on %s needs attention.` | Fire for `geoip` | A reason follows (group 5). |
+| `rule.geoip.how_long` | `Location answers go stale, then stop.` | Same | Gives no time; the reason decides it. Draft: "Lookups keep using the old data. If the database expires, they stop." |
+| `rule.geoip.what_to_do` | `Check the location data feed.` | Same | Draft: "Check the location data feed. Its status is under Location data in the background jobs." Reviewer to confirm that page name. |
+| `rule.engine_silent.what` | `The alert engine on %s stopped writing its beat.` | Fire for `engine_silent` (late, flag 8) | `%s` is the console box. "Beat" is internal. Draft: "The alert engine on %s has gone quiet." |
+| `rule.engine_silent.how_long` | `Until it runs again, no alerts are sent.` | Same | Draft: "Until it runs again, the console sends no alerts. Each box still sends its own." |
+| `rule.engine_silent.what_to_do` | `Check the console on that box.` | Same | Draft: "Check the console service on that box and restart it if it is stuck." |
+| `rule.box_silent.what` | `%s has stopped reporting.` | Fire for `box_silent` | Reading follows: "N minutes since its last report". |
+| `rule.box_silent.how_long` | `If it is down, every app on it is down too.` | Same | |
+| `rule.box_silent.what_to_do` | `Check the box is running and can reach the bucket.` | Same | |
+| `rule.service_down.what` | `The %s service is down.` | Fire for `service_down` | `%s` is a service name, such as "console". |
+| `rule.service_down.how_long` | `What relies on it fails until it is back.` | Same | |
+| `rule.service_down.what_to_do` | `Check the service on the fleet page.` | Same | Draft: "Open the fleet page, find the service and read its status." |
+| `rule.cert_expiring.what` | `The certificate for %s expires soon.` | Fire for `cert_expiring` | `%s` is a served host. Reading follows: "N days left". |
+| `rule.cert_expiring.how_long` | `Visitors see a warning once it expires.` | Same | Gives no time; the reading does. Draft: "Visitors see a browser warning once it expires. The days left are in the last reading." |
+| `rule.cert_expiring.what_to_do` | `Check why it has not renewed.` | Same | Draft: "Find out why it has not renewed. Start with the box that serves the host." |
+| `rule.alert_delivery_broken.what` | `%s has nowhere to send its own alerts.` | Fire for `alert_delivery_broken` | `%s` is a box. |
+| `rule.alert_delivery_broken.how_long` | `If the console stops, nobody hears from that box.` | Same | Draft: "That box's own alerts reach nobody. If the console stops as well, nobody hears about it." |
+| `rule.alert_delivery_broken.what_to_do` | `Set CARLOS_ALERT_WEBHOOK or CARLOS_ALERT_SNS_TOPIC_ARN in its host.env.` | Same | Both are real variable names. Reviewer to say if a restart of the agent should be named. |
+| `rule.seal_key.what` | `The key that opens Slack and webhook connectors on %s cannot be used.` | Fire for `seal_key` | `%s` is always "console", so it reads "on console". Also fires after a new key is made, when "cannot be used" is wrong. Draft: "Slack and webhook connectors cannot send, because the %s cannot open the key that protects their addresses." |
+| `rule.seal_key.how_long` | `Slack and webhook alerts are not sent until it is fixed. Email still works.` | Same | Ok. Draft keeps it: "Slack and webhook alerts wait until this is fixed. Email still works." |
+| `rule.seal_key.what_to_do` | `Restore the key file beside console.db, or enter each Slack and webhook connector again.` | Same | The file is `alert-connectors.key`; name it. Draft: "Put alert-connectors.key back beside console.db and restart the console. If it is lost, enter each Slack and webhook connector again on the Alerts page." |
+
+## 4. Clear texts
+
+A clear closes an incident. The "gone" variant is used when the incident closed because nothing reports it any more (a box's object is gone, a service left `fleet.json`) and also when the incident was flapping. `%[1]s` is the raw rule ID today, `%[2]s` the subject, or all members comma separated when there are several.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `clear.what` | `%[1]s has cleared on %[2]s.` | A clear's "what is wrong" | Raw rule ID. With every member snoozed, `%[2]s` is "the fleet": "disk has cleared on the fleet." |
+| `clear.how_long` | `Nothing is wrong now.` | Same | |
+| `clear.what_to_do` | `Nothing.` | Same | |
+| `clear.what.gone` | `No further reports of %[1]s on %[2]s.` | A "no further reports" clear | Raw rule ID. Same "on the fleet" case. |
+| `clear.how_long.gone` | `It may have stopped, or what reported it may have gone.` | Same | Wrong for a flapping incident that went quiet: that one is still reported, only steady. |
+| `clear.what_to_do.gone` | `Check it went away for a good reason, such as a box being replaced.` | Same | |
+
+## 5. Readings (appended to a fire)
+
+`alertValueText` and `geoipReasonText`, in `alertengine_pass.go`. A reading is appended through `what.value` only for the rules in `alertValued`: disk, mem, cpu, lag, geoip, disk_eta, box_silent, cert_expiring.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:value.pct` | `%.0f%%` | After "The last reading was" for `disk`, `mem`, `cpu` | `%.0f` is a whole percent, such as 92%. |
+| `new:value.lag` | `%.0fs` | Same, for `lag` | Seconds, such as 920s. |
+| `new:value.disk_eta` | `%.0f hours to full` | Same, for `disk_eta` | "The last reading was 52 hours to full." |
+| `new:value.box_silent` | `%.0f minutes since its last report` | Same, for `box_silent` | |
+| `new:value.cert_expiring` | `%.0f days left` | Same, for `cert_expiring` | |
+| `new:value.default` | a bare number | Same, for a rule this console has no unit for | Not user text, listed for completeness. |
+| `new:geoip.1` | `database over 45 days old` | Same, for `geoip` code 1 | "The last reading was database over 45 days old." does not parse. Draft the frame as "Last reading: %s." or give geoip its own frame. |
+| `new:geoip.2` | `GeoLite2 database expires within 9 days` | Same, code 2 | |
+| `new:geoip.3` | `database expired and removed` | Same, code 3 | |
+| `new:geoip.4` | `published database not loaded for over an hour` | Same, code 4 | |
+| `new:geoip.5` | `feed failing` | Same, code 5 | |
+| `new:geoip.other` | `geoip reason %d` | Same, any other code | `%d` is the code. A code from a newer box. |
+
+## 6. Connector messages: confirmation, test, suspended
+
+A test send to a confirmed connector, a confirmation to a new one, and the notice that a connector was suspended. `%s` in `test.what` is the console's name. In `suspended.what`, `%s` is the connector label.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `test.what` | `This is a test alert from %s.` | "What is wrong" line of every test and confirmation | `%s` is the console's name. |
+| `test.how_long` | `Nothing is wrong. There is no rush.` | "How long you have" of a test to a confirmed connector | |
+| `test.how_long.confirm` | `The confirm link works for 7 days.` | Same, to an unconfirmed email or Slack connector | The 7 days is `alertConfirmLinkTTL`. |
+| `test.what_to_do` | `Nothing. Real alerts will arrive here like this one.` | "What to do" of a test to a confirmed connector | |
+| `test.what_to_do.confirm` | `Open the confirm link. Until then, no alerts come here.` | Same, to an unconfirmed email or Slack connector | |
+| `test.what_to_do.webhook` | `Answer with any 2xx status. The first one confirms this webhook.` | Same, to an unconfirmed webhook | The webhook gets this in the JSON `what_to_do` field, so it is read by whoever builds the receiver. |
+| `suspended.what` | `Sending to %s has failed for 24 hours, so alerts no longer go there.` | "What is wrong" of the suspended notice | Goes to the scope's other connectors, or by email to the owners when there are none. |
+| `suspended.how_long` | `Until it is fixed, every alert meant for it is missed.` | Same | |
+| `suspended.what_to_do` | `Check it on the alerts page, then send a test. A test that gets through turns it back on.` | Same | Page name must match the nav label, "Alerts". |
+
+## 7. Email framing
+
+Not separate keys: how `renderEmail` lays the keys above out. Listed so the reviewer sees the whole body.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:email.layout` | `What is wrong: ...` then `How long you have: ...`, then `What to do: ...`; if several members, a blank line then `Affected: a, b`; then a blank line and the links one per line as `See the incident: URL`, `Snooze this alert: URL`, and after another blank line `Stop these alerts: URL` | The body of every email | No greeting, no sign-off, no explanation of why the person gets this. A confirmation ends with `Confirm alerts here: URL` instead. Draft of a one-line opener for the unsubscribe footer: "You get this because this address is an alert connector for CARLOS." |
+
+## 8. Job label and job-status notes
+
+Shown in the background jobs table on the operator pages.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `jobLabels["StartAlertEngine"]` | `Alert engine` | Jobs table, Name column | **Replaces the approved "Alert checks" (OPS-84).** Not reviewed. The job now also seeds connectors, sends the outbox and writes the engine beat, so "checks" undersells it; "engine" is internal. `jobs_test.go:344` pins it. Candidate: "Alerts". |
+| `new:jobnote.seal` | `%v; Slack and webhook connectors are held` | Job status note, every pass while the seal key cannot be used | `%v` is the key error, in the next two rows. |
+| `new:jobnote.seal.read` | `alert seal key: %w` | Inside the note above | `%w` is the operating system's error, such as "permission denied". Diagnostic. |
+| `new:jobnote.seal.size` | `alert seal key %s: %d bytes, want %d` | Inside the note above | `%s` is the key file path, the numbers its size and the size wanted. Diagnostic. |
+| `new:jobnote.unreachable` | `no usable alert connector reaches %s` | Job status note, until fixed | `%s` is the operators, comma separated. A note, not a failure. |
+
+Not listed, on purpose (error fragments and diagnostics, copy-review scope rule): the `jobFailed` messages of the pass (`list alerts/boxes/`, `read ...`, `drain: ...`, `commit alert step`, `seed operator connectors`, `mark sealed connectors for re-entry`, `beat ...`, `snooze ...`), and `refused: host-claim console`.
+
+## 9. Test-send errors and held reasons
+
+From `alertnotify.go` and `alertdial.go`. The page shows a failed test or a held message with one of these. `sendErr` categories are the only detail a failed send keeps, because anything more could carry the URL.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `errAlertTestUnconfirmed` | `alert test: an email connector is tested only once its address is confirmed` | Error after "Send test" on an unconfirmed email | Not human text yet: it carries a `alert test:` prefix. Task 10 decides how it is shown. |
+| `errAlertTestLimit` | `alert test: at most 10 tests a connector an hour` | Error after "Send test" | |
+| `errAlertTestReentry` | `alert test: the connector needs re-entering` | Error after "Send test" | |
+| `new:test.failed` | `alert test: %s` | Error after "Send test" when the send fails | `%s` is a send category (next rows) or a hold reason. |
+| `sendErr.refused` | `refused` | A failed send's reason | The address resolved to a private or reserved range. |
+| `sendErr.timeout` | `timeout` | Same | Took over 5 seconds. |
+| `sendErr.connect` | `connect` | Same | |
+| `sendErr.tls` | `tls` | Same | |
+| `sendErr.status` | `status %d` | Same | `%d` is the HTTP status returned. |
+| `sendErr.invalid` | `invalid` | Same | The stored URL no longer passes the checks. |
+| `hold.needs_reentry` | `needs re-entry` | Why a message is waiting | |
+| `hold.suspended` | `suspended` | Same | |
+| `hold.unconfirmed` | `unconfirmed` | Same | |
+| `hold.no_seal_key` | `no seal key` | Same | |
+| `hold.seal` | `seal` | Same | The key could not open the stored address. |
+
+## 10. Connector URL errors (`validConnectorURL`)
+
+Shown to an operator who adds a Slack or webhook connector. They name the rule broken and never the URL. Every string carries an internal `alert connector:` prefix; the reviewer should say whether the page strips it or the text drops it.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `url.kind` | `alert connector: %q has no URL` | Never to a person with the form as drawn | `%q` is the connector kind. Reached only by a forged kind. |
+| `url.parse` | `alert connector: the URL does not parse` | Add form | |
+| `url.scheme` | `alert connector: the URL must start with https://` | Add form | |
+| `url.userinfo` | `alert connector: the URL must not carry a user name or password` | Add form | |
+| `url.port` | `alert connector: the URL must use port 443` | Add form | |
+| `url.host` | `alert connector: the URL has no host` | Add form | |
+| `url.ip` | `alert connector: the URL must name a host, not an IP address` | Add form | Also catches 127.1 and 0x7f000001. |
+| `url.slack` | `alert connector: a Slack URL must be on hooks.slack.com` | Add form, Slack only | |
+
+## 11. Box side: the message text (`formatAlert`)
+
+The box's own alert, for `disk`, `mem`, `cpu`, `lag`, `geoip`, `disk_eta` and `engine_silent`. The same text goes to the SNS email and, since plan 1, to Slack (`alerting.SlackBody`, subject in bold then the body). It does not say how long you have or what to do, and it is lower case. `%s` is the box (for `engine_silent`, the console box), `ev.Rule` the raw ID.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `box.subject.fire` | `carlos alert: %s` | SNS subject, Slack bold first line | `%s` is the fire sentence. Under 100 characters, ASCII, no newline. |
+| `box.subject.clear` | `carlos alert cleared: %s` | Same | `%s` is the clear sentence. |
+| `box.fire.disk` | `disk is %s full on %s` | Fire | Percent, then box. |
+| `box.fire.mem` | `memory use is %s on %s` | Fire | |
+| `box.fire.cpu` | `cpu use is %s on %s` | Fire | |
+| `box.fire.lag` | `mail relay lag is %d seconds on %s` | Fire | |
+| `box.fire.default` | `%s is firing on %s` | Fire for `disk_eta` and `engine_silent` | **This is the only text `engine_silent` and `disk_eta` have on the box:** "engine_silent is firing on box-1". Raw ID. Drafts: `disk on %s will be full in about %d hours` and `the alert engine on %s has stopped`. |
+| `box.clear.disk` | `disk is back to %s full on %s` | Clear | |
+| `box.clear.mem` | `memory use is back to %s on %s` | Clear | |
+| `box.clear.cpu` | `cpu use is back to %s on %s` | Clear | |
+| `box.clear.lag` | `mail relay lag is back to %d seconds on %s` | Clear | |
+| `box.clear.geoip` | `geoip on %s is back to normal` | Clear | |
+| `box.clear.default` | `%s has cleared on %s` | Clear for `disk_eta` and `engine_silent` | Raw ID. Drafts: `the disk forecast on %s no longer shows it filling` and `the alert engine on %s is running again`. |
+| `box.geoip.1` | `the geoip database on %s is more than 45 days old` | Fire for `geoip` code 1 | |
+| `box.geoip.2` | `the GeoLite2 database on %s expires within 9 days` | Same, code 2 | |
+| `box.geoip.3` | `the geoip database on %s has expired and was removed` | Same, code 3 | |
+| `box.geoip.4` | `%s has not loaded the published geoip database for over an hour` | Same, code 4 | |
+| `box.geoip.5` | `the geoip feed has failed 7 times in a row (seen from %s)` | Same, code 5 | |
+| `box.geoip.other` | `geoip needs attention on %s` | Same, any other code | |
+| `box.body.level` | `the alert level is %s.` | Body, for disk, mem, cpu, lag | `%s` is the threshold (a percent, or "N seconds"). "Level" here means the threshold; the console uses "level" for incident or warning. |
+| `box.body.sustain` | `it stayed above that level for %d minutes before this alert was raised.` | Body of a mem or cpu fire | |
+| `box.body.reported` | `this was reported at %s.` | Body | `%s` is a UTC time, such as 2026-10-31 14:05 UTC. |
+| `box.body.another` | `you will get another email when it clears.` | Body of every fire | **False in Slack.** Draft: "it will be reported again when it clears." Or leave the line out for Slack and keep it for SNS. The box has no way to tell the two apart today except the URL. |
+| `box.body.footer` | `rule: %s` and `box: %s` | Last two lines of the body | Raw rule ID. |
+| `new:box.todo.how_long` | (none today) | Body | Draft: a "how long you have" line per rule, the same as group 3. The box cannot read the console's `alertCopy`, so the text would be copied; reviewer decides whether that is acceptable. |
+| `new:box.todo.what_to_do` | (none today) | Body | Draft: a "what to do" line per rule, the same as group 3. Same question. |
+
+## 12. Box side: delivery log lines (not user text)
+
+Not in the deck. `agent: alerts: NO SINK CONFIGURED ...` and the other journal lines go to the journal only.
+
+## 13. `carlos status --live`
+
+From `cli.go` (`alertsWord`, `engineBeatWord`). Shown on each box's line in the live listing.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `status.alerts.none` | `-` | `alerts=` field | A box that predates the field. |
+| `status.alerts.notdelivered` | `not-delivered` | Same | No sink at all. |
+| `status.alerts.sinks` | `webhook`, `sns` or `webhook+sns` | Same | |
+| `status.alerts.snsunavailable` | `sns-unavailable` and ` (sns-unavailable)` | Same | The topic is set but its client could not be built. |
+| `status.alerts.webhookfailed` | ` (webhook failed %d)` | Same | `%d` is failures since the agent started. |
+| `status.alerts.snsfailed` | ` (sns failed %d)` | Same | |
+| `status.engine.on` | ` engine-beat=on` | Next to `alerts=`, on a console box | The engine_silent watch is armed. Absent on a box that runs no console. |
+| `status.engine.off` | ` engine-beat=off (%s)` | Same | `%s` is one of the next two reasons. |
+| `status.engine.why.root` | `agent runs as root` | Inside the brackets | The agent refuses to read a console-written file as root. A person reading this does not learn that the backstop is therefore off. Draft: `agent runs as root, so the backstop is off`. |
+| `status.engine.why.path` | `path is not absolute` | Inside the brackets | Draft: `CARLOS_ALERT_ENGINE_BEAT is not an absolute path`. |
+
+## 14. `/fleet/alerts` page and Connectors (new, drafts)
+
+The page is operator-only. Draft layout: page header, a Connectors section, a Rules section (group 15), and a link to History (group 16). The nav label comes from `opshell.go`: `Alerts`.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:nav.alerts` | `Alerts` | Operator nav, after Metrics | Fixed by the brief. |
+| `new:page.title` | `Alerts` | Page `<title>` and heading | |
+| `new:page.intro` | `Where fleet alerts go, which rules send them, and what has fired.` | Page header line | Matches the length and style of the other operator pages' header lines. |
+| `new:conn.heading` | `Connectors` | Section heading | |
+| `new:conn.help` | `A connector is a place alerts are sent. Add Slack, an email address or a webhook.` | Under the heading | |
+| `new:conn.empty` | `No connectors. Alerts are recorded but sent nowhere. Add one to receive them.` | Empty state | Possible once an operator deletes their own. |
+| `new:conn.col.name` | `Name` | Table header | |
+| `new:conn.col.kind` | `Kind` | Table header | |
+| `new:conn.col.target` | `Sent to` | Table header | |
+| `new:conn.col.status` | `Status` | Table header | |
+| `new:kind.slack` | `Slack` | Kind cell, form option | |
+| `new:kind.email` | `Email` | Kind cell, form option | |
+| `new:kind.webhook` | `Webhook` | Kind cell, form option | |
+| `new:conn.target.secret` | `%s, ends in %s` | Sent to cell for Slack and webhook | First `%s` is the host, such as hooks.slack.com, second the last four characters of the URL. Nothing more is shown. |
+| `new:conn.target.email` | `%s` | Sent to cell for email | `%s` is the address. |
+| `new:conn.status.on` | `On` | Status cell, a confirmed connector | |
+| `new:conn.status.unconfirmed` | `Waiting for confirmation` | Status cell | |
+| `new:conn.status.suspended` | `Suspended. Sending has failed since %s.` | Status cell | `%s` is a time. A test that gets through turns it back on. |
+| `new:conn.status.reentry` | `Enter the URL again` | Status cell | The key that opened it was lost. See `seal_key`. |
+| `new:conn.owner` | `Added for %s` | Note under the name of a seeded connector | `%s` is the operator's sign-in address. |
+| `new:conn.btn.test` | `Send test` | Button on each row | |
+| `new:conn.btn.delete` | `Delete` | Button on each row | |
+| `new:conn.delete.confirm` | `Delete %s? Alerts stop going there.` | Confirmation before delete | `%s` is the connector's name. |
+| `new:conn.add.heading` | `Add a connector` | Form heading | |
+| `new:conn.add.kind` | `Kind` | Form label | |
+| `new:conn.add.name` | `Name` | Form label | |
+| `new:conn.add.name.help` | `Shown in alerts and on this page. For example, ops channel.` | Help line | |
+| `new:conn.add.slack` | `Slack webhook URL` | Form label for Slack | |
+| `new:conn.add.slack.help` | `An incoming-webhook URL from Slack, starting with https://hooks.slack.com/. It is stored encrypted and is not shown again.` | Help line | |
+| `new:conn.add.webhook` | `Webhook URL` | Form label for webhook | |
+| `new:conn.add.webhook.help` | `An https URL on port 443. It is stored encrypted and is not shown again. Each alert is sent as signed JSON, and the receiver must answer with a 2xx status.` | Help line | |
+| `new:conn.add.email` | `Email address` | Form label for email | |
+| `new:conn.add.email.help` | `We send a confirm link first. Nothing else goes to the address until it is clicked.` | Help line | |
+| `new:conn.btn.add` | `Add connector` | Submit button | |
+| `new:conn.added.slack` | `Added. A test message with a confirm link is on its way to Slack. Open the link in Slack to turn this connector on.` | Confirmation after adding Slack | |
+| `new:conn.added.webhook` | `Added. The signed test was sent and the webhook answered, so this connector is on.` | Confirmation after adding a webhook that answered 2xx | |
+| `new:conn.added.webhook.failed` | `Added, but the test did not get through (%s). It stays off until a test does.` | After adding a webhook that failed | `%s` is a send category from group 9. |
+| `new:conn.added.email` | `Added. A confirm link is on its way to %s. Nothing else is sent there until it is clicked.` | Confirmation after adding email | `%s` is the address. |
+| `new:conn.tested` | `Test sent to %s.` | Confirmation after "Send test" | `%s` is the connector's name. |
+| `new:conn.test.unconfirmed` | `This address is not confirmed yet. Open the confirm link we sent to %s.` | Refusal of a repeated test on an unconfirmed email | `%s` is the address. Replaces the raw `errAlertTestUnconfirmed`. |
+| `new:conn.test.limit` | `At most 10 tests an hour for one connector. Try again later.` | Refusal | |
+| `new:conn.test.reentry` | `Enter this connector's URL again before testing it.` | Refusal | |
+| `new:conn.test.failed` | `The test did not get through (%s).` | Failure | `%s` is a send category. |
+| `new:conn.deleted` | `Deleted %s.` | Confirmation after delete | |
+| `new:conn.err.name` | `Give the connector a name.` | Validation error | |
+| `new:conn.err.email` | `Enter a valid email address.` | Validation error | |
+| `new:conn.err.kind` | `Choose Slack, email or webhook.` | Validation error | |
+| `new:conn.err.confirmlimit` | `Too many confirmation emails. Try again later.` | Rate limit on adding email or retesting | Spec §5.3: 5 an hour and 20 a day. Say the numbers? |
+| `new:conn.key.heading` | `Webhook signing key` | Section heading | |
+| `new:conn.key.help` | `Each webhook alert carries a Carlos-Signature header, signed with the key below. Receivers check it with this public key. It is also served as plain text at %s.` | Help line | `%s` is the console's `/alerts/signing-key` URL. |
+| `new:conn.key.label` | `Public key (Ed25519, base64)` | Label above the key | |
+
+## 15. Rules (new, drafts)
+
+One row per rule on `/fleet/alerts`. Box rules show their thresholds read-only, with the variable name. Console rules (`box_silent`, `cert_expiring`) have an editable threshold. Avoid a literal digit-then-percent in the template (`TestAppPageOwnerMetricsBoundary`).
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:rules.heading` | `Rules` | Section heading | |
+| `new:rules.help` | `Each rule watches one thing across the fleet. Pick where its messages go, or leave it on all confirmed connectors.` | Under the heading | |
+| `new:rules.col.rule` | `Rule` | Table header | |
+| `new:rules.col.level` | `Level` | Table header | |
+| `new:rules.col.when` | `Fires when` | Table header | |
+| `new:rules.col.threshold` | `Threshold` | Table header | |
+| `new:rules.col.sendto` | `Sent to` | Table header | |
+| `new:rules.col.noise` | `Last 30 days` | Table header | Spec §6.6. |
+| `new:rules.col.state` | `State` | Table header | |
+| `new:rules.level.incident` | `Incident` | Level cell | Spec §5.2: something is broken now. |
+| `new:rules.level.warning` | `Warning` | Level cell | Spec §5.2: something will break, or is degraded. |
+| `new:rules.level.help` | `Incident means something is broken now. Warning means something will break, or is degraded.` | Help line under the table | |
+| `new:rules.when.disk_eta` | `A box's disk is on course to fill within the threshold, and has been for 2 hours.` | "Fires when" cell | |
+| `new:rules.when.disk` | `A box's disk use is over the threshold.` | Same | |
+| `new:rules.when.mem` | `A box's memory use is over the threshold for 10 minutes.` | Same | |
+| `new:rules.when.cpu` | `A box's processor use is over the threshold for 15 minutes.` | Same | |
+| `new:rules.when.lag` | `A box's mail relay is behind by more than the threshold.` | Same | |
+| `new:rules.when.geoip` | `A box's location database is old, expiring, not loading or failing to update.` | Same | |
+| `new:rules.when.engine_silent` | `The alert engine has not run for 10 minutes. Only the console box reports this.` | Same | |
+| `new:rules.when.box_silent` | `A box has not reported for longer than the threshold.` | Same | |
+| `new:rules.when.service_down` | `A platform service is reported down.` | Same | |
+| `new:rules.when.cert_expiring` | `A served host's certificate expires within the threshold.` | Same | |
+| `new:rules.when.alert_delivery_broken` | `A box has no place to send its own alerts.` | Same | |
+| `new:rules.when.seal_key` | `The console cannot open the key for Slack and webhook connectors, or a connector needs its URL entered again.` | Same | |
+| `new:rules.th.disk` | `Default 90. Each box can set CARLOS_ALERT_DISK_PCT in its host.env.` | Threshold cell, read-only | Default is `DefaultRules`: disk 90, memory 90, CPU 95, all percents. |
+| `new:rules.th.mem` | `Default 90. Each box can set CARLOS_ALERT_MEM_PCT in its host.env.` | Same | |
+| `new:rules.th.cpu` | `Default 95. Each box can set CARLOS_ALERT_CPU_PCT in its host.env.` | Same | |
+| `new:rules.th.disk_eta` | `Default 72 hours. Each box can set CARLOS_ALERT_DISK_ETA_HOURS in its host.env.` | Same | |
+| `new:rules.th.lag` | `Fixed at 900 seconds. Not configurable.` | Same | There is no override. |
+| `new:rules.th.geoip` | `Fixed. Not configurable.` | Same | |
+| `new:rules.th.engine_silent` | `Fixed at 10 minutes. Not configurable.` | Same | |
+| `new:rules.th.readonly` | `Set on each box, not here.` | Note under every read-only threshold | Spec §5.2: console settings are not sent to boxes. |
+| `new:rules.th.none` | `No threshold.` | Threshold cell | For `service_down`, `alert_delivery_broken`, `seal_key`. |
+| `new:rules.th.box_silent` | `Silent after (minutes)` | Label of the editable field | Default 15. |
+| `new:rules.th.cert_expiring` | `Warn when a certificate expires within (days)` | Label of the editable field | Default 14. |
+| `new:rules.th.save` | `Save` | Button | |
+| `new:rules.th.saved` | `Saved.` | Confirmation | |
+| `new:rules.th.err` | `Enter a whole number from %d to %d.` | Validation error | The bounds are Task 10's choice; not stated in the brief. |
+| `new:rules.sendto.all` | `All confirmed connectors` | Sent-to cell when none is picked | |
+| `new:rules.sendto.help` | `Pick connectors, or leave all unticked to send to every confirmed connector.` | Help line | |
+| `new:rules.state.on` | `On` | State cell | |
+| `new:rules.state.off` | `Off` | State cell | |
+| `new:rules.state.offhelp` | `A rule that is off still records incidents in History but sends nothing.` | Help line | Matches the engine: a disabled rule queues nothing. |
+| `new:rules.noise` | `Fired %d times. Cleared within 10 minutes %d times.` | Last 30 days cell | First `%d` is fires, second clears within 10 minutes. Spec §6.6, so a noisy rule is easy to spot. |
+| `new:rules.saved.rule` | `Saved.` | Confirmation after changing connectors or state | |
+
+## 16. History (new, drafts)
+
+The last 200 incidents, newest first, at `/fleet/alerts/history`. Each row has an anchor `incident-N`, which the "See the incident" link opens.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:hist.heading` | `History` | Page heading | |
+| `new:hist.intro` | `The last 200 incidents, newest first.` | Page header line | |
+| `new:hist.empty` | `No incidents yet. History starts when the first alert fires on this console.` | Empty state | Spec §10.1: no backfill. |
+| `new:hist.col.rule` | `Rule` | Table header | |
+| `new:hist.col.affected` | `Affected` | Table header | |
+| `new:hist.col.level` | `Level` | Table header | |
+| `new:hist.col.opened` | `Opened` | Table header | |
+| `new:hist.col.state` | `State` | Table header | |
+| `new:hist.state.open` | `Open for %s` | State cell, an open incident | `%s` is a duration. |
+| `new:hist.state.flapping` | `Open, flapping` | State cell | Fired and cleared 3 times in an hour. Stays one incident until it has been clear for an hour. |
+| `new:hist.state.cleared` | `Cleared after %s` | State cell, close reason "cleared" | `%s` is how long it was open. |
+| `new:hist.state.gone` | `No further reports after %s` | State cell, close reason "box gone" | Same wording as the clear message. |
+| `new:hist.state.duplicate` | `Closed as a duplicate` | State cell, close reason "duplicate" | Never messaged. |
+| `new:hist.affected.many` | `%d boxes: %s` | Affected cell with several members | `%d` is the count, `%s` the names. Draft: "boxes" is wrong for hosts and services; the reviewer picks a neutral word. |
+| `new:hist.limit` | `Older incidents are not shown.` | Note under the table, when 200 are shown | |
+| `new:hist.back` | `Back to Alerts` | Link | |
+
+## 17. Public doors (new, drafts)
+
+Reached from an emailed or posted link. Anyone holding the link can open the page. A GET only shows a page with a button; the POST acts, so a link scanner does nothing. The page has no operator chrome.
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:door.title` | `CARLOS alerts` | Page `<title>` and a small heading on every door | |
+| `new:door.scanner` | `Opening this link does nothing by itself. Press the button to go ahead.` | Under the button on every confirm page | Explains the extra step. |
+| `new:door.confirm.heading` | `Confirm alerts to %s` | Confirm page heading | `%s` is the connector's name or address. |
+| `new:door.confirm.body` | `Press Confirm to start receiving CARLOS alerts here. Until then, nothing is sent.` | Confirm page | |
+| `new:door.confirm.btn` | `Confirm` | Button | |
+| `new:door.confirm.done` | `Confirmed. Alerts now go to %s.` | After the POST | |
+| `new:door.confirm.used` | `This link has been used already. Alerts to %s are on.` | Reusing a confirm link | One use. |
+| `new:door.unsub.heading` | `Stop alerts to %s` | Unsubscribe page heading | |
+| `new:door.unsub.body` | `This turns off this connector. Nothing more is sent to it. Other connectors are not changed. An operator can add it again from the Alerts page.` | Unsubscribe page | The link turns off the whole connector, not one rule. |
+| `new:door.unsub.btn` | `Stop alerts` | Button | |
+| `new:door.unsub.done` | `Stopped. Nothing more will be sent to %s.` | After the POST | Same on a repeat: it is idempotent. |
+| `new:door.snooze.heading` | `Snooze %s on %s` | Snooze page heading | First `%s` is the rule name (group 2), second the box, host or service. Applies to that rule on that subject only. |
+| `new:door.snooze.choose` | `How long should this stay quiet?` | Snooze page, when the link has no `for` | Open question for Task 10: the message's link carries no `for`, so this page must offer the three lengths. |
+| `new:door.snooze.1h` | `1 hour` | Length option | |
+| `new:door.snooze.1d` | `1 day` | Length option | |
+| `new:door.snooze.1w` | `1 week` | Length option | |
+| `new:door.snooze.body` | `No messages about this for %s, counted from now. Using the link again starts the time from that moment. It does not add to it. The incident still shows in History.` | Snooze confirm page | `%s` is a length. |
+| `new:door.snooze.btn` | `Snooze for %s` | Button | `%s` is a length. |
+| `new:door.snooze.done` | `Snoozed until %s.` | After the POST | `%s` is a time. |
+| `new:door.err.invalid` | `This link is not valid. It may be mistyped or cut off.` | Unknown or tampered token | |
+| `new:door.err.expired` | `This link has expired. Ask an operator to send a new one from the Alerts page.` | Expired token | Confirm links last 7 days and snooze links 30. |
+| `new:door.err.action` | `This link cannot be used on this page.` | A token for another action | |
+| `new:door.err.duration` | `That length is not offered. Choose 1 hour, 1 day or 1 week.` | Snooze `for` not 1h, 1d or 1w | |
+| `new:door.err.rate` | `Too many tries. Wait a few minutes and try again.` | Rate-limited confirm | |
+| `new:door.err.gone` | `The connector for this link no longer exists.` | Token for a deleted connector | |
+
+## 18. Signing key page (new, drafts)
+
+| key | current | where it shows | notes |
+|---|---|---|---|
+| `new:key.body` | the public key alone: one line of base64, then a newline | `/alerts/signing-key`, `text/plain` | Recommended: no prose on this URL, so a receiver can fetch it directly. The explanation lives on the connector page (`new:conn.key.help`). |