design: probe-burst limit rev 2 (builder check settled; Paul: per-app record-only switch before blocking)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+83
−8
docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md+69 −8docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md+14 −0
CI passed — run details
diff --git a/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md b/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md| index 806d678cd..9c659e8db 100644 |
| --- a/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md |
| +++ b/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md |
| @@ -1,6 +1,6 @@ |
| # Probe-burst limit, shared across the platform |
| -Status: draft for Paul, 2026-10-31. Branch `design-probe-burst-491`. |
| +Status: draft for Paul, 2026-10-31, revision 2 (after the Astra builder check, §9). Branch `design-probe-burst-491`. |
| Builds §5.5 of the edge request protection spec |
| (`docs/superpowers/specs/2026-10-24-edge-request-protection-design.md`, "the |
| @@ -36,6 +36,10 @@ Goals: |
| until Paul approves blocking. |
| 5. Show it: refusals and would-be refusals count on the Protection tab and |
| the operator page, and every refusal carries a reference code. |
| +6. A developer can stop a misfire on their app within seconds, without a |
| + deploy: a per-app "record only" switch (§5a). Paul, 2026-10-31. Nothing |
| + blocks for real until it exists. It covers the probe-burst limit and the |
| + protection spec's hard and probe tiers when they are promoted to block. |
| Non-goals: |
| - Refusing anything but catalogue paths. A client in cool-down still gets |
| @@ -73,6 +77,13 @@ Added here: |
| status 404, plus any hard or probe tier match (watch or block) whatever the |
| status. A burst-mode rule match (`probe/admin`) counts only if the answer |
| was a 404, since real admins use those paths. *My call.* |
| +- **Browsers never count** (builder check 1). A request carrying a |
| + `Sec-Fetch-Mode` header, which every current browser sends on every request |
| + and scanners do not, never counts toward a trip. *My call:* this stops a |
| + tenant's page from making its visitors' browsers fetch 60 missing URLs and |
| + so getting those visitors refused across the platform, and it keeps real |
| + people's stray 404s out of the count. A scanner that forges the header |
| + avoids the limit, and still meets every per-request rule. |
| - **Counting is per app, the cool-down is per client.** A client trips by |
| collecting 60 not-founds on one app; the cool-down then covers every app. |
| *My call:* per-app counting keeps one busy shared address from tripping on |
| @@ -103,6 +114,10 @@ the same cool-down, expiring at the same moment. |
| that key (the store door refuses it to them), so they can neither send nor |
| accept a notice. Fleet apps are still covered: the hub checks their |
| requests before forwarding them (the Protection tab's counting rule). |
| + *My call (builder check 2):* in v1 a fleet app's requests are never refused |
| + by the burst limit, only recorded as "would have refused". The hub cannot |
| + see a fleet box's static files, so it cannot tell a real fleet `/admin` from |
| + a missing one. Refusing for fleet apps waits for a way to know. |
| - **Where to.** The other edges' dial points from the published edges files |
| (`control/edges/<box>.json`, read by `internal/edge/homemap.go`). No new |
| polling: the edge already mirrors those. |
| @@ -128,13 +143,20 @@ the same cool-down, expiring at the same moment. |
| ## 5. What people see |
| - **Visitor.** A refused catalogue request gets `429`, `Retry-After`, and a |
| - short plain body with the reference code. A real person almost never sees |
| + short plain body with the reference code. *My call (builder check 4):* the |
| + refusing edge mints the code for each refusal, as for any block, so the |
| + code finds that refusal's own record in that app's logs. The record says |
| + whether the cool-down started on this app or "on another app on the |
| + platform", with its expiry, and never names the other app: that is |
| + another tenant's business. A real person almost never sees |
| this (they would have to share an address with an active scanner and ask |
| for a catalogue path the app does not declare). |
| -- **Logs.** Each trip, each notice received, and each refusal (or |
| - would-be refusal in watch mode) is a request record: tier `burst`, with the |
| - reference code. Trips and notices are one line each, never one per |
| - request beyond the existing per-minute record caps. |
| +- **Logs.** Each trip and each refusal (or would-be refusal in watch mode) |
| + is a request record in the app's own logs: tier `burst`, with the |
| + reference code, within the existing per-minute record caps. *My call |
| + (builder check 5):* a notice received from another edge belongs to no app, |
| + so it goes to the box's own operator log (one line per notice, counted, |
| + with the per-minute cap of §4), never to any tenant's logs. |
| - **Protection tab and operator page.** Refusals count as blocked, would-be |
| refusals as recorded, under a new group (`burst/probe-burst`) with a plain |
| name. The group needs a name in the copy deck and in |
| @@ -146,6 +168,27 @@ the same cool-down, expiring at the same moment. |
| All visitor-facing and console text goes through copy review before it is |
| written into the code. |
| +## 5a. The record-only switch (Paul, 2026-10-31) |
| + |
| +A per-app setting, "protection records only": when on, nothing the |
| +protection layer decides is refused for that app (hard, probe and burst |
| +alike); every match is still recorded and counted as "recorded". Off by |
| +default. |
| + |
| +- **Who.** The app's owners, from the console (the Protection tab) and the |
| + CLI. *My call:* the same people who can change the app's analytics |
| + setting. |
| +- **Live within seconds.** It rides the per-app settings file and pass the |
| + analytics switch already uses (`telemetry.json` app scope, |
| + `internal/host/telemetry_pass.go`, gated by the change index), so it |
| + reaches every edge serving the app without new polling and without a |
| + deploy. |
| +- **Shown.** The Protection tab says when the switch is on, and the |
| + headline uses "recorded", never "blocked", for that app. |
| +- **Not a platform-wide escape.** It only affects the app it is set on; a |
| + platform-wide cool-down still covers that client on other apps. |
| +- Its words go through copy review. |
| + |
| ## 6. Rollout |
| 1. **Watch.** Ship with the limit counting, tripping, sharing and recording |
| @@ -156,8 +199,9 @@ written into the code. |
| (§8 there): how many clients would have tripped, how many of them also got |
| real pages (a sign of a shared address), whether any trip came from a |
| known crawler, and whether 60 in 60 s and 10 minutes hold up. |
| -3. **Block.** Paul approves turning it on, with any changed numbers. Then the |
| - flagship refuses for real. |
| +3. **Block.** Paul approves turning it on, with any changed numbers, once the |
| + record-only switch (§5a) is live on the flagship. Then the flagship |
| + refuses for real. |
| Roll dev first, then the flagship, as always. |
| @@ -179,3 +223,20 @@ Roll dev first, then the flagship, as always. |
| - Data structures for the counters and the cool-down set, within §3's bounds. |
| - Where the burst checks sit in the code, within §3's ordering. |
| - The record field names for trips and notices. |
| + |
| +## 9. Builder check (Astra, revision 1) and what it changed |
| + |
| +1. A tenant could get its visitors refused platform-wide by making their |
| + browsers fetch missing URLs. Requests with `Sec-Fetch-Mode` never count |
| + (§3). |
| +2. The hub cannot see fleet apps' static files. Fleet apps are only recorded, |
| + never refused, in v1 (§4). |
| +3. The parent spec promises a fix within seconds without a deploy; nothing |
| + delivers it yet. Paul chose a per-app record-only switch, required before |
| + anything blocks (§2 goal 6, §5a). |
| +4. Whose reference code a refusal carries. Each refusal gets its own code |
| + from the refusing edge; the record never names another tenant's app (§5). |
| +5. Where a received notice is recorded. The box's operator log, never a |
| + tenant's (§5). |
| + |
| +This was review round 1 of at most three (AGENTS.md stopping rules). |
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md b/docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md| new file mode 100644 |
| index 000000000..5f4d479e7 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md |
| @@ -0,0 +1,14 @@ |
| +1. **May tenant-controlled responses trigger a platform-wide cool-down, despite the anti-goal forbidding tenants from blocking other apps’ visitors?** |
| + A tenant can serve a page that makes a visitor’s browser fetch 60 URLs returning 404. Under the proposed counting rule, the trusted platform edge then starts and signs the cool-down. Withholding the mesh key prevents forged notices, but does not prevent this indirect trigger. The answer determines whether upstream 404s can authorize sharing or need a narrower policy. Evidence: [design:53](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:53), [design:72](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:72), [edge.go:2180](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/edge.go:2180), [storedoor.go:530](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/storedoor.go:530). |
| + |
| +2. **How must the static-path exemption work for fleet apps when the hub cannot inspect their file trees?** |
| + The hub’s existing guard checks tunnelled static routes without an existence check. The fleet edge skips the guard on tunnel deliveries, and the static resolver checks existence only when guard state is present. Consequently, reusing today’s arrangement would refuse an existing fleet static `/admin` during a cool-down. The plan needs either existence information at the hub, a different enforcement arrangement, or an explicit exemption from fleet blocking. Evidence: [design:81](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:81), [design:101](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:101), [edge.go:2177](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/edge.go:2177), [edge.go:2216](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/edge.go:2216), [static.go:579](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/static.go:579), [static.go:661](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/static.go:661). |
| + |
| +3. **Must a live per-app exception mechanism ship before blocking is enabled?** |
| + The parent requires developers to stop a misfire within a minute without deploying, and accepts blocking unknown `/admin` routes on the basis that declaring the route or adding an allow rule removes the block. This design explicitly postpones those mechanisms while still promising “declare it” as the remedy. The answer changes whether the blocking plan depends on building configuration, convergence and CLI/console support, or explicitly relaxes the inherited requirement. Evidence: [parent:45](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md:45), [parent:188](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md:188), [parent:358](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md:358), [design:81](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:81). |
| + |
| +4. **Does a refusal’s reference code identify that individual refusal, or the original trip on another box?** |
| + Existing codes identify an individual block’s minute and box. The explanation endpoint searches only the selected app’s logs around that minute. Reusing the trip code could point to another app and miss refusals later in the ten-minute window; minting normally on the refusing edge identifies that edge rather than the originating box. This determines whether the plan needs linked references, a changed code format, or different lookup behaviour. Evidence: [design:109](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:109), [design:142](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:142), [reqrecords.go:101](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/edge/reqrecords.go:101), [ref.go:24](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/reqrec/ref.go:24), [apiedgeref.go:82](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/console/apiedgeref.go:82). |
| + |
| +5. **Where should a received notice be recorded, and which tenants may see it?** |
| + Notices carry no account, app or request identity, but the existing request-record sink and sampling budgets are scoped to an account and app. A recipient may receive a notice before that client requests any of its apps. Choosing an operator-only event stream versus tenant-visible records changes storage routing, access boundaries and sampling—not merely the field names left to the builder. Evidence: [design:109](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:109), [design:134](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md:134), [recorder.go:19](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/reqrec/recorder.go:19), [recorder.go:251](/home/paulca/.cache/tmp/claude-1001/design-probe-burst-491/internal/reqrec/recorder.go:251). |
| \ No newline at end of file |