Fleet alerts Plan 2: Astra plan review brief R3 (last round)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+100
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-2-plan-R3.md+100 −0
CI passed — run details
Intent
Attributed to this commit: 36.8 g CO₂e (4,082,544 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on fleet-alerts-2-traffic, 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-2-plan-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-2-plan-R3.md| new file mode 100644 |
| index 000000000..4a1eb8c02 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-alerts-2-plan-R3.md |
| @@ -0,0 +1,100 @@ |
| +# Review brief: fleet alerts Plan 2 (fleet traffic) plan, round 3 of 3 |
| + |
| +Repo carlos/platform, branch `fleet-alerts-2-traffic`. The commit is named in the reviewer's prompt. |
| +Under review: `docs/superpowers/plans/2026-11-01-fleet-alerts-2-traffic.md` (rev 3). |
| +Authorities, all MERGED on main: |
| +- `docs/superpowers/specs/2026-10-30-fleet-alerts-and-traffic-design.md`, APPROVED. Plan 2 is §11 item 2, with §10, §9, §7.2 and the two Plan 2 rows of §7.1. |
| +- `docs/superpowers/plans/2026-10-30-fleet-alerts-1-engine-connectors.md` (rev 4, merged 27173ed), and the engine code it built in `internal/console/alert*.go`. |
| +- `AGENTS.md`. |
| + |
| +Do not review against unmerged branches. If this work needs one, say so as a P1 and stop. |
| + |
| +You are an independent reviewer. Read the plan, then the code it names, and check every claim against that code. Line numbers were taken at 11c8c864. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- **Paul's rulings of 2026-11-01**, after stopping rule 2 fired at R2 (spec §2 items 9 and 10, discussion 497): |
| + 1. `fleet_5xx` and `abuse_surge` are self-closing events. Each opens when its threshold is crossed and closes after an hour without another crossing, saying "no further reports". Missing data never produces a clear. |
| + 2. Every answer is counted once, on the box the visitor connected to, by its final status. |
| + |
| + Report only mechanisms that fail to honour these rulings. Don't re-argue the rulings themselves, or the loss of hysteresis for these two rules. |
| + |
| +- **Paul's rulings in spec §2:** layout A, four tiles; noise is the anti-goal; order engine, then traffic, then account and app alerts. |
| +- **Spec §9:** no new bucket objects, and the counters ride the heartbeat. Reading the usage edge day instead is out. |
| +- **Plan 1 build rulings** (amadan discussion 495), especially: |
| + - R-25: the 24 h heartbeat listing horizon. |
| + - R-41: no unconditional fallbacks after conditional-read errors. |
| + - R-17: incident `Members` are the members firing now. |
| +- **The author's calls, which are not defects unless they break the spec:** |
| + - Daily bars for the 30 d range. |
| + - No region filter in v1. |
| + - Busiest apps not linked, since no operator app view exists. |
| + - Capacity omits "region has no room" until that rule is on the engine. |
| + - Rate refusals counted enforced and observed apart. |
| + - Unknown hosts counted only at the outsider call sites. |
| + |
| +Report only mechanisms that fail to honour these. |
| + |
| +## What to check |
| + |
| +1. **Counted once and agreeing with `/fleet/protection`.** |
| + - The edge choke points named in Task 2 (`internal/edge/edge.go` observer defer, `assetcatch.go` `serveAssetFar` defer, `guard.go` `observeGuardCount`, `ratelimit.go`, `planthrottle.go`, `answered.go`): does every answered request land in exactly one of Refused or a class? |
| + - Are hopped, backhauled, tunnelled and far-asset requests each counted once fleet-wide? |
| + - Do Blocked and Watched equal the usage meter's guard counts? |
| + - Does the `outcome` really reach `rateAdmit` and `planThrottleAdmit` on every path that can refuse? |
| +2. **Hostile input.** Unknown hostnames, paths and every heartbeat field are box- or attacker-controlled. |
| + - Are the edge key caps, the heartbeat size, the console sanitising and the template escaping enough? |
| + - Can one box's heartbeat poison fleet sums, for example with huge counts, forged starts, or a label collision? |
| +3. **Gaps and evaluation timing.** Heartbeats are written every 5-6 min with jitter, and the engine reads them every 5th one-minute pass. |
| + - Are the `fleet_5xx` windows (`cur-20m..cur-10m`) and the `abuse_surge` windows reliably present when evaluated? |
| + - Does "not complete" hold state without Gone or a false clear, given `withGone` and `keepMissing` in `internal/console/alertsignals.go`? |
| + - Is the hysteresis via `AlertFiring` consistent with how `stepIncidents` (`alertengine.go`) treats Firing? |
| +4. **Request budget.** Does anything in Tasks 3-5 add a store call (`TestEnginePassFiveCycleRequests`)? |
| +5. **Tiles and alerts never disagree** (spec anti-goal "Contradiction"). Is the tile state read from the same incidents the engine opens? Do the tile rule IDs match `alertRuleLevels`? |
| +6. **Buildability.** |
| + - Would each task's named interfaces compile against the code as it is? Check `Probes`, the `BoxMetrics` attach condition, the `agent.go` edge-ready callback, `outcomeFrom`, `alertThreshold`, `alertRuleOrder` and the record-write census selection at `internal/provision/plan9_b8_census_test.go:369`. |
| + - Are the registry and perf tests a new operator route moves listed? |
| +7. **Census.** Is anything in Tasks 1-3 a new root read, beyond "body" changes? |
| +8. **Proportion.** Is anything here more than the spec asks for Plan 2? Is anything the spec asks for missing (§10.1 fields, §10.3 page parts, §7.1 Plan 2 rules, §13 tile test)? |
| + |
| +## Round 3 |
| + |
| +Earlier rounds: |
| +- `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-2-plan-R1.md` (4 P1s, 1 P2) |
| +- `docs/superpowers/reviews/CODEX-FINDINGS-fleet-alerts-2-plan-R2.md` (4 P1s, 1 P2) |
| + |
| +This is the last round. First give one line per P1 and P2 from round 2: resolved, partly, or not. The plan's "R2 dispositions" say how each was addressed: most were removed by Paul's rulings. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings. |
| + |
| +Check hardest: |
| +- the ingress wrapper and its skip predicate (`acceptHop`, `fromTunnel`, door callers, the status host, the tunnel hostname, the store door). Does every client answer reach exactly one wrapper fleet-wide? Does no internal call count? |
| +- classifying a refusal across the hop (429, or 404 with `X-Carlos-Ref`) |
| +- the self-closing judging over the last hour, through `withGone` and `stepIncidents` |
| +- the abuse baseline's partial-hour predicate |
| + |
| +## 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, and is 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 |
| + |
| +Rank findings P1, then P2, then P3. Each finding 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 (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. |
| + |
| +In round 3, a NOT READY also says whether the P1s share one cause, and whether refusing the case up front or cutting the feature would remove them. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites. |