carlos / platform Public

Probe-burst limit: missing site icons never count toward a trip (#491)

Paul approved the promotion on the calibration review (2026-11-14) with
one change: not-founds for favicons and touch icons (favicon.ico/.png/
.svg, favicon-*.png, apple-touch-icon*.png, any directory, any case) no
longer count. On 2026-11-13 a link-preview or monitoring fetcher tripped
four times on one app collecting nothing but missing icons; with the rule
blocking, each trip would have refused it catalogue paths platform-wide
for ten minutes. A scanner gains nothing, since an icon is never a
catalogue path, and a hard or probe match on such a path still counts.

New test TestBurstIconMissesNeverCount, watched to fail without the
check. Notes added to the protection spec §5.5 and the probe-burst spec
§3. Census envelope for internal/edge re-pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 7065330f496b9d08d66aa8d5cae7dbbc63f89d7c parent f2e5c4e
4 files changed, +69 −2
  • docs/superpowers/specs/2026-10-24-edge-request-protection-design.md +8 −0
  • docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md +4 −1
  • internal/edge/burst_edge_test.go +33 −0
  • internal/edge/guard.go +24 −1
diff --git a/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md b/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md
index ae50a178f..e4a2497a4 100644
--- a/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md
+++ b/docs/superpowers/specs/2026-10-24-edge-request-protection-design.md
@@ -365,6 +365,14 @@ route (or one allow rule) removes it. *My call:* 60 not-founds in 60 s, a 10-min
keyed by `clientIP` truncated as #358 does (/32 IPv4, /64 IPv6); the builder
checks both numbers against request records before shipping.
+*Calibrated and promoted (#491, Paul 2026-11-14):* seven days of watch records
+(2026-11-07 to 11-13) held up 60 in 60 s and 10 minutes, and the rule blocks
+by default, platform-wide. One change from the review: a missing site icon
+(`favicon.ico`/`.png`/`.svg`, `favicon-*.png`, `apple-touch-icon*.png`, in any
+directory) never counts toward a trip, since link-preview fetchers and monitors
+ask for them on their own and one tripped four times on nothing else. A hard
+or probe match on such a path still counts.
+
### 5.6 The "under attack" switch
A per-app switch, set by CLI or console and live within seconds, for an incident:
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 8954b0608..5a6949d7d 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
@@ -76,7 +76,10 @@ Added here:
- **What counts as a not-found.** A response the edge sends or passes on with
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.*
+ was a 404, since real admins use those paths. *My call.* A plain 404 for a
+ missing site icon (`favicon.ico`/`.png`/`.svg`, `favicon-*.png`,
+ `apple-touch-icon*.png`) never counts (Paul, 2026-11-14, from the #491
+ calibration review).
- **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
diff --git a/internal/edge/burst_edge_test.go b/internal/edge/burst_edge_test.go
index 816f7187d..fbf4fca11 100644
--- a/internal/edge/burst_edge_test.go
+++ b/internal/edge/burst_edge_test.go
@@ -363,6 +363,39 @@ func TestBurstBrowserRequestsNeverCount(t *testing.T) {
}
}
+// Missing site icons never count (Paul, #491): a fetcher that asks for
+// favicons and touch icons an app does not have is not a scanner, however
+// many it misses. Every icon spelling below is a 404 from the app; the same
+// number of other misses still trips.
+func TestBurstIconMissesNeverCount(t *testing.T) {
+ icons := []string{"/favicon.ico", "/favicon.png", "/favicon.svg", "/Favicon.ICO", "/favicon-32x32.png",
+ "/apple-touch-icon.png", "/apple-touch-icon-precomposed.png", "/apple-touch-icon-120x120.png",
+ "/apple-touch-icon-152x152-precomposed.png", "/static/favicon.ico", "/img/apple-touch-icon.png"}
+ g := newBurstRig(t, "")
+ for i := 0; i < burstThreshold+10; i++ {
+ if w := g.get(burstHost, icons[i%len(icons)]); w.Code != 404 {
+ t.Fatalf("%s: %d", icons[i%len(icons)], w.Code)
+ }
+ }
+ shop := burstAppKey(registry.Route{Account: "bdk", App: "shop"})
+ if n := g.e.burst.ringLen(shop, burstScanner); n != 0 || len(g.rec.trips) != 0 {
+ t.Fatalf("icon misses counted %d times, %d trips", n, len(g.rec.trips))
+ }
+ // Names that only look like icons count as any other miss.
+ for _, p := range []string{"/favicon.php", "/apple-touch-icon.php", "/favicon.ico/x", "/myfavicon.ico"} {
+ if burstIconPath(p) {
+ t.Fatalf("%s read as an icon", p)
+ }
+ }
+ // The control: ordinary misses from the same client trip.
+ for i := 0; i < burstThreshold; i++ {
+ g.get(burstHost, fmt.Sprintf("/missing-%d", i))
+ }
+ if _, _, ok := g.e.burst.cooling(burstScanner); !ok || len(g.rec.trips) != 1 {
+ t.Fatalf("ordinary misses: cooling %v, trips %d; want one trip", ok, len(g.rec.trips))
+ }
+}
+
// An admin page is a page real admins open: a match on it counts only when
// the app has no such page.
func TestBurstAdminCountsOnlyOn404(t *testing.T) {
diff --git a/internal/edge/guard.go b/internal/edge/guard.go
index 357acb301..8d6ce9961 100644
--- a/internal/edge/guard.go
+++ b/internal/edge/guard.go
@@ -294,11 +294,31 @@ func burstNotFound(status int, v *guardVerdict) bool {
return v.rule.Tier == reqrec.TierHard || v.rule.Tier == reqrec.TierProbe
}
+// burstIconPath reports whether path names a site icon that link-preview
+// fetchers, monitors and home-screen shortcuts ask for on their own:
+// favicon.ico or favicon.png/.svg, favicon-*.png, and apple-touch-icon*.png,
+// in any directory, any case. A miss on one never counts toward a trip
+// (Paul, #491 calibration, 2026-11-14): on 2026-11-13 a fetcher tripped four
+// times on one app collecting nothing but missing icons. A scanner gains
+// nothing from it, since an icon is never a catalogue path.
+func burstIconPath(path string) bool {
+ name := strings.ToLower(path[strings.LastIndexByte(path, '/')+1:])
+ switch name {
+ case "favicon.ico", "favicon.png", "favicon.svg":
+ return true
+ }
+ if strings.HasPrefix(name, "favicon-") && strings.HasSuffix(name, ".png") {
+ return true
+ }
+ return strings.HasPrefix(name, "apple-touch-icon") && strings.HasSuffix(name, ".png")
+}
+
// noteBurst counts one answered request toward the probe-burst limit, from
// the observer defer of the box that saw the visitor's own headers: a
// request the guard ran for, that no browser sent (every current browser
// sends Sec-Fetch-Mode on every request, scanners do not), and that is a
-// not-found by burstNotFound. A far edge's asset fill this box acknowledged
+// not-found by burstNotFound, and not a missing site icon (burstIconPath).
+// A far edge's asset fill this box acknowledged
// is the far edge's to count. On a trip it mints the trip's code once,
// files the trip record and tells the other edges.
func (e *Edge) noteBurst(rt registry.Route, r *http.Request, status int, out *outcome) {
@@ -311,6 +331,9 @@ func (e *Edge) noteBurst(rt registry.Route, r *http.Request, status int, out *ou
if !burstNotFound(status, out.guard.verdict) {
return
}
+ if out.guard.verdict == nil && burstIconPath(r.URL.Path) {
+ return
+ }
if _, browser := r.Header["Sec-Fetch-Mode"]; browser {
return
}