carlos / platform Public

plan: probe-burst limit rev 2 (Astra plan R1: 3 P1 + 4 P2 fixed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev f128c9532f941c80ca292856f0aa252c1c42cc06 parent a3e2b8e
2 files changed, +91 −10
  • docs/superpowers/plans/2026-10-31-probe-burst-limit.md +20 −10
  • docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md +71 −0

CI passed — run details

diff --git a/docs/superpowers/plans/2026-10-31-probe-burst-limit.md b/docs/superpowers/plans/2026-10-31-probe-burst-limit.md
index b9ba56ffe..2daab0ab8 100644
--- a/docs/superpowers/plans/2026-10-31-probe-burst-limit.md
+++ b/docs/superpowers/plans/2026-10-31-probe-burst-limit.md
@@ -10,6 +10,8 @@
**Spec:** `docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md` (rev 2, approved by Paul 2026-10-31), building on §5.5 of `docs/superpowers/specs/2026-10-24-edge-request-protection-design.md`. Read both.
+**Review history:** plan rev 1 Astra R1 NOT READY (3 P1: verdict precedence, record-only on far asset edges, CLI read; 4 P2: API serial bump, per-counter bound, slow-peer isolation, trip reference). Rev 2 fixes all seven (`CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md`). Two rounds remain.
+
## Global Constraints
- Threshold 60 not-founds in 60 s per app and client; cool-down 10 minutes; client key `ratelimit.ClientKey(clientIP(r))` (/32 IPv4, /64 IPv6).
@@ -17,9 +19,10 @@
- During a cool-down, refuse only requests to catalogue paths (`edgeguard.Check` hit, any group incl. admin) the app is not known to serve. Known to serve today = a static site's file exists (or `_redirects` names the path), the check `serveTree` already makes.
- Watch first: the burst rule's catalogue mode is watch. `CARLOS_EDGE_PROTECT=block` (dev) refuses for real. Promotion to block is a later one-line change on Paul's approval, not in this plan.
- Fleet apps (forward routes, and anything delivered `viaTunnel`) are never refused by the burst limit in v1, only recorded.
+- **Verdict precedence (one rule, one place):** a request still has one verdict, but a verdict that does not block is replaced by a later candidate that blocks; a blocking verdict is never replaced. Among non-blocking candidates the first stands. So a burst watch (or a fleet or record-only exemption) never weakens a hard or probe block, and the static resolved-file hard check still runs after a burst watch. `guardDecide` and `burstDecide` both go through `func decideVerdict(st *guardState, v *guardVerdict) (applied bool)`.
- An app with the record-only switch on is never refused by any protection (hard, probe, burst); matches are still recorded and counted as recorded.
- Only boxes holding the mesh key send or accept notices. Notices: signed, timestamp within `hopSkew` (30 s), bound to the receiving box's name, expiry in the future and at most 10 minutes ahead, client a canonical /32 or /64. Sender cap 120 notices/minute/box; receiver cap 600/minute; overflow counted, never silent. No retry; sending never blocks serving.
-- Bounds: 100,000 counters and 50,000 cool-downs per box, oldest evicted first, evictions counted.
+- Bounds: 100,000 counters and 50,000 cool-downs per box, oldest evicted first, evictions counted; each counter holds at most the last 60 timestamps (a fixed ring), and a client already cooling is not counted at all, so memory is independent of request volume.
- No storage writes on the request path or per trip; no new polling. Provider-neutral.
- A received notice is logged only to the box's operator log (`log.Printf`, capped), never to a tenant's records. A refusal record says the cool-down came from "this app" or "another app on the platform" and never names another app.
- Copy: every visitor- or console-facing string from the approved deck (Task 1), verbatim, no em dashes. Record field values and operator log lines are not copy.
@@ -79,13 +82,13 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
- Produces:
- Constants `burstThreshold = 60`, `burstWindow = 60 * time.Second`, `burstCooldown = 10 * time.Minute`, `burstMaxCounters = 100_000`, `burstMaxCooldowns = 50_000`.
- `type burstLimiter struct` (mutex-guarded), `func newBurstLimiter(now func() time.Time) *burstLimiter`.
- - `func (b *burstLimiter) note(app string, client netip.Prefix) (tripped bool, until time.Time)`: counts one not-found for (app, client) in a sliding 60 s window; on reaching the threshold starts a cool-down for client (box-wide) unless one is already running, and reports a trip only then.
+ - `func (b *burstLimiter) note(app string, client netip.Prefix) (tripped bool, until time.Time)`: a no-op for a client already cooling; otherwise records one not-found for (app, client) in a fixed ring of the last 60 timestamps, and trips when the ring is full and its oldest entry is within 60 s: starts a box-wide cool-down and clears that client's counters.
- `func (b *burstLimiter) cooling(client netip.Prefix) (until time.Time, from string, ok bool)`: `from` is the app key that tripped locally, or `""` for a notice.
- `func (b *burstLimiter) apply(client netip.Prefix, until time.Time) bool`: from a notice; refuses `until` not after now or more than `burstCooldown` ahead; a later `until` never shortens an existing one; never reports a trip.
- `func (b *burstLimiter) stats() burstStats` with `CountersEvicted, CooldownsEvicted int64`.
- Expired entries are dropped lazily; at the caps the oldest entry is evicted and counted.
-- [ ] **Step 1: Failing tests** with an injected clock: `TestBurstTripsAt60InAWindow` (59 notes no trip, 60th trips, 61st no second trip); `TestBurstWindowSlides` (60 notes spread over 61 s never trip); `TestBurstCountsPerApp` (30 on app A + 30 on app B never trip); `TestBurstCooldownIsBoxWide` (trip on A, `cooling` true for the client regardless of app, `from` = A); `TestBurstCooldownExpires` (false after 10 min); `TestBurstApplyBounds` (until in the past, or 10 min + 1 s ahead: refused; a shorter until never shortens); `TestBurstBoundsEvictOldest` (with caps lowered via unexported vars: oldest evicted, counted).
+- [ ] **Step 1: Failing tests** with an injected clock: `TestBurstTripsAt60InAWindow` (59 notes no trip, 60th trips, 61st no second trip); `TestBurstWindowSlides` (60 notes spread over 61 s never trip); `TestBurstCountsPerApp` (30 on app A + 30 on app B never trip); `TestBurstCooldownIsBoxWide` (trip on A, `cooling` true for the client regardless of app, `from` = A); `TestBurstCooldownExpires` (false after 10 min); `TestBurstApplyBounds` (until in the past, or 10 min + 1 s ahead: refused; a shorter until never shortens); `TestBurstBoundsEvictOldest` (with caps lowered via unexported vars: oldest evicted, counted); `TestBurstSingleKeyFloodBounded` (1,000,000 notes for one app and client allocate no more than one ring; notes during a cool-down are no-ops).
- [ ] **Step 2:** Run `go test ./internal/edge/ -run TestBurst`. Expected: FAIL (undefined).
- [ ] **Step 3:** Implement. One map of counters keyed by app and prefix holding timestamps or a ring per window (builder's choice within the caps), one map of cool-downs.
- [ ] **Step 4:** Run again. Expected: PASS.
@@ -105,10 +108,11 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
- Produces:
- `edgeguard.BurstRule *Rule`: `ID "burst.probe-burst.cooldown"`, `Group "probe-burst"`, `Tier reqrec.TierBurst`, `Mode ModeWatch`. `RuleByID` and `RuleByHash` find it; it is not in `catalogue.txt` and `Check` never returns it.
- `Edge.burst *burstLimiter` built in `newEdge`.
- - `guardState` gains `recordOnly bool` (Task 5 sets it; false until then) and `guardMode.blocks` is not consulted when `recordOnly`: `guardDecide` never blocks then.
+ - `guardState` gains `recordOnly bool` (Task 5 sets it; false until then) and `guardMode.blocks` is not consulted when `recordOnly`: nothing blocks then.
+ - `func decideVerdict(st *guardState, v *guardVerdict) (applied bool)`: the Global Constraints precedence rule; `guardDecide` and `burstDecide` both call it, and only an applied blocking verdict writes a response.
- `func burstDecide(w http.ResponseWriter, r *http.Request, until time.Time, from string, fleet bool) (served bool)`: sets the verdict to `BurstRule` (one verdict per request, as `guardDecide`), with the cool-down fields; refuses (429, `Retry-After` = remaining seconds rounded up, `X-Carlos-Ref`, `Cache-Control: no-store`, body PB-C01 with the code) only when the mode blocks `BurstRule`, the state is not record-only and `fleet` is false.
- `reqrec.Match` gains `CooldownFrom string` (`"this app"` or `"another app on the platform"`) and `CooldownUntil time.Time`, written as fields `cooldown_from` and `cooldown_until` (RFC 3339) only for tier burst.
- - `reqrec.KindTrip = "trip"` and `func (r *Recorder) Trip(t Trip)` with `type Trip struct { Response; Until time.Time }`, one record (message `trip burst <client prefix> until <rfc3339>`), at most 10 per app per minute.
+ - `reqrec.KindTrip = "trip"` and `func (r *Recorder) Trip(t Trip)` with `type Trip struct { Response; Until time.Time; Ref string }`, one record (message `trip burst <client prefix> until <rfc3339>`) with fields `kind=trip`, `tier=burst`, `rule=burst.probe-burst.cooldown`, `ref`, `cooldown_until`, at most 10 per app per minute. The trip's code is minted once at the trip site with `e.mintRef(reqrec.TierBurst, BurstRule.ID)` and the same value goes to `Recorder.Trip` and to the notices.
- Placement:
- **Check.** In ServeHTTP where the guard runs (edge.go, the `out.guard != nil` block): if the client is cooling and `edgeguard.Check(path, query)` hits, call `burstDecide` *before* `guardDecide` for non-static routes. For a static route served locally, a hard-tier hit (`CheckTier(..., TierHard)`) is decided by `burstDecide` in edge.go before `guardDecide`, since the hard tier refuses even existing files (protection spec ruling 7); a probe-tier decision moves to `serveTree`'s probe point (static.go): when the path is not found and the client is cooling and the path hits, `burstDecide` there; an existing file is never refused. `fleet` is true for forward routes and `viaTunnel` requests.
- **Count.** In the observer defer, after `observeGuardCount`: when `out.guard != nil`, the request has no `Sec-Fetch-Mode` header, and it is a not-found by the Global Constraints rule, call `e.burst.note(appKey, client)`; on a trip, `Recorder.Trip` and Task 4's `e.sendBurstNotices(client, until, ref)`. `serveAssetFar`'s defer counts the same way under its records condition and never refuses.
@@ -124,6 +128,8 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
- `TestBurstAdminCountsOnlyOn404`: `/admin` answered 200 by the app never counts; answered 404 counts.
- `TestBurstFleetAppNeverRefused`: forward route in block mode: recorded, forwarded.
- `TestBurstOneVerdictPerRequest`: a cooling client's `/.env` gets exactly one Match record and one Protection count.
+ - `TestBurstWatchNeverWeakensABlock` (R1-1): block mode, cooling client, `/.env` on a fleet forward route: the hard rule blocks (404 block page), not a burst watch; and a static rewrite to `/.env` is still blocked after a burst watch on the request path.
+ - `TestBurstTripRefFindsItsRecord`: the trip's code resolves through the console's edge-ref lookup to the trip record.
- In `internal/edgeguard`: `TestBurstRuleLookups` (`RuleByID`, `RuleByHash` find it; `Check` never returns it). In `internal/reqrec`: `TestTripRecordAndCap`, `TestBurstMatchCooldownFields`.
- [ ] **Step 2:** Run `go test ./internal/edge/ ./internal/edgeguard/ ./internal/reqrec/ -run 'Burst|Trip'`. Expected: FAIL.
- [ ] **Step 3:** Implement per Interfaces and Placement; add PB-C01 to `burstCopyBuilt` (the body literal lives in `burst_refusal.go`).
@@ -144,7 +150,7 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
- Produces:
- Wire: `POST /.carlos/burst-notice` on the receiving edge's public listener, `Host` = a host the receiver serves (any key of its edges file's `Hosts`, the lowest in sort order that has no `*`), header `X-Carlos-Burst-Auth: <unix>:<hex>`, JSON body `{"client":"203.0.113.7/32","until":<unix seconds>,"from":"<sender box>","ref":"<trip ref>"}` at most 512 bytes.
- MAC: HMAC-SHA256 under the mesh signing key over `"carlos-burst-notice\x00" + receiverBox + "\n" + ts + "\n" + body`; verify under current or next key (`meshKeys()`), timestamp within `hopSkew`.
- - `func (e *Edge) sendBurstNotices(client netip.Prefix, until time.Time, ref string)`: for every edges-file box other than `e.box` with a non-empty dial address (`edgesfile.Reader.Dial`, as `foldHomes` does) and a servable host, enqueue one notice; a bounded queue drained by one goroutine using `e.backhaulTransport(dial)`; cap 120 per minute; overflow and send failures counted and logged via `logThrottled` with a fixed key; no retry. No mesh key: sends nothing.
+ - `func (e *Edge) sendBurstNotices(client netip.Prefix, until time.Time, ref string)`: for every edges-file box other than `e.box` with a non-empty dial address (`edgesfile.Reader.Dial`, as `foldHomes` does) and a servable host, enqueue one notice on that peer's own bounded queue (64), drained by that peer's own goroutine, so a slow peer never delays another; each send uses `e.backhaulTransport(dial)` with a notice-specific total deadline of 3 s, reads and closes the response body, is signed at dispatch (not at enqueue), and is dropped unsent if its expiry has passed; cap 120 trips per minute box-wide; overflow, expiry drops and send failures counted and logged via `logThrottled` with a fixed key; no retry. No mesh key: sends nothing. Peers that leave the edges files have their goroutine stopped.
- `func (e *Edge) serveBurstNotice(w http.ResponseWriter, r *http.Request) bool`: intercepted in ServeHTTP after `acceptHop` and before route lookup, for `POST` with path `/.carlos/burst-notice` and the auth header present. Answers 204 on apply, 404 on anything it refuses (no key, bad MAC, stale ts, wrong receiver, bad body, client not a canonical /32 or /64, expiry out of bounds, over the 600/minute cap), counting each refusal reason; logs an accepted notice to the operator log through a capped logger, never to tenant records. Never re-sends.
- A request with that path but no auth header falls through to the app as today.
@@ -154,6 +160,7 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
- `TestBurstNoticeNoKeyNoSendNoAccept`: an edge with no mesh key sends nothing and refuses every notice (the fleet box case).
- `TestBurstNoticeCaps` (Review Focus 3): 130 trips in a minute send 120 and count 10; 610 notices received apply 600 and count 10.
- `TestBurstNoticePathWithoutAuthReachesApp`: `POST /.carlos/burst-notice` without the header is proxied to the app.
+ - `TestBurstNoticeSlowPeerIsolated` (R1-6): one peer that never answers and one healthy peer: the healthy peer applies within 1 s; the stalled send gives up at 3 s and is counted.
- `TestBurstNoticeIsNotAHop`: a valid hop signature or door signature in the burst header is refused (domain separation).
- [ ] **Step 2:** Run `go test ./internal/edge/ -run BurstNotice`. Expected: FAIL.
- [ ] **Step 3:** Implement.
@@ -167,17 +174,20 @@ Draft rows (`where` relative to the repo root's owning package; the review may c
**Files:**
- Modify: `internal/telemetry/telemetry.go`, `internal/host/telemetry_pass.go`, `internal/host/agent.go` (wiring), `internal/edge/guard.go` and `internal/edge/edge.go` (switch map), `internal/console/protectionview.go`, `internal/console/templates/app_protection.html`, `internal/console/server.go` (route), `internal/console/apierrors.go` (API accepts it)
- Create: `protection_cmd.go` (root package, the CLI), `internal/console/protectionsetting.go`
+- Modify also: `main.go` (dispatch), `apimode.go` (`telemetryGet`), `internal/console/authcli.go` (GET route), the CLI docs page the docsite gate reads, `internal/edge/assetcatch.go` (record-only on the far guard)
- Test: `internal/telemetry/telemetry_test.go`, `internal/host/telemetry_pass_test.go`, `internal/edge/burst_edge_test.go`, `internal/console/protectionsetting_test.go`, `protection_cmd_test.go`
**Interfaces:**
- Produces:
- `telemetry.Protection struct { Mode string \`json:"mode,omitempty"\` }`; `Settings.Protection *Protection \`json:"protection,omitempty"\``; `const ProtectRecordOnly = "record"`; `Resolved.RecordOnly bool` (app scope only: *plan's call*, the switch is per app, the account level is not read).
- The telemetry pass also builds `map[string]bool` of record-only apps (same key `RouteAccount/App`) and hands it to a second sink `setProtectionSink(fn func(map[string]bool))`, wired to `e.SetProtectionRecordOnly`. A failed read keeps the app's last known value (never flips it on or off by error).
- - `func (e *Edge) SetProtectionRecordOnly(m map[string]bool)`; `newGuardState(rt)` sets `recordOnly` from it.
- - Console: `POST /a/{sqid}/apps/{app}/protection/setting` (`handleAppProtectionSetting`), the analytics setting's flow exactly: CSRF, owner only (else 404), `updateAppTelemetry(..., "protection-setting", fn)`, audit, `bumpSerial`, flash PB-C08/PB-C09, redirect to the tab. `handleAPITelemetryPut` accepts `protection.mode` (`"record"` or `""`) with the same owner rule. Add the route to the claim route inventory the way 1ec8c129 did.
+ - `func (e *Edge) SetProtectionRecordOnly(m map[string]bool)`; `newGuardState(rt)` sets `recordOnly` from it, on both guard sites (ServeHTTP and `serveAssetFar`).
+ - Far asset edges (R1-2): `func (e *Edge) AssetOwners() []registry.Route` returns the (account, app) pairs the edge's asset index serves without a local route; the telemetry pass resolves those apps too (same change-index gate, so no new polling beyond one gated read per such app), so an edge serving only an app's declared assets knows its switch.
+ - Console: `POST /a/{sqid}/apps/{app}/protection/setting` (`handleAppProtectionSetting`), the analytics setting's flow exactly: CSRF, owner only (else 404), `updateAppTelemetry(..., "protection-setting", fn)`, audit, `bumpSerial`, flash PB-C08/PB-C09, redirect to the tab. `handleAPITelemetryPut` accepts `protection.mode` (`"record"` or `""`) with the same owner rule, and its serial-bump, audit and response cover a protection-only write exactly as an analytics write (R1-4).
+ - Read (R1-3): `GET /api/cli/apps/{account}/{app}/telemetry` (`handleAPITelemetryGet`, `svcrole.Operate`, same principal rules as the PUT) returns the app's stored `telemetry.Settings` JSON; added to the claim route inventory. CLI client `func (s *session) telemetryGet(ctx, acct, app string) (telemetry.Settings, error)` in apimode.go. Add the route to the claim route inventory the way 1ec8c129 did.
- Tab: `protectionView.RecordOnly bool`, read with the app's telemetry settings; PB-C07 notice when on; the PB-C03..C06 control for owners.
- - CLI: `carlos protection [--account a] [--app x] [--record-only on|off]` through `sess.telemetryPut(..., map[string]any{"protection": {"mode": ...}})`, printing PB-C11/PB-C12; with no flag, prints the current state.
-- [ ] **Step 1: Failing tests:** `TestResolveRecordOnly` (app setting on, account ignored); `TestTelemetryPassRecordOnlyMap` (map built, failed read keeps last value); `TestRecordOnlyNeverRefuses` (Review Focus 5: cooling client in block mode on a record-only app: forwarded and recorded; hard-tier `/.env` also forwarded); `TestProtectionSettingOwnerOnly`, `TestProtectionSettingWritesAndBumps`, `TestProtectionTabShowsRecordOnly`; `TestProtectionCmdSetsAndShows`.
+ - CLI: `carlos protection [--account a] [--app x] [--record-only on|off]` through `sess.telemetryPut(..., map[string]any{"protection": {"mode": ...}})`, printing PB-C11/PB-C12; with no flag, reads through `telemetryGet` and prints PB-C11 or PB-C12. Dispatched in `main.go` beside `analytics`, with its heading in the CLI docs the `internal/docsite` gate checks (`cli_test.go`).
+- [ ] **Step 1: Failing tests:** `TestResolveRecordOnly` (app setting on, account ignored); `TestTelemetryPassRecordOnlyMap` (map built, failed read keeps last value); `TestRecordOnlyNeverRefuses` (Review Focus 5: cooling client in block mode on a record-only app: forwarded and recorded; hard-tier `/.env` also forwarded); `TestProtectionSettingOwnerOnly`, `TestProtectionSettingWritesAndBumps`, `TestProtectionTabShowsRecordOnly`; `TestAPITelemetryProtectionOnlyBumps` (protection-only PUT on and off bumps the serial and audits); `TestAPITelemetryGet`; `TestRecordOnlyReachesFarAssetEdge` (two edges, app registered only at home, switch on: the far edge's asset-path guard records, never refuses); `TestProtectionCmdSetsAndShows` through the built CLI against a test console.
- [ ] **Step 2:** Run the touched packages with `-run 'RecordOnly|ProtectionSetting|ProtectionCmd|TelemetryPass'`. Expected: FAIL.
- [ ] **Step 3:** Implement; add PB-C03..C12 to `burstCopyBuilt` (CLI strings checked by `TestProtectionCmdSetsAndShows`).
- [ ] **Step 4:** Run again plus `TestBurstCopyDeck` and the three claim route census tests. Expected: PASS.
diff --git a/docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md b/docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md
new file mode 100644
index 000000000..7232a48db
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md
@@ -0,0 +1,71 @@
+**3 P1 findings. Round 1 of at most 3; reviewed commit `a3e2b8e45b85e05cdfbdde8664f326dea7974dbf`.**
+
+1. **P1 — Task 3: a watched burst verdict disables existing hard/probe enforcement.**
+
+ [Plan lines 109–113](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:109) require `burstDecide` to occupy the single verdict slot before `guardDecide`, even when burst enforcement is suppressed for fleet traffic. But [guard.go:126](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/guard.go:126) skips every subsequent decision once that slot is occupied.
+
+ Concrete failure: in dev block mode, a cooling client requests `/.env` through a fleet forward route. Burst records a watch because `fleet=true`; the existing hard rule then cannot block. Entering cool-down has granted access that the same client previously lacked. Static rewrite checks also depend on that slot remaining undecided ([static.go:661](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/static.go:661)).
+
+ **Fix:** resolve enforcement precedence before committing the single verdict. A nonblocking burst match must not suppress an applicable hard/probe block; retain resolved-file hard checks. Add tests for cooling fleet requests to hard paths and for hard-block/burst-watch combinations.
+
+ **Invariant:** a burst watch or fleet exemption must not weaken another protection tier.
+
+2. **P1 — Task 5: record-only never reaches apps served solely through the far asset handler.**
+
+ [Plan lines 175–176](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:175) reuse the telemetry pass’s app map. That pass enumerates only local registry routes ([telemetry_pass.go:90–114](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/host/telemetry_pass.go:90)). However, `serveAssetFar` serves apps without a local route, constructs a synthetic route, and runs its own guard ([assetcatch.go:989](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/assetcatch.go:989), [assetcatch.go:1063–1105](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/assetcatch.go:1063)).
+
+ An owner can enable record-only on the home edge while another edge continues blocking, for example, `/assets/debug.php` under a declared asset prefix. Reading the map from `newGuardState(rt)` cannot help when that app never enters the map.
+
+ **Fix:** include remote asset owners in settings propagation through the existing refresh machinery, and wire the setting into the far guard. Alternatively, forward protection decisions to the home until the far edge knows the setting. Test two edges with the app registered only at home.
+
+ **Invariant:** spec §5a’s escape switch applies to every edge enforcing protection for the app.
+
+3. **P1 — Task 5: the CLI’s “show current state” operation has no read interface.**
+
+ [Plan line 179](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:179) promises a no-flag read but specifies only `sess.telemetryPut`. That method returns only an error ([apimode.go:4132–4140](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/apimode.go:4132)); the telemetry route is PUT-only ([authcli.go:724](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/console/authcli.go:724)). The analytics read exposes analytics fields, not protection settings ([apianalytics.go:22–46](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/console/apianalytics.go:22)).
+
+ **Fix:** specify an authenticated read endpoint, response shape and CLI client method. Add `main.go` dispatch and CLI documentation to the task’s files; neither is currently listed. Exercise the actual binary for both setting and reading. The documentation gate requires a heading for each dispatched command ([cli_test.go:58–74](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/docsite/cli_test.go:58)).
+
+ **Invariant:** the command alone must complete and verify the operation without infrastructure access.
+
+4. **P2 — Task 5: the API write needs an explicit serial bump.**
+
+ [Plan line 177](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:177) specifies `bumpSerial` for the browser handler, but describes the API change only as accepting `protection.mode`. The existing API bumps serial only when `body.Analytics != nil` ([apierrors.go:189–194](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/console/apierrors.go:189)).
+
+ Following that instruction narrowly makes a protection-only CLI write succeed without promptly updating edges.
+
+ **Fix:** explicitly extend the API’s serial-bump condition, audit fields and response for protection writes. Test protection-only PUTs for both on and off, including their subsequent settings pass.
+
+ **Invariant:** the emergency switch takes effect within seconds through both supported interfaces.
+
+5. **P2 — Task 2: the entry caps do not bound timestamp storage within one counter.**
+
+ [Plan lines 80–90](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:80) cap map entries but allow counters “holding timestamps or a ring per window.” They impose no per-counter limit. Task 3 continues calling `note` for qualifying responses during cool-down ([plan:114](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:114)).
+
+ A timestamp-per-request implementation therefore retains scan-volume-dependent memory despite passing the distinct-key eviction test.
+
+ **Fix:** require a fixed bound per counter, such as the latest 60 timestamps, with explicit behavior during cool-down. Add a repeated-single-key flood test.
+
+ **Invariant:** memory remains bounded independently of request volume, not merely the number of clients.
+
+6. **P2 — Task 4: one slow peer stalls notice delivery to every healthy peer.**
+
+ [Plan line 147](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:147) specifies one queue-draining goroutine using the backhaul transport. Its header timeout is 30 seconds, and it deliberately has no whole-body deadline ([edge.go:3746–3753](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/edge.go:3746), [edge.go:3943–3944](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/edge.go:3943)).
+
+ A stalled peer holds the sole worker while notices for healthy peers accumulate or overflow. Queue bounds alone do not satisfy platform-wide delivery within seconds.
+
+ **Fix:** specify a short notice-specific deadline, response-body handling, and bounded concurrency or scheduling that isolates slow peers. Sign at dispatch and discard expired queued notices. Test a stalled peer alongside a healthy peer.
+
+ **Invariant:** failure of one recipient must not prevent timely delivery to other recipients.
+
+7. **P2 — Tasks 3–4: the trip reference cannot travel through the declared record interface.**
+
+ [Plan line 111](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/plans/2026-10-31-probe-burst-limit.md:111) declares `Trip struct { Response; Until time.Time }`, but `Response` has no reference field ([recorder.go:90–104](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/reqrec/recorder.go:90)). The plan nevertheless passes a trip reference to notices. Minting belongs to the edge, which has the box identity and mesh key ([reqrecords.go:101–103](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/reqrecords.go:101)). Explain finds records by their `ref` field ([apiedgeref.go:86–91](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/console/apiedgeref.go:86)).
+
+ **Fix:** add `Ref` to `Trip`, mint it once at the trip site, and pass that same value to the recorder and notices. Require `tier=burst`, the burst rule ID and `ref` in the trip record; test lookup through Explain.
+
+ **Invariant:** a trip’s advertised reference identifies its own app-scoped record.
+
+No P3 findings. All cited locations were checked at the requested commit. No files changed; no test suites ran.
+
+**NOT READY**
\ No newline at end of file