carlos / platform Public

Astra review brief: fleet alerts Plan 1, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 84997183390cc068c97dd7e47607bcbc8d0ae392 parent 03d8a26
1 file changed, +95 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan.md +95 −0

CI failed — run details

Intent

Attributed to this commit: 44.3 g CO₂e (3,362,327 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/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan.md
new file mode 100644
index 000000000..454e52ca3
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-1-plan.md
@@ -0,0 +1,95 @@
+# Review brief: fleet alerts Plan 1 (engine, connectors, fleet rules) and its spec, round 1 of 3
+
+Repo carlos/platform, branch `design-fleet-alerts`, commit: this brief's parent (tip 03d8a26b before this brief).
+
+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?
+
+## 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.