carlos / platform Public

merge main: the #1008 guard and approved copy

Brings 3c8cbff (the guard) and 7e86fb1 (its approved copy) under the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e27f469dc72c4cae6960b58737c90fe37ff4355c parent bc33857parent 7e86fb1
38 files changed, +1,045 −78
  • approved_stateless_replicas_copy_test.go +1 −1
  • docs/superpowers/notes/census-claims-probe-burst-block.tsv +1 −0
  • docs/superpowers/notes/census-proposal-probe-burst-block.md +19 −0
  • docs/superpowers/plans/2026-08-23-console-as-an-app.md +2 −2
  • docs/superpowers/plans/2026-10-05-scanner-host-rollout.md +1 −1
  • docs/superpowers/plans/2026-10-06-console-release-defences-plan-4-d4.md +1 −1
  • docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md +2 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R1.md +24 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R2.md +19 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK-ICONS.md +51 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK.md +103 −0
  • docs/superpowers/specs/2026-08-23-console-as-an-app-design.md +1 −1
  • docs/superpowers/specs/2026-10-24-edge-request-protection-design.md +8 −0
  • docs/superpowers/specs/2026-10-24-service-runs-design.md +1 −1
  • docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md +4 −1
  • internal/console/apicli.go +9 −1
  • internal/console/apidomains.go +1 −1
  • internal/console/apidomains_test.go +1 −1
  • internal/console/apierrors.go +14 −5
  • internal/console/apiinstances.go +2 −2
  • internal/console/appcopies.go +175 −8
  • internal/console/copiespublication_test.go +9 −3
  • internal/console/copiesunlabelled_test.go +249 −0
  • internal/console/fleets.go +7 −0
  • internal/console/managedapi.go +8 −1
  • internal/console/protectionsetting_test.go +22 −4
  • internal/console/rootfs.go +1 −1
  • internal/console/server.go +2 −2
  • internal/domains/claims_proof_test.go +1 −1
  • internal/edge/burst_edge_test.go +121 −31
  • internal/edge/burst_notice.go +26 −0
  • internal/edge/burst_notice_test.go +118 −2
  • internal/edge/edge.go +1 −1
  • internal/edge/guard.go +27 −3
  • internal/edgeguard/catalogue.go +5 −2
  • internal/edgeguard/catalogue_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-probe-burst-block.tsv +6 −0

CI passed — run details

diff --git a/approved_stateless_replicas_copy_test.go b/approved_stateless_replicas_copy_test.go
index 37ba671cd..4d2606408 100644
--- a/approved_stateless_replicas_copy_test.go
+++ b/approved_stateless_replicas_copy_test.go
@@ -9,7 +9,7 @@ import (
const statelessReplicaCopyDeck = "docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md"
-var statelessReplicaBuiltCopy = []string{"SR-2-C11", "SR-2-C01", "SR-2-C02", "SR-2-C03", "SR-2-C04", "SR-2-C05", "SR-2-C06", "SR-2-C07", "SR-2-C08", "SR-2-C09", "SR-2-C12", "SR-2-C13", "SR-2-C14", "SR-2-C15", "SR-2-C16", "SR-2-C17", "SR-1-C08", "SR-1-C06", "SR-1-C07", "SR-1-C01", "SR-1-C02", "SR-1-C03", "SR-1-C04", "SR-1-C05", "SR-1-C12", "SR-1-C09", "SR-1-C10", "SR-1-C13", "SR-1-C14"}
+var statelessReplicaBuiltCopy = []string{"SR-2-C11", "SR-2-C01", "SR-2-C02", "SR-2-C03", "SR-2-C04", "SR-2-C05", "SR-2-C06", "SR-2-C07", "SR-2-C08", "SR-2-C09", "SR-2-C12", "SR-2-C13", "SR-2-C14", "SR-2-C15", "SR-2-C16", "SR-2-C17", "SR-1-C08", "SR-1-C06", "SR-1-C07", "SR-1-C01", "SR-1-C02", "SR-1-C03", "SR-1-C04", "SR-1-C05", "SR-1-C12", "SR-1-C09", "SR-1-C10", "SR-1-C13", "SR-1-C14", "SR-4-C95", "SR-4-C96"}
func statelessReplicaCopyRows(t *testing.T) []copyRow {
t.Helper()
diff --git a/docs/superpowers/notes/census-claims-probe-burst-block.tsv b/docs/superpowers/notes/census-claims-probe-burst-block.tsv
new file mode 100644
index 000000000..b5dc943bc
--- /dev/null
+++ b/docs/superpowers/notes/census-claims-probe-burst-block.tsv
@@ -0,0 +1 @@
+internal/edge/guard.go:Edge.noteBurst after the not-found check, returns early (counts nothing) when the request matched no rule and its path names a site icon (burstIconPath: favicon.ico/.png/.svg, favicon-*.png, apple-touch-icon*.png, a pure string test on r.URL.Path); no new read, no file or store access, only fewer counts
diff --git a/docs/superpowers/notes/census-proposal-probe-burst-block.md b/docs/superpowers/notes/census-proposal-probe-burst-block.md
new file mode 100644
index 000000000..77b54d232
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-probe-burst-block.md
@@ -0,0 +1,19 @@
+# Census approval: probe-burst-block
+
+Ruling `census-ruling-probe-burst-block`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/edge/guard.go` `Edge.noteBurst` | body | unchanged (3) | after the not-found check, returns early (counts nothing) when the request matched no rule and its path names a site icon (burstIconPath: favicon.ico/.png/.svg, favicon-*.png, apple-touch-icon*.png, a pure string test on r.URL.Path); no new read, no file or store access, only fewer counts |
+
+Envelopes re-pinned: `internal/edge`, `internal/edgeguard`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/edge/guard.go` `Edge.noteBurst`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-probe-burst-limit;basis=new: in the observer defer, counts a not-found (a 404, or a hard or probe match) from a non-browser client (no Sec-Fetch-Mode) toward the in-memory probe-burst limiter, keyed by the route's account/app; on a trip mints a reference code, files a Trip record into the in-memory recorder and queues notices to peer edges; the sites are the route value passed in; reads no file, store or registry; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=skips only the in-memory Trip record when demoUnrecorded(rt, r); cooling, the limiter and peer notices are unchanged; no new read
+
+Seal: `f79b455e32eb0f63e19ba8b5c67129e1af9315b8650c9e0807e83ec630a82182` → `94ccbabaf19c3a449cec248a0c32fcc8593c82d3f7f433c6a48b6e0fdf068167`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-probe-burst-block.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/2026-08-23-console-as-an-app.md b/docs/superpowers/plans/2026-08-23-console-as-an-app.md
index 37318863a..30dd3fede 100644
--- a/docs/superpowers/plans/2026-08-23-console-as-an-app.md
+++ b/docs/superpowers/plans/2026-08-23-console-as-an-app.md
@@ -1957,7 +1957,7 @@ Run as `carlos`, not root. Verify by reading the routes back, then run one `carl
```
carlos apps create -app console -account ops -control-plane -build-probe /healthz \
- -console https://carlos.tito.io
+ -console https://console.platform.tito.io
```
then the same against `https://platform.carlosframework.com`. One step, not two: a row without the flag is a window in which any ops member or `Publish` service credential can roll the production console.
@@ -1977,7 +1977,7 @@ GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build \
-ldflags "-s -w -X github.com/carlosframework/platform/internal/version.Build=$(git rev-parse --short HEAD)" \
-o /tmp/console ./cmd/console
-carlos deploy -app console -account ops -console https://carlos.tito.io \
+carlos deploy -app console -account ops -console https://console.platform.tito.io \
-channel canary/console -host <tito-execstart-host> -target linux-arm64 /tmp/console
```
diff --git a/docs/superpowers/plans/2026-10-05-scanner-host-rollout.md b/docs/superpowers/plans/2026-10-05-scanner-host-rollout.md
index 2eb8e2512..13fb4bfb4 100644
--- a/docs/superpowers/plans/2026-10-05-scanner-host-rollout.md
+++ b/docs/superpowers/plans/2026-10-05-scanner-host-rollout.md
@@ -1495,7 +1495,7 @@ Expected: the scanner's six resources created; `host_ie_object_store` updated in
### Task 12 (GATED): Tito, console, key, wiring, enable
- [ ] **Step 1:** Roll Tito's console to the same build as Task 8: `GOFLAGS=-buildvcs=false scripts/roll-console.sh <checkout> tito`, with Paul's go. Its executable check must pass. Before rolling, diff Tito's console environment against the flagship's for variables the new build requires (the 2026-09-11 lesson): `... ssm-run.sh` on each console box, `cut -d= -f1 <envfile> | sort`, and compare.
-- [ ] **Step 2:** Task 9 Steps 1 to 7 in Tito's account (profile `titogo`, region `eu-west-1`, `/carlos/scan-tag-key`, console `https://carlos.tito.io`). A **new** key: never copy the flagship's.
+- [ ] **Step 2:** Task 9 Steps 1 to 7 in Tito's account (profile `titogo`, region `eu-west-1`, `/carlos/scan-tag-key`, console `https://console.platform.tito.io`). A **new** key: never copy the flagship's.
- [ ] **Step 3:** Stop at `antivirus status` (wired, answering, fresh signatures) and `antivirus enable`. **No throwaway app, no grant, no sweep on Tito** (spec §8).
- [ ] **Step 4:** Record in the discussion.
diff --git a/docs/superpowers/plans/2026-10-06-console-release-defences-plan-4-d4.md b/docs/superpowers/plans/2026-10-06-console-release-defences-plan-4-d4.md
index c60289ed5..090ff4aa0 100644
--- a/docs/superpowers/plans/2026-10-06-console-release-defences-plan-4-d4.md
+++ b/docs/superpowers/plans/2026-10-06-console-release-defences-plan-4-d4.md
@@ -150,7 +150,7 @@ coords() {
case $1 in
dev) echo "kass carlos-dev-640012953448 i-05498eada6f0afd23 platform.dev.carlosframework.com";;
flagship) echo "keymail carlos-flagship-271376211898 i-092c0c1eea75723cb platform.carlosframework.com";;
- tito) echo "titogo carlos-tito-platform-665106592142 i-025a0b70f3d93304d carlos.tito.io";;
+ tito) echo "titogo carlos-tito-platform-665106592142 i-025a0b70f3d93304d console.platform.tito.io";;
*) echo "unknown deployment $1: dev, flagship or tito" >&2; exit 2;;
esac
}
diff --git a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
index 266232099..d7fae29cf 100644
--- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
+++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
@@ -166,3 +166,5 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text.
| SR-4-C92 | internal/activator/replicadeploy.go | the new copy's configuration was not written on its box in time, so it did not start. existing copies keep serving | approved (controller; Luna house rules) (drill 1 round 2) |
| SR-4-C93 | docs/site/stateless-replicas.md | An app that creates its own instance.key or report.token file must take those values from a shared source, its configuration or its environment, or run one copy. The platform gives every copy the same CARLOS_INSTANCE_KEY, but it cannot stop each copy of an app from writing a different file of its own. | approved (controller; Luna house rules) (drill 1 round 2, A3 restriction) |
| SR-4-C94 | docs/site/stateless-replicas.md | When a copy switches, its old build stops once the new one serves. A response still streaming from the old build when it stops is cut, as when a box stops. Websockets on the old build disconnect and their clients reconnect to a healthy copy. | approved (controller; Luna house rules) (drill 3, H4) |
+| SR-4-C95 | internal/console/appcopies.go | <host> is not tied to one box of fleet <fleet>, and that fleet has more than one box. a release without a local database needs that first, so keep this app on a release with a local database for now | approved (Paul, copy review u4k4cyxedlsfh72a7vpq3sn2uu as SR-5-C01, 2026-11-14; #1008: refused at ship, at any publication of a stateless build, and at copies above 1) |
+| SR-4-C96 | internal/console/appcopies.go | <host> runs a release without a local database and is not tied to a box of fleet <fleet>, so a second active box would stop it. move it to a release with a local database before adding a box | approved (Paul, copy review u4k4cyxedlsfh72a7vpq3sn2uu as SR-5-C02, 2026-11-14; #1008: refused at fleet add-box, box reactivation and a managed fleet add) |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R1.md b/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R1.md
new file mode 100644
index 000000000..48c965fb3
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R1.md
@@ -0,0 +1,24 @@
+Reviewed `4c6416787..374bcff00711d247235b7bab0425e3c5ac6f11d8`, round 1.
+
+No P1 findings.
+
+**P2 — Notice workers: a stale snapshot can prune a newly created peer.**
+
+At [burst_notice.go:400](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edge/burst_notice.go:400), `burstPeerCurrent` reads the snapshot before acquiring `n.mu`, then prunes every peer using that snapshot.
+
+Failure scenario: a worker captures a snapshot without Betty and pauses. The home map adds Betty; `sendBurstNotices` acquires `n.mu`, reads the newer snapshot and creates Betty’s worker and queue (lines 266–278). The paused worker resumes and prunes Betty using its older snapshot (lines 400–403). Betty’s queued notices are dropped as `Gone` despite her remaining eligible.
+
+Fix: acquire `n.mu` before reading the home-map snapshot, matching `sendBurstNotices`. Add a deterministic concurrency test covering this ordering.
+
+Fault family: peer reconciliation must not apply an older snapshot after newer peer creation. Fix within this round; no further review round required.
+
+No P3 findings.
+
+Census verdicts:
+
+- **`internal/edge`: approve.** Read `burst_notice.go` lines 252–305 and 362–494, including the new check and its dispatch caller; also the changed tests and guard comments. The change adds no tenant-controlled root reads or execution paths and preserves signing and transport checks. The P2 concerns erroneous notice loss.
+- **`internal/edgeguard`: approve.** Read [catalogue.go:114](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edgeguard/catalogue.go:114), lines 114–170, and the changed lookup test. Promotion changes the existing rule’s mode without adding input paths. Existing catalogue, static-file, fleet and record-only checks remain in place.
+
+`git diff --check` passed. Targeted tests could not start: the read-only sandbox denied Go’s build-directory creation. No files changed; no full suites run.
+
+**READY AFTER FIXES**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R2.md
new file mode 100644
index 000000000..3e7ea5989
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R2.md
@@ -0,0 +1,19 @@
+Reviewed `fe516719e18e85445c2972fd4a69b3393d9557cf` against local `amadan/main`, within the brief’s round-2 scope.
+
+No P1, P2, or P3 findings.
+
+Round-1 P2: **resolved**. Snapshot acquisition now occurs under `n.mu`, matching peer creation ([burst_notice.go:395](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edge/burst_notice.go:395), lines 395–406).
+
+The icon exclusion requires a plain 404 with no guard verdict. Hard/probe matches still count, and cool-down refusal runs before the observer’s exclusion. Both checks start from `r.URL.Path`; catalogue normalization and query matching retain priority through the verdict. Empty paths are safe; trailing slashes are not treated as icon filenames.
+
+`TestBurstIconMissesNeverCount` tests its stated behavior through a real Edge: repeated icon 404s produce no counts or trips, followed by ordinary misses that trip the same client. It does not directly cover icon-shaped catalogue matches or escaping variants.
+
+Census verdicts:
+
+- **`Edge.noteBurst`: APPROVE**, retaining `legacy / accepted-legacy`. Read [guard.go:287](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edge/guard.go:287), lines 287–352. The added string check introduces no file, store, registry, or execution access and preserves catalogue verdicts.
+- **`internal/edge` envelope: APPROVE.** Read the changed functions and tests, including `guard.go` lines 297–352 and [burst_notice.go:252](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edge/burst_notice.go:252), lines 252–305 and 362–498; traced guard callers in `edge.go` lines 2864–2909 and `static.go` lines 638–703. No new tenant-controlled root access; signing, transport checks, static-file exemptions, and record-only behavior remain intact.
+- **`internal/edgeguard` envelope: APPROVE.** Read [catalogue.go:114](/home/paulca/github.com/carlosframework/platform-probe-burst-block-491/internal/edgeguard/catalogue.go:114), lines 114–171, and the changed lookup test. Promotion changes the existing rule’s mode without adding input paths or weakening its checks.
+
+`git diff --check` passed. Targeted tests could not start: the read-only sandbox denied Go’s work-directory creation. No files changed; no full suites run.
+
+READY
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK-ICONS.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK-ICONS.md
new file mode 100644
index 000000000..e8515ea72
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK-ICONS.md
@@ -0,0 +1,51 @@
+# Review brief: branch probe-burst-block-491, icon exclusion and census, round 2 of 3
+
+Repo carlos/platform, branch `probe-burst-block-491`, commit 4cdfed7fe23e05d8d049bda2e6e6e641787a59a1.
+Under review: commit 7065330f4 (the icon exclusion) and the census card
+`docs/superpowers/notes/census-proposal-probe-burst-block.md` for the whole
+branch against amadan's main (`git diff amadan/main...4cdfed7fe` touches
+internal/edge, internal/edgeguard, internal/console and docs; the merge commit
+4cdfed7fe only brings main in).
+Authorities, merged on main: `docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md`,
+`docs/superpowers/specs/2026-10-24-edge-request-protection-design.md` §5.5.
+
+Round 1 (`docs/superpowers/reviews/CODEX-FINDINGS-PROBE-BURST-BLOCK-R1.md`)
+found one P2 (stale snapshot pruning a new peer), fixed in 1cc2ca0f2 with the
+test added in f2e5c4e81. Give one line on it: resolved, partly or not.
+
+## Fixed: do not re-argue
+
+- Paul approved promotion to block and the icon exclusion (2026-11-14,
+ recorded on amadan discussion #1004). Whether to exclude icons is decided;
+ check only that the mechanism is right.
+
+## What to check
+
+1. `burstIconPath` and its call in `Edge.noteBurst` (internal/edge/guard.go):
+ does it exclude only plain not-founds for favicon.ico/.png/.svg,
+ favicon-*.png and apple-touch-icon*.png? Can a scanner use it to make
+ catalogue probes uncounted (a hard or probe match must still count), or
+ to avoid a refusal during a cool-down? Is the path it reads the one the
+ catalogue matched (escaping, `//`, query, trailing slash)? Any panic on
+ an empty or odd path?
+2. `TestBurstIconMissesNeverCount`: does it test what it says?
+3. Census: a verdict for the unit `internal/edge/guard.go` `Edge.noteBurst`
+ (claim in `docs/superpowers/notes/census-claims-probe-burst-block.tsv`)
+ and for each re-pinned envelope (`internal/edge`, `internal/edgeguard`),
+ per AGENTS.md "The census", citing the lines read.
+
+## 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.
+- **P3**: clarity or polish. Follow-up list only.
+
+## Output
+
+Findings ranked P1, P2, P3 with evidence (file:line), failure scenario,
+fix and fault family. Then the census verdicts. End with exactly one of
+READY, READY AFTER FIXES, NOT READY.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK.md
new file mode 100644
index 000000000..50e502f4f
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-PROBE-BURST-BLOCK.md
@@ -0,0 +1,103 @@
+# Review brief: branch probe-burst-block-491 (whole branch, with its census card), round 1 of 3
+
+Repo carlos/platform, branch `probe-burst-block-491`, commit e974371a182279e35011108630d624e07cf657bc.
+Under review: the diff `4c6416787..e974371a1` (base is amadan's main).
+Authorities, merged on main:
+`docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md` (§3, §4, §5a, §6),
+`docs/superpowers/specs/2026-10-24-edge-request-protection-design.md` §5.5,
+`docs/superpowers/plans/2026-10-31-probe-burst-limit.md`, and the precedent
+commit 378646f1c ("Edge protection: the hard tier blocks by default").
+
+You are an independent reviewer. Read the diff, then the code it touches,
+and check every claim against that code.
+
+## What the branch does
+
+1. `internal/edgeguard/catalogue.go`: `BurstRule.Mode` goes from watch to
+ block, so in the default mode (`guardCatalogue`) a client in a probe-burst
+ cool-down is refused (429) the catalogue paths an app is not known to
+ serve, on every app, including cool-downs received as mesh notices.
+ Tests that relied on watch now name watch mode or demote the rule;
+ new witness `TestBurstCatalogueRefusesByDefault`;
+ `TestBurstNoticeAppliesOnThePeer` runs in the default and block modes.
+2. `internal/console/apierrors.go`: the telemetry GET
+ (`GET /api/cli/apps/{account}/{app}/telemetry`, read by
+ `carlos protection`) answers a person who is a member but not an owner
+ with the protection half alone, instead of 403. Owners and Operate
+ service credentials read the whole object. The PUT is unchanged.
+3. `internal/edge/burst_notice.go`: a notice worker checks its peer against
+ the current home map before taking each budget slot (`burstPeerCurrent`),
+ prunes departed peers, and drops the notice as Gone. New test
+ `TestBurstNoticeDepartedPeerStopsAtDispatch`.
+4. Census: `docs/superpowers/notes/census-proposal-probe-burst-block.md`
+ re-pins the `internal/edge` and `internal/edgeguard` envelopes; no unit
+ changes.
+
+## Fixed: do not re-argue
+
+- Paul's rulings in the probe-burst spec (thresholds 60/60 s/10 min,
+ per-app counting, platform-wide cool-down, Sec-Fetch-Mode never counts,
+ fleet apps only recorded, record-only switch per app). Report only
+ mechanisms that fail to honour them.
+- Whether to promote at all is Paul's call on the calibration evidence,
+ not this review's.
+
+## What to check
+
+1. Promotion: with the rule blocking by default, can anything now be
+ refused that the spec says must never be: a page not in the catalogue,
+ a static site's existing file, a fleet app's request, a request to an
+ app whose record-only switch is on, or a request from a client not
+ cooling? Is `guardBlock` / `guardWatch` / `guardOff` behaviour unchanged?
+ Does verdict precedence (`decideVerdict`) still never let a burst
+ verdict replace or weaken a hard block?
+2. Tests: do the changed tests still test what their names say, and does
+ any test elsewhere (edge, edgeguard, console, reqrec, host) still
+ assume the burst rule watches by default? Does `demoteBurstRule` restore
+ global state safely (no `t.Parallel` races on `edgeguard.BurstRule`)?
+3. Telemetry GET: is the member read gated correctly (instanceGate, then
+ role)? Can a member, a non-member, an Instance-role service token or a
+ linked/scoped credential now read anything beyond the protection half,
+ or anything at all they could not before? Is the response for an absent
+ protection half `{}`? Does any other caller of `handleAPITelemetryGet`
+ or `telemetryGate` change behaviour?
+4. Notice workers: can `burstPeerCurrent` deadlock (it takes `n.mu`; is it
+ ever called with `n.mu` held, or while `sendBurstNotices` holds it and
+ waits on the worker)? Can pruning close `p.stop` twice, or prune a
+ freshly created peer for the same box? Does a nil home map now drop
+ notices that were sent before? Is anything sent to a box no longer in
+ the targets?
+5. Census: give a verdict on each re-pinned envelope (`internal/edge`,
+ `internal/edgeguard`) per AGENTS.md "The census": reject if the change
+ lets root open, run, query or follow anything new from tenant-, app- or
+ agent-controlled input, or weakens a check root relies on.
+
+## 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 and the invariant or trust boundary it breaks (that is its fault
+family). Then the census verdict per envelope (approve or reject, citing
+the lines read). 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.
diff --git a/docs/superpowers/specs/2026-08-23-console-as-an-app-design.md b/docs/superpowers/specs/2026-08-23-console-as-an-app-design.md
index 24c2e339b..190ca42cd 100644
--- a/docs/superpowers/specs/2026-08-23-console-as-an-app-design.md
+++ b/docs/superpowers/specs/2026-08-23-console-as-an-app-design.md
@@ -547,7 +547,7 @@ must reach the boxes **before** the first self-deploy.
**0. Survey both boxes** (read-only, no changes). Per box: `console.service`'s
`ExecStart` path and its `Type=`; which route carries the `Unit` stamp;
every console route and channel (tito is entirely unsurveyed — it has
- `console.platform.tito.io` and the still-serving `carlos.tito.io`);
+ `console.platform.tito.io`, plus a retired alias);
`HasOwners("console")`; any legacy `apps/console/` prefix; the bucket
production flag on `console`. Flagship's readings are in the appendix;
**tito's are not, and step 7 deploys there first.**
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-24-service-runs-design.md b/docs/superpowers/specs/2026-10-24-service-runs-design.md
index 3aef2a33b..b0e510871 100644
--- a/docs/superpowers/specs/2026-10-24-service-runs-design.md
+++ b/docs/superpowers/specs/2026-10-24-service-runs-design.md
@@ -263,7 +263,7 @@ runs in `cliRoute` (`authcli.go:455`) before any handler, and that is fine. The
on a console without host-claim until #250 adds `cmd` to the reservation
protocol. Nothing here bypasses or pre-empts #250.
-Tito's console (`carlos.tito.io`) serves runs today: a follow of an unknown
+Tito's console (`console.platform.tito.io`) serves runs today: a follow of an unknown
run there answers "no such run", not the host-claim refusal (checked
2026-10-24). So Fleet is not blocked by #250.
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/console/apicli.go b/internal/console/apicli.go
index 4cc2af184..690a744c1 100644
--- a/internal/console/apicli.go
+++ b/internal/console/apicli.go
@@ -1037,7 +1037,7 @@ func (s *Server) handleAPIPromote(w http.ResponseWriter, r *http.Request) {
jsonError(w, ref.Status, ref.Msg)
return
}
- if ref := s.statelessRuntimeRefusal(ctx, channel, man, nil, ""); ref != nil {
+ if ref := s.statelessPublicationRefusal(ctx, acct.Sqid, app, channel, man, nil, ""); ref != nil {
jsonError(w, ref.Status, ref.Msg)
return
}
@@ -2339,6 +2339,14 @@ func (s *Server) handleAPIShip(w http.ResponseWriter, r *http.Request) {
jsonError(w, http.StatusBadRequest, err.Error())
return
}
+ // A stateless build an instance of this app could never wake is
+ // refused before anything is uploaded (#1008).
+ if meta.Stateless {
+ if ref := s.unlabelledFleetRefusal(r.Context(), acct.Sqid, app); ref != nil {
+ writeDoorRefusal(w, ref)
+ return
+ }
+ }
if refuseBadSwap(w, meta.Swap) {
return
}
diff --git a/internal/console/apidomains.go b/internal/console/apidomains.go
index c21defecc..18bd3d167 100644
--- a/internal/console/apidomains.go
+++ b/internal/console/apidomains.go
@@ -59,7 +59,7 @@ import (
// consoleHosts are the hostnames this console itself answers on: the ORIGIN
// host, plus the REDIRECT HOSTS (CONSOLE_REDIRECT_HOSTS: retired console
-// origins such as tito's carlos.tito.io, which this console still answers on
+// origins such as an old console.example.org, which this console still answers on
// and 301s to Origin). Every deployment refuses these whether or not it
// reserves platform domains (domainHostDenied). The reason is self-harm, not
// tenant isolation: an alias on one of these names points the console's own
diff --git a/internal/console/apidomains_test.go b/internal/console/apidomains_test.go
index a8088c186..00296732e 100644
--- a/internal/console/apidomains_test.go
+++ b/internal/console/apidomains_test.go
@@ -254,7 +254,7 @@ func TestAPIDomainAttachConflictNeutral(t *testing.T) {
// deny domain, under the deployment's apps domain, the console's own origin
// host and a name under it, and a RETIRED console origin
// (CONSOLE_REDIRECT_HOSTS, which this console still answers on and 301s
-// away, such as tito's carlos.tito.io).
+// away, such as an old console.example.org).
func TestAPIDomainAttachValidation(t *testing.T) {
fx, member := instanceFixture(t, "code-dom-validate")
fx.srv.cfg.DenyDomains = []string{"", "denied.test"}
diff --git a/internal/console/apierrors.go b/internal/console/apierrors.go
index f8d6b759f..ec66f3ed6 100644
--- a/internal/console/apierrors.go
+++ b/internal/console/apierrors.go
@@ -98,9 +98,9 @@ func (s *Server) handleAPIAvailability(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, resp)
}
-// telemetryGate is the instance gate plus the owner rule both telemetry
-// doors keep: the browser forms for these settings are owner-only, so the
-// person path here is too. A SERVICE holds no account role (AccountByID does
+// telemetryGate is the instance gate plus the owner rule the telemetry PUT
+// keeps: the browser forms for these settings are owner-only, so the person
+// path here is too. A SERVICE holds no account role (AccountByID does
// not populate Role), which is why this reads the kind first.
func (s *Server) telemetryGate(w http.ResponseWriter, r *http.Request) (string, *Account, string, bool) {
principal, acct, app, ok := s.instanceGate(w, r)
@@ -117,12 +117,18 @@ func (s *Server) telemetryGate(w http.ResponseWriter, r *http.Request) (string,
// handleAPITelemetryGet answers the app-level telemetry object as stored
// (absent halves absent, so the caller sees what is set on the app itself,
-// not what it inherits). The PUT's gate: it is that door's read.
+// not what it inherits). An owner, or a service credential the PUT would
+// take, reads the whole object. A member who is not an owner reads the
+// protection half alone (#491): the Protection tab already shows every
+// member whether the app records only, so `carlos protection` shows them
+// the same; the errors and analytics halves stay the owner's.
func (s *Server) handleAPITelemetryGet(w http.ResponseWriter, r *http.Request) {
- _, acct, app, ok := s.telemetryGate(w, r)
+ _, acct, app, ok := s.instanceGate(w, r)
if !ok {
return
}
+ p, _ := principalFrom(r.Context())
+ protectionOnly := p.Kind == PrincipalUser && acct.Role != RoleOwner
ctx, cancel := context.WithTimeout(r.Context(), instanceStoreTimeout)
defer cancel()
st, _, err := telemetry.Read(ctx, s.cfg.Releases, telemetry.AppKey(acct.Sqid, app))
@@ -131,6 +137,9 @@ func (s *Server) handleAPITelemetryGet(w http.ResponseWriter, r *http.Request) {
jsonError(w, http.StatusBadGateway, "could not read the settings")
return
}
+ if protectionOnly {
+ st = telemetry.Settings{Protection: st.Protection}
+ }
writeJSON(w, http.StatusOK, st)
}
diff --git a/internal/console/apiinstances.go b/internal/console/apiinstances.go
index 797be8a7a..1861a84a6 100644
--- a/internal/console/apiinstances.go
+++ b/internal/console/apiinstances.go
@@ -2189,7 +2189,7 @@ func (s *Server) handleAPIInstanceCreate(w http.ResponseWriter, r *http.Request)
return
}
if chHead != nil {
- if ref := s.statelessRuntimeRefusal(ctx, channel, chHead.Manifest, nil, ""); ref != nil {
+ if ref := s.statelessPublicationRefusal(ctx, acct.Sqid, app, channel, chHead.Manifest, nil, ""); ref != nil {
jsonError(w, ref.Status, ref.Msg)
return
}
@@ -2511,7 +2511,7 @@ func (s *Server) handleAPIInstanceCreate(w http.ResponseWriter, r *http.Request)
if fleetActive != nil && fleetLabelsRecord(rec) && movable(rec) {
if box := fleetActive.chooseDestination(rec.Runtime == provision.RuntimeRootfsV1, ""); box != "" {
if chHead != nil {
- if ref := s.statelessRuntimeRefusal(ctx, channel, chHead.Manifest, fleetActive, box); ref != nil {
+ if ref := s.statelessPublicationRefusal(ctx, acct.Sqid, app, channel, chHead.Manifest, fleetActive, box); ref != nil {
jsonError(w, ref.Status, ref.Msg)
return
}
diff --git a/internal/console/appcopies.go b/internal/console/appcopies.go
index 30b29a4f6..1c0499f4c 100644
--- a/internal/console/appcopies.go
+++ b/internal/console/appcopies.go
@@ -21,14 +21,18 @@ import (
const (
copiesStopping = "copies are still stopping on other boxes. wait for that to finish before selecting a release with a local database"
- copiesBounds = "copies must be a whole number of at least 1"
- copiesCapacity = "%d copies need %d eligible boxes. this fleet has %d"
- copiesRelease = "more than one copy requires a stateless, always-on release. set --copies 1 before selecting this release"
- copiesFloor = "copies above 1 need every fleet box and the console on %s or later. update them and try again"
- copiesUnread = "could not check every instance, release and fleet box, so the copy count was left unchanged. try again"
- copiesManaged = "more than one copy is available for platform-managed instances on an owned fleet only"
- copiesMoving = "this instance has an import or move in progress. finish it before changing the copy count"
- copiesOverlap = "more than one copy needs a release and app policy that let each copy switch builds while its old build keeps serving. change them first"
+ // copiesUnlabelledGrowth (#1008, draft for copy review): host, fleet.
+ copiesUnlabelledGrowth = "%s runs a release without a local database and is not tied to a box of fleet %s, so a second active box would stop it. move it to a release with a local database before adding a box"
+ // copiesUnlabelled (#1008, draft for copy review): host, fleet.
+ copiesUnlabelled = "%s is not tied to one box of fleet %s, and that fleet has more than one box. a release without a local database needs that first, so keep this app on a release with a local database for now"
+ copiesBounds = "copies must be a whole number of at least 1"
+ copiesCapacity = "%d copies need %d eligible boxes. this fleet has %d"
+ copiesRelease = "more than one copy requires a stateless, always-on release. set --copies 1 before selecting this release"
+ copiesFloor = "copies above 1 need every fleet box and the console on %s or later. update them and try again"
+ copiesUnread = "could not check every instance, release and fleet box, so the copy count was left unchanged. try again"
+ copiesManaged = "more than one copy is available for platform-managed instances on an owned fleet only"
+ copiesMoving = "this instance has an import or move in progress. finish it before changing the copy count"
+ copiesOverlap = "more than one copy needs a release and app policy that let each copy switch builds while its old build keeps serving. change them first"
// copy SR-4-C85 (#511 drill 1, R19)
copiesSize = "%d copies need %d boxes with room for size %s. this fleet has %d. choose a smaller size"
// copy SR-4-C91 (#511 drill 1 round 1, Astra A2)
@@ -213,6 +217,9 @@ func (s *Server) copiesRefusal(ctx context.Context, acct *Account, app string, n
if err != nil {
return unread()
}
+ if ref := unlabelledFleetRecordRefusal(reg, recs); ref != nil {
+ return ref
+ }
// A durable create allocation may publish its body during recovery.
// Do not admit a larger count while that record is still pending.
allocations, err := s.store.PendingLifetimesForApp(acct.Sqid, app)
@@ -424,3 +431,163 @@ func (s *Server) copiesSizeRefusal(ctx context.Context, acct *Account, app strin
}
return nil
}
+
+// statelessPublicationRefusal is the check every door that selects a
+// stateless build for an app's instances asks (promote, new canary,
+// rollback, fast-track, instance create): the runtime floor, then
+// unlabelledFleetRefusal (#1008). Hibernating stateless builds included:
+// their wake needs the coordinator too.
+func (s *Server) statelessPublicationRefusal(ctx context.Context, sqid, app, channel string, m *release.Manifest, fleet *fleetView, box string) *doorRefusal {
+ if ref := s.statelessRuntimeRefusal(ctx, channel, m, fleet, box); ref != nil {
+ return ref
+ }
+ if m == nil || !m.Stateless {
+ return nil
+ }
+ return s.unlabelledFleetRefusal(ctx, sqid, app)
+}
+
+// unlabelledFleetRefusal refuses a release without a local database, or
+// more than one copy, for an app with a live instance whose record is
+// placed on a fleet but tied to no box (no fleet_box, no replica
+// assignment) while that fleet has more than one active box (#1008). Every
+// box of the fleet serves such a record (provision ownsRecord), and the
+// console's coordinator door accepts it only on a one-box fleet
+// (replicaFleetRecord's sole-box rule), refusing every box otherwise: a
+// stateless build of it could never wake. Refused here, before anything is
+// published, rather than left to fail at the next wake.
+func (s *Server) unlabelledFleetRefusal(ctx context.Context, sqid, app string) *doorRefusal {
+ recs, err := placeRecords(ctx, s.cfg.Releases, provision.JudgeFrom(ctx), sqid, app)
+ if err != nil {
+ return &doorRefusal{Status: http.StatusServiceUnavailable, Msg: copiesUnread}
+ }
+ if !anyUnlabelledFleetRecord(recs) {
+ return nil
+ }
+ reg, err := s.openPassRegistry()
+ if err != nil {
+ return &doorRefusal{Status: http.StatusServiceUnavailable, Msg: copiesUnread}
+ }
+ return unlabelledFleetRecordRefusal(reg, recs)
+}
+
+func anyUnlabelledFleetRecord(recs []provision.Record) bool {
+ for _, rec := range recs {
+ if _, onFleet := registry.FleetPlacement(rec.Region); onFleet && !rec.Retired && rec.FleetBox == "" && rec.ReplicaAssignment == nil {
+ return true
+ }
+ }
+ return false
+}
+
+// unlabelledFleetRecordRefusal is unlabelledFleetRefusal's judgment over
+// records already read. A fleet whose boxes can't be read answers 503.
+func unlabelledFleetRecordRefusal(reg consoleRegistry, recs []provision.Record) *doorRefusal {
+ active := map[string]int{}
+ for _, rec := range recs {
+ fleet, onFleet := registry.FleetPlacement(rec.Region)
+ if !onFleet || rec.Retired || rec.FleetBox != "" || rec.ReplicaAssignment != nil {
+ continue
+ }
+ n, seen := active[fleet]
+ if !seen {
+ boxes, err := reg.ListFleetBoxes(fleet)
+ if err != nil {
+ return &doorRefusal{Status: http.StatusServiceUnavailable, Msg: copiesUnread}
+ }
+ for _, box := range boxes {
+ if box.Status == "active" {
+ n++
+ }
+ }
+ active[fleet] = n
+ }
+ if n > 1 {
+ return &doorRefusal{Status: http.StatusConflict, Msg: fmt.Sprintf(copiesUnlabelled, rec.Host, fleet)}
+ }
+ }
+ return nil
+}
+
+// fleetGrowthRefusal refuses adding or reactivating label on fleet when that
+// would take the fleet from at most one active box to more than one while
+// an unlabelled instance of the fleet runs a stateless build (#1008): the
+// coordinator door accepts such a record only on a one-box fleet, so the
+// growth alone would cut it off. Reads it can't finish answer 503.
+func (s *Server) fleetGrowthRefusal(ctx context.Context, reg consoleRegistry, acct *Account, fleet, label string) *doorRefusal {
+ return s.fleetGrowthBy(ctx, reg, acct, fleet, label, 1)
+}
+
+// fleetGrowthBy is fleetGrowthRefusal for adding boxes boxes at once (a
+// managed fleet's add, judged at reservation so nothing is provisioned).
+// label, when set, is the one box being added: already active, it is not
+// growth.
+func (s *Server) fleetGrowthBy(ctx context.Context, reg consoleRegistry, acct *Account, fleet, label string, boxes int) *doorRefusal {
+ unread := &doorRefusal{Status: http.StatusServiceUnavailable, Msg: msgFleetBoxNotAdded}
+ listed, err := reg.ListFleetBoxes(fleet)
+ if err != nil {
+ return unread
+ }
+ active := 0
+ for _, b := range listed {
+ if b.Status == "active" {
+ if label != "" && b.Label == label {
+ return nil // already active: not growth (the door answers the duplicate)
+ }
+ active++
+ }
+ }
+ if boxes < 1 || active+boxes <= 1 {
+ return nil
+ }
+ if s.cfg.Releases == nil {
+ return unread
+ }
+ apps, err := s.store.AppsIn(acct.ID)
+ if err != nil {
+ return unread
+ }
+ for _, app := range apps {
+ recs, err := placeRecords(ctx, s.cfg.Releases, provision.JudgeFrom(ctx), acct.Sqid, app)
+ if err != nil {
+ return unread
+ }
+ for _, rec := range recs {
+ if rec.Retired || rec.Region != "fleet/"+fleet || rec.FleetBox != "" || rec.ReplicaAssignment != nil {
+ continue
+ }
+ stateless, err := s.channelHeadStateless(ctx, acct.Sqid, app, rec.Channel)
+ if err != nil {
+ return unread
+ }
+ if stateless {
+ return &doorRefusal{Status: http.StatusConflict, Msg: fmt.Sprintf(copiesUnlabelledGrowth, rec.Host, fleet)}
+ }
+ }
+ }
+ return nil
+}
+
+// channelHeadStateless reports whether channel's current build declares no
+// local database. No channel, or an empty one, is false; a read that
+// fails is an error, never false.
+func (s *Server) channelHeadStateless(ctx context.Context, sqid, app, channel string) (bool, error) {
+ if channel == "" {
+ return false, nil
+ }
+ ptr, err := release.Channel(ctx, s.cfg.Releases, s.cfg.ReleasePub, sqid, app, channel)
+ if errors.Is(err, os.ErrNotExist) {
+ return false, nil
+ }
+ if err != nil {
+ return false, err
+ }
+ if ptr == nil || ptr.Version == "" {
+ return false, nil
+ }
+ m, err := release.GetManifest(ctx, s.cfg.Releases, sqid, app, ptr.Version)
+ if err != nil {
+ return false, err
+ }
+ return m != nil && m.Stateless, nil
+}
diff --git a/internal/console/copiespublication_test.go b/internal/console/copiespublication_test.go
index ba4544803..dc226cda1 100644
--- a/internal/console/copiespublication_test.go
+++ b/internal/console/copiespublication_test.go
@@ -175,7 +175,10 @@ func TestCopiesPublicationEvidence(t *testing.T) {
{"unread config unsafe", false, false, "config", 503},
{"unread config safe", false, true, "config", 200},
{"unread inventory unsafe", true, false, "record", 503},
- {"unread inventory safe", true, true, "record", 200},
+ // A stateless target reads the inventory for #1008's guard (an
+ // unlabelled record on a multi-box fleet), and an unreadable one
+ // refuses with a retry rather than publish unchecked.
+ {"unread inventory safe", true, true, "record", 503},
} {
t.Run(tc.name, func(t *testing.T) {
fx, token := copiesWorld(t)
@@ -210,8 +213,11 @@ func TestCopiesPublicationEvidence(t *testing.T) {
if counter.gets[cfgKey] != 1 {
t.Fatalf("config GETs=%d, want exactly one", counter.gets[cfgKey])
}
- if (!tc.explicit || tc.safe) && counter.gets[recKey] != 0 {
- t.Fatal("legacy/safe target read assignments")
+ if !tc.explicit && !tc.safe && counter.gets[recKey] != 0 {
+ t.Fatal("legacy target read assignments")
+ }
+ if tc.safe && tc.failure != "record" && counter.gets[recKey] == 0 {
+ t.Fatal("stateless target published without reading the inventory (#1008)")
}
})
}
diff --git a/internal/console/copiesunlabelled_test.go b/internal/console/copiesunlabelled_test.go
new file mode 100644
index 000000000..45196679d
--- /dev/null
+++ b/internal/console/copiesunlabelled_test.go
@@ -0,0 +1,249 @@
+package console
+
+import (
+ "context"
+ "crypto/ed25519"
+ "crypto/rand"
+ "fmt"
+ "net/http"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/provision"
+ "github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
+)
+
+// unlabelledStatelessCutOff lists the instances of shop that no box of fleet
+// pi could ever coordinate (#1008): live, on the fleet, tied to no box (no
+// fleet_box, no replica assignment), on a fleet with more than one active box
+// (the coordinator door's sole-box rule refuses every box), while their
+// channel's current build declares no local database.
+func unlabelledStatelessCutOff(t *testing.T, fx *consoleFixture) []string {
+ t.Helper()
+ ctx := context.Background()
+ reg := openTestReg(t, fx)
+ defer reg.Close()
+ boxes, err := reg.ListFleetBoxes("pi")
+ if err != nil {
+ t.Fatal(err)
+ }
+ active := 0
+ for _, b := range boxes {
+ if b.Status == "active" {
+ active++
+ }
+ }
+ recs, err := placeRecords(ctx, fx.rel, nil, fx.sqid, "shop")
+ if err != nil {
+ t.Fatal(err)
+ }
+ var out []string
+ for _, rec := range recs {
+ if rec.Retired || rec.Region != "fleet/pi" || rec.FleetBox != "" || rec.ReplicaAssignment != nil || active <= 1 {
+ continue
+ }
+ stateless, err := fx.srv.channelHeadStateless(ctx, fx.sqid, "shop", rec.Channel)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if stateless {
+ out = append(out, rec.Host)
+ }
+ }
+ return out
+}
+
+// TestNoTransitionCutsOffAStatelessInstance (#1008, invariant): from each
+// starting world, every transition the console ACCEPTS leaves no stateless
+// instance that every fleet box would be refused (unlabelledStatelessCutOff
+// is empty). The transitions are the trimmed guard's doors: a --stateless
+// ship, a stateless promote, a rollback onto a stateless build, copies 2,
+// and adding or reactivating a box. The labelled world is the control:
+// there the guard refuses nothing.
+func TestNoTransitionCutsOffAStatelessInstance(t *testing.T) {
+ unlabel := func(t *testing.T, fx *consoleFixture) {
+ placementEdit(t, fx, "a.example.com", func(r *provision.Record) { r.FleetBox, r.FleetBoxAt = "", "" })
+ }
+ type world struct {
+ name string
+ setup func(t *testing.T, fx *consoleFixture)
+ // refused names the transitions this world must refuse with the
+ // #1008 refusal; every other transition must succeed, except a
+ // reactivation of a box that is already active (the duplicate).
+ refused map[string]bool
+ // other names a transition this world refuses for its own reason
+ // (not #1008), by a fragment of the refusal.
+ other map[string]string
+ }
+ // edgeHistory gives edge a previous stateless build, so a rollback
+ // selects one (v2, then back to v1).
+ edgeHistory := func(t *testing.T, fx *consoleFixture) {
+ if err := release.Promote(context.Background(), fx.rel, fx.priv, fx.sqid, "shop", "edge", "v2"); err != nil {
+ t.Fatal(err)
+ }
+ }
+ worlds := []world{
+ {"two boxes, unlabelled, edge on a local-database build", func(t *testing.T, fx *consoleFixture) {
+ unlabel(t, fx)
+ shipVersion(t, fx, "shop", "s1")
+ if err := release.Promote(context.Background(), fx.rel, fx.priv, fx.sqid, "shop", "edge", "s1"); err != nil {
+ t.Fatal(err)
+ }
+ }, map[string]bool{"ship stateless": true, "promote stateless onto edge": true, "rollback edge": true, "copies 2": true}, nil},
+ {"one box, unlabelled, edge stateless and working", func(t *testing.T, fx *consoleFixture) {
+ edgeHistory(t, fx)
+ unlabel(t, fx)
+ placementEdit(t, fx, "b.example.com", func(r *provision.Record) { r.FleetBox = "pi-1" })
+ reg := openTestReg(t, fx)
+ defer reg.Close()
+ if err := reg.SetFleetBoxStatus("pi", "pi-2", "detached"); err != nil {
+ t.Fatal(err)
+ }
+ }, map[string]bool{"reactivate pi-2": true, "add pi-3": true}, map[string]string{"copies 2": "eligible boxes"}},
+ {"two boxes, labelled", edgeHistory, nil, nil},
+ }
+ type transition struct {
+ name string
+ do func(t *testing.T, fx *consoleFixture, token string) (int, string)
+ }
+ api := func(method, path, body string) func(*testing.T, *consoleFixture, string) (int, string) {
+ return func(t *testing.T, fx *consoleFixture, token string) (int, string) {
+ return copiesCall(t, fx, token, copiesDoor{path, method, path, body})
+ }
+ }
+ addBox := func(label string) func(*testing.T, *consoleFixture, string) (int, string) {
+ return func(t *testing.T, fx *consoleFixture, token string) (int, string) {
+ code, body := postJSON(t, fleetsURL(fx, fx.sqid)+"/pi/boxes", map[string]string{"label": label}, token)
+ return code, fmt.Sprint(body)
+ }
+ }
+ transitions := []transition{
+ {"ship stateless", func(t *testing.T, fx *consoleFixture, token string) (int, string) {
+ code, body := postShip(t, fx.ts.URL+"/api/cli/apps/"+fx.sqid+"/shop/releases", token, []shipPart{metaStateless(t, "v3"), {name: "linux-amd64", body: tinyProgramForConsole(t, "example.com/shop")}})
+ return code, fmt.Sprint(body)
+ }},
+ {"promote stateless onto edge", api("POST", "/promote", `{"channel":"edge","version":"v2","hotfix":true}`)},
+ {"rollback edge", api("POST", "/rollback", `{"channel":"edge"}`)},
+ {"copies 2", func(t *testing.T, fx *consoleFixture, token string) (int, string) {
+ return copiesPut(t, fx, token, `{"copies":2}`)
+ }},
+ {"reactivate pi-2", addBox("pi-2")},
+ {"add pi-3", addBox("pi-3")},
+ }
+ for _, w := range worlds {
+ for _, tr := range transitions {
+ t.Run(w.name+"/"+tr.name, func(t *testing.T) {
+ fx, token := copiesWorld(t)
+ w.setup(t, fx)
+ if cut := unlabelledStatelessCutOff(t, fx); len(cut) != 0 {
+ t.Fatalf("world starts broken: %v", cut)
+ }
+ code, out := tr.do(t, fx, token)
+ ours := code == http.StatusConflict && (strings.Contains(out, "is not tied to one box") || strings.Contains(out, "is not tied to a box"))
+ switch {
+ case w.refused[tr.name]:
+ if !ours {
+ t.Fatalf("want the #1008 refusal, got %d %s", code, out)
+ }
+ case w.other[tr.name] != "":
+ if code < 300 || ours || !strings.Contains(out, w.other[tr.name]) {
+ t.Fatalf("want this world's own refusal %q, got %d %s", w.other[tr.name], code, out)
+ }
+ case tr.name == "reactivate pi-2" && w.name != "one box, unlabelled, edge stateless and working":
+ // pi-2 is already active: the duplicate answer.
+ if code != http.StatusConflict || ours {
+ t.Fatalf("duplicate box: %d %s", code, out)
+ }
+ default:
+ if code >= 300 {
+ t.Fatalf("want accepted, got %d %s", code, out)
+ }
+ }
+ if code < 300 {
+ if cut := unlabelledStatelessCutOff(t, fx); len(cut) != 0 {
+ t.Fatalf("accepted %d %s, and left %v cut off from every box", code, out, cut)
+ }
+ }
+ })
+ }
+ }
+}
+
+// TestStatelessPublicationCoversHibernating: a hibernating stateless build
+// needs the coordinator to wake, so the publication check refuses it too.
+func TestStatelessPublicationCoversHibernating(t *testing.T) {
+ fx, _ := copiesWorld(t)
+ placementEdit(t, fx, "a.example.com", func(r *provision.Record) { r.FleetBox, r.FleetBoxAt = "", "" })
+ ctx := withWriteMemo(t.Context())
+ m := &release.Manifest{App: "shop", Version: "h1", Kind: release.KindRootfs, Stateless: true, Hibernate: true}
+ ref := fx.srv.unlabelledFleetRefusal(ctx, fx.sqid, "shop")
+ if ref == nil || ref.Msg != fmt.Sprintf(copiesUnlabelled, "a.example.com", "pi") {
+ t.Fatalf("unlabelled guard: %+v", ref)
+ }
+ if got := fx.srv.statelessPublicationRefusal(ctx, fx.sqid, "shop", "edge", m, nil, ""); got == nil || got.Status != http.StatusConflict || got.Msg != fmt.Sprintf(copiesUnlabelled, "a.example.com", "pi") {
+ t.Fatalf("hibernating stateless publication: %+v", got)
+ }
+}
+
+func metaStateless(t *testing.T, version string) shipPart {
+ t.Helper()
+ return shipPart{name: "meta", body: []byte(`{"version":"` + version + `","kind":"binary","stateless":true}`)}
+}
+
+// TestManagedGrowthCannotCutOffStatelessInstance (#1008): a managed fleet's
+// add is the other way a fleet grows. With one active box and an unlabelled
+// instance whose channel runs a stateless build, the add is refused before
+// anything is reserved; with the record labelled, it is reserved.
+func TestManagedGrowthCannotCutOffStatelessInstance(t *testing.T) {
+ for _, labelled := range []bool{false, true} {
+ t.Run(fmt.Sprintf("labelled=%v", labelled), func(t *testing.T) {
+ s := managedAPIFixture(t)
+ ctx := context.Background()
+ managedAPIReply(t, managedAPICall(s, "create", "abc", "", managedAPIBody("a", 1)))
+ // The create has run its course; an add may be asked.
+ s.store.db.Exec(`UPDATE managed_ops SET state='failed',error='managed_preparation_failed'`)
+ reg, err := registry.Open(s.cfg.Registry)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer reg.Close()
+ if err := reg.AddManagedFleetBox(registry.FleetBox{Fleet: "production", Label: "m-1", TokenHash: strings.Repeat("a", 64), Status: "active", AddedAt: time.Now().Unix()}, time.Now().Unix()); err != nil {
+ t.Fatal(err)
+ }
+ pub, priv, _ := ed25519.GenerateKey(rand.Reader)
+ s.cfg.ReleasePub = pub
+ if _, err := s.store.CreateAppIn(42, "shop", "owner@example.com", time.Now()); err != nil {
+ t.Fatal(err)
+ }
+ m := release.Manifest{Schema: 1, Kind: "binary", App: "shop", Version: "v1", Stateless: true, Artifacts: map[string]release.Artifact{"linux-amd64": {File: "app"}}}
+ if err := release.Ship(ctx, s.cfg.Releases, "abc", m, map[string][]byte{"linux-amd64": []byte("app")}); err != nil {
+ t.Fatal(err)
+ }
+ if err := release.Promote(ctx, s.cfg.Releases, priv, "abc", "shop", "edge", "v1"); err != nil {
+ t.Fatal(err)
+ }
+ rec := provision.Record{Schema: 1, Host: "a.example.com", Slug: "a", App: "shop", Account: "abc", Region: "fleet/production", Channel: "edge", CreatedAt: time.Now().UTC()}
+ if labelled {
+ rec.FleetBox = "m-1"
+ }
+ if err := provision.CreateRecord(ctx, s.cfg.Releases, rec); err != nil {
+ t.Fatal(err)
+ }
+ w := managedAPICall(s, "add", "abc", "production", `{"boxes":1,"request_id":"bbbbbbbbbbbbbbbbbbbbbb"}`)
+ var adds int
+ s.store.db.QueryRow(`SELECT count(*) FROM managed_ops WHERE kind='add'`).Scan(&adds)
+ want := fmt.Sprintf(copiesUnlabelledGrowth, "a.example.com", "production")
+ if labelled {
+ if w.Code >= 300 || adds != 1 {
+ t.Fatalf("labelled control: %d %s, add ops %d", w.Code, w.Body, adds)
+ }
+ return
+ }
+ if w.Code != http.StatusConflict || !strings.Contains(w.Body.String(), want) || adds != 0 {
+ t.Fatalf("unlabelled: %d %s, add ops %d, want 409 %q and nothing reserved", w.Code, w.Body, adds, want)
+ }
+ })
+ }
+}
diff --git a/internal/console/fleets.go b/internal/console/fleets.go
index 06f861fbc..4257d039d 100644
--- a/internal/console/fleets.go
+++ b/internal/console/fleets.go
@@ -414,6 +414,13 @@ func (s *Server) handleAPIFleetAddBox(w http.ResponseWriter, r *http.Request) {
"invalid box label — 1-32 characters of a-z, 0-9 and hyphen")
return
}
+ // #1008: a second active box would cut off an unlabelled instance that
+ // runs a stateless build on a one-box fleet (the coordinator's sole-box
+ // rule). AddFleetBox both adds and reactivates, so this covers both.
+ if ref := s.fleetGrowthRefusal(r.Context(), reg, acct, fleet.Name, label); ref != nil {
+ writeDoorRefusalJSON(w, r, ref)
+ return
+ }
plaintext, hash, err := mintFleetToken()
if err != nil {
log.Printf("console: fleet add-box %s/%s: mint token: %v", acct.Sqid, fleet.Name, err)
diff --git a/internal/console/managedapi.go b/internal/console/managedapi.go
index cae3d2791..a957f8c5a 100644
--- a/internal/console/managedapi.go
+++ b/internal/console/managedapi.go
@@ -137,7 +137,7 @@ func (s *Server) handleAPIManagedFleetCreate(w http.ResponseWriter, r *http.Requ
s.managedAPIReserved(w, r, op)
}
func (s *Server) handleAPIManagedFleetAdd(w http.ResponseWriter, r *http.Request) {
- addr, acct, fleet, _, ok := s.apiFleet(w, r)
+ addr, acct, fleet, reg, ok := s.apiFleet(w, r)
if !ok {
return
}
@@ -181,6 +181,13 @@ func (s *Server) handleAPIManagedFleetAdd(w http.ResponseWriter, r *http.Request
if !s.managedAPIEntitlement(w, acct) {
return
}
+ // #1008: growth past one active box must not cut off an unlabelled
+ // instance running a stateless build. Judged before the reservation,
+ // so nothing is provisioned on a refusal.
+ if ref := s.fleetGrowthBy(r.Context(), reg, acct, fleet.Name, "", req.Boxes); ref != nil {
+ writeDoorRefusalJSON(w, r, ref)
+ return
+ }
op, _, _, err := s.reserveManagedFleet(r.Context(), req)
if err != nil {
s.managedAPIError(w, err)
diff --git a/internal/console/protectionsetting_test.go b/internal/console/protectionsetting_test.go
index 344de2c57..9bf3b49eb 100644
--- a/internal/console/protectionsetting_test.go
+++ b/internal/console/protectionsetting_test.go
@@ -264,8 +264,9 @@ func TestAPITelemetryProtectionAuditLine(t *testing.T) {
}
}
-// The read beside the PUT: the app's stored settings as stored, under the
-// PUT's gate (Operate, and a person must own the account).
+// The read beside the PUT: the app's stored settings as stored, for an
+// Operate credential or an owner. A member reads the protection half alone,
+// as the Protection tab shows it to them (#491).
func TestAPITelemetryGet(t *testing.T) {
fx, _ := ptFixture(t)
getURL := fx.ts.URL + "/api/cli/apps/" + fx.sqid + "/shop/telemetry"
@@ -297,7 +298,24 @@ func TestAPITelemetryGet(t *testing.T) {
t.Fatal(err)
}
member := cliToken(t, fx, "kim@keymail.dev", "code-ps-get-member")
- if status, _, body := rawReq(t, http.MethodGet, getURL, member, ""); status != http.StatusForbidden {
- t.Fatalf("member GET = %d %s, want 403", status, body)
+ status, _, body = rawReq(t, http.MethodGet, getURL, member, "")
+ var st telemetry.Settings
+ if status != http.StatusOK || json.Unmarshal([]byte(body), &st) != nil || !telemetry.RecordOnly(st) ||
+ st.Errors != nil || st.Analytics != nil || strings.Contains(body, "log_level") {
+ t.Fatalf("member GET = %d %s, want the protection half alone", status, body)
+ }
+ // Nothing stored for protection: a member sees nothing at all.
+ if err := telemetry.Update(context.Background(), fx.rel, telemetry.AppKey(fx.sqid, "shop"), func(st *telemetry.Settings) {
+ st.Protection = nil
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if status, _, body := rawReq(t, http.MethodGet, getURL, member, ""); status != http.StatusOK || strings.TrimSpace(body) != "{}" {
+ t.Fatalf("member GET with no protection stored = %d %s, want {}", status, body)
+ }
+ // A stranger to the account gets nothing.
+ stranger := cliToken(t, fx, "sam@keymail.dev", "code-ps-get-stranger")
+ if status, _, body := rawReq(t, http.MethodGet, getURL, stranger, ""); status == http.StatusOK {
+ t.Fatalf("non-member GET = %d %s, want a refusal", status, body)
}
}
diff --git a/internal/console/rootfs.go b/internal/console/rootfs.go
index 0752ad035..e0e4a7dae 100644
--- a/internal/console/rootfs.go
+++ b/internal/console/rootfs.go
@@ -79,7 +79,7 @@ func (s *Server) statelessVersionRefusal(ctx context.Context, acct, app, channel
if err != nil {
return nil
}
- return s.statelessRuntimeRefusal(ctx, channel, m, nil, "")
+ return s.statelessPublicationRefusal(ctx, acct, app, channel, m, nil, "")
}
type statelessSelectionError struct{ ref *doorRefusal }
diff --git a/internal/console/server.go b/internal/console/server.go
index 98e73d774..d56ffc903 100644
--- a/internal/console/server.go
+++ b/internal/console/server.go
@@ -5876,7 +5876,7 @@ func (s *Server) handlePromote(w http.ResponseWriter, r *http.Request) {
back("err", ref.Msg)
return
}
- if ref := s.statelessRuntimeRefusal(ctx, channel, man, nil, ""); ref != nil {
+ if ref := s.statelessPublicationRefusal(ctx, acct.Sqid, app, channel, man, nil, ""); ref != nil {
back("err", ref.Msg)
return
}
@@ -6610,7 +6610,7 @@ func (s *Server) handleNewCanary(w http.ResponseWriter, r *http.Request) {
back("err", ref.Msg)
return
}
- if ref := s.statelessRuntimeRefusal(ctx, channel, man, nil, ""); ref != nil {
+ if ref := s.statelessPublicationRefusal(ctx, acct.Sqid, app, channel, man, nil, ""); ref != nil {
back("err", ref.Msg)
return
}
diff --git a/internal/domains/claims_proof_test.go b/internal/domains/claims_proof_test.go
index 6a8efc0e8..cf3e450af 100644
--- a/internal/domains/claims_proof_test.go
+++ b/internal/domains/claims_proof_test.go
@@ -186,7 +186,7 @@ func TestChallengeTokenIsBound(t *testing.T) {
base := ChallengeToken("console.carloku.com", "bes", "shop.example.com")
for name, other := range map[string]string{
"another account": ChallengeToken("console.carloku.com", "bab", "shop.example.com"),
- "another deployment": ChallengeToken("carlos.tito.io", "bes", "shop.example.com"),
+ "another deployment": ChallengeToken("console.example.net", "bes", "shop.example.com"),
"another host": ChallengeToken("console.carloku.com", "bes", "www.example.com"),
} {
if other == base {
diff --git a/internal/edge/burst_edge_test.go b/internal/edge/burst_edge_test.go
index eed075b06..fbf4fca11 100644
--- a/internal/edge/burst_edge_test.go
+++ b/internal/edge/burst_edge_test.go
@@ -220,11 +220,11 @@ func (g *burstRig) wantRefused(t *testing.T, w *httptest.ResponseRecorder, until
return code
}
-// The scanner's 60th not-found trips it. In the default (watch) mode its
-// 61st catalogue request still reaches the app, and is recorded as the
-// refusal it would have been, saying the cool-down started on this app.
+// The scanner's 60th not-found trips it. In watch mode its 61st catalogue
+// request still reaches the app, and is recorded as the refusal it would
+// have been, saying the cool-down started on this app.
func TestBurstTripsAndRecordsWouldRefuse(t *testing.T) {
- g := newBurstRig(t, "")
+ g := newBurstRig(t, "watch")
until := g.trip(t, burstHost)
tr := g.rec.trips[0]
ref, err := reqrec.ParseRef(tr.Ref, g.key)
@@ -263,6 +263,51 @@ func TestBurstRefusesInBlockMode(t *testing.T) {
}
}
+// The promotion (#491): in the default mode the burst rule refuses. After
+// the trip the cooling client's next catalogue request is refused on the
+// app it tripped on and on another app, an ordinary page still reaches the
+// app, and the probe rules themselves still only watch for a client that is
+// not cooling. The app's record-only switch turns the refusal off for that
+// app alone.
+func TestBurstCatalogueRefusesByDefault(t *testing.T) {
+ g := newBurstRig(t, "", burstHost+"/about")
+ if g.e.guard != guardCatalogue {
+ t.Fatalf("guard mode %v, want the catalogue's", g.e.guard)
+ }
+ until := g.trip(t, burstHost)
+ n := g.upstream.Load()
+ code := g.wantRefused(t, g.get(burstHost, "/wp-login.php"), until)
+ m := g.lastMatch(t, "/wp-login.php")
+ wantBurstMatch(t, m, reqrec.KindBlock, reqrec.CooldownFromThisApp, until)
+ if m.Ref != code || m.Status != 429 || g.upstream.Load() != n {
+ t.Fatalf("this app: %+v, upstream %d; want the refusal", m, g.upstream.Load()-n)
+ }
+ g.wantRefused(t, g.get(burstOther, "/xmlrpc.php"), until)
+ wantBurstMatch(t, g.lastMatch(t, "/xmlrpc.php"), reqrec.KindBlock, reqrec.CooldownFromOtherApp, until)
+ if w := g.get(burstHost, "/about"); w.Code != 200 || w.Body.String() != "page /about" {
+ t.Fatalf("/about: %d %q, want the page", w.Code, w.Body.String())
+ }
+
+ r := httptest.NewRequest("GET", "http://"+burstHost+"/wp-login.php", nil)
+ r.RemoteAddr = "198.51.100.7:4000"
+ w := httptest.NewRecorder()
+ g.e.ServeHTTP(w, r)
+ if w.Code != 404 || w.Body.String() != "the app's own 404" {
+ t.Fatalf("a client not cooling: %d %q, want the app's answer", w.Code, w.Body.String())
+ }
+ if m := g.lastMatch(t, "/wp-login.php"); m.Kind != reqrec.KindWatch || m.Tier != reqrec.TierProbe {
+ t.Fatalf("a client not cooling: match %+v, want the probe watch", m)
+ }
+
+ g.e.SetProtectionRecordOnly(map[string]bool{"bdk/shop": true})
+ n = g.upstream.Load()
+ if w := g.get(burstHost, "/wp-login.php"); w.Code != 404 || w.Body.String() != "the app's own 404" || g.upstream.Load() != n+1 {
+ t.Fatalf("record only: %d %q, want the app's answer", w.Code, w.Body.String())
+ }
+ wantBurstMatch(t, g.lastMatch(t, "/wp-login.php"), reqrec.KindWatch, reqrec.CooldownFromThisApp, until)
+ g.wantRefused(t, g.get(burstOther, "/wp-login.php"), until)
+}
+
// Review Focus 1: a page that is not in the catalogue is never refused,
// whoever shares the address.
func TestBurstNeverRefusesAnOrdinaryPage(t *testing.T) {
@@ -318,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) {
@@ -400,21 +478,31 @@ func TestBurstFleetAppNeverRefused(t *testing.T) {
}
// One request has one verdict, one record and one Protection count, however
-// many rules it meets.
+// many rules it meets. In the default mode that count is a block: the burst
+// rule refuses, and the Protection tab counts a refusal as blocked.
func TestBurstOneVerdictPerRequest(t *testing.T) {
- g := newBurstRig(t, "")
- until := g.trip(t, burstHost)
- g.meter.Drain()
- matches := len(g.rec.match)
- g.get(burstHost, "/wp-login.php")
- if len(g.rec.match) != matches+1 {
- t.Fatalf("%d matches for one request", len(g.rec.match)-matches)
- }
- wantBurstMatch(t, g.lastMatch(t, "/wp-login.php"), reqrec.KindWatch, reqrec.CooldownFromThisApp, until)
- f := g.meter.Drain()
- d, ok := f.Guard[usage.GuardKey(burstHost, "bdk", "shop")]
- if len(f.Guard) != 1 || !ok || d.Checked != 1 || d.Watch != 1 || d.Block != 0 || !maps.Equal(d.Groups, map[string]int64{"burst/probe-burst": 1}) {
- t.Fatalf("guard counts %+v, want one recorded burst/probe-burst", f.Guard)
+ for _, tc := range []struct {
+ protect string
+ kind reqrec.Kind
+ watch, block int64
+ }{
+ {"", reqrec.KindBlock, 0, 1},
+ {"watch", reqrec.KindWatch, 1, 0},
+ } {
+ g := newBurstRig(t, tc.protect)
+ until := g.trip(t, burstHost)
+ g.meter.Drain()
+ matches := len(g.rec.match)
+ g.get(burstHost, "/wp-login.php")
+ if len(g.rec.match) != matches+1 {
+ t.Fatalf("mode %q: %d matches for one request", tc.protect, len(g.rec.match)-matches)
+ }
+ wantBurstMatch(t, g.lastMatch(t, "/wp-login.php"), tc.kind, reqrec.CooldownFromThisApp, until)
+ f := g.meter.Drain()
+ d, ok := f.Guard[usage.GuardKey(burstHost, "bdk", "shop")]
+ if len(f.Guard) != 1 || !ok || d.Checked != 1 || d.Watch != tc.watch || d.Block != tc.block || !maps.Equal(d.Groups, map[string]int64{"burst/probe-burst": 1}) {
+ t.Fatalf("mode %q: guard counts %+v, want one %s burst/probe-burst", tc.protect, f.Guard, tc.kind)
+ }
}
}
@@ -436,9 +524,11 @@ func TestBurstWatchNeverWeakensABlock(t *testing.T) {
}
})
t.Run("static rewrite", func(t *testing.T) {
- // The default mode, where the burst rule watches and the .env rule
- // blocks. The .git rule watches here, so a hard-tier request path
- // whose own verdict does not block still reaches the static handler.
+ // The default mode with the burst rule watching, as an app's own
+ // exemption will make it, and the .env rule blocking. The .git rule
+ // watches here, so a hard-tier request path whose own verdict does
+ // not block still reaches the static handler.
+ demoteBurstRule(t)
g := newBurstStaticRig(t, "", map[string]string{".env": "SECRET=1", "_redirects": "/* /.env 200\n"})
until := g.trip(t, burstHost)
env, ok := edgeguard.RuleByID("hard.secrets.env")
@@ -471,8 +561,8 @@ func TestBurstWatchNeverWeakensABlock(t *testing.T) {
if m := g.lastMatch(t, "/.git/config"); m.Kind != reqrec.KindBlock || m.RuleID != "hard.secrets.env" {
t.Fatalf("/.git/config: match %+v, want the hard block", m)
}
- // Without the promotion the burst watch stands, as the first
- // verdict that does not block.
+ // With the .env rule watching too, the burst watch stands, as the
+ // first verdict that does not block.
env.Mode = edgeguard.ModeWatch
g.get(burstHost, "/wp-login.php")
wantBurstMatch(t, g.lastMatch(t, "/wp-login.php"), reqrec.KindWatch, reqrec.CooldownFromThisApp, until)
@@ -795,13 +885,14 @@ func TestBurstStaleFillCountedOnceAtTheHome(t *testing.T) {
}
}
-// promoteBurstRule sets the burst rule's catalogue mode to block for the
-// test, as the later one-line promotion will: in the default mode the burst
-// rule then refuses while the probe rules still only watch.
-func promoteBurstRule(t *testing.T) {
+// demoteBurstRule sets the burst rule's catalogue mode back to watch for the
+// test, as it was before the promotion (#491): in the default mode the burst
+// rule then only records.
+func demoteBurstRule(t *testing.T) {
t.Helper()
- edgeguard.BurstRule.Mode = edgeguard.ModeBlock
- t.Cleanup(func() { edgeguard.BurstRule.Mode = edgeguard.ModeWatch })
+ mode := edgeguard.BurstRule.Mode
+ edgeguard.BurstRule.Mode = edgeguard.ModeWatch
+ t.Cleanup(func() { edgeguard.BurstRule.Mode = mode })
}
// Fix round 1, finding 2: a static site's own file is never refused by the
@@ -826,8 +917,7 @@ func TestBurstNeverRefusesAnExistingStaticHardFile(t *testing.T) {
}
}
})
- t.Run("burst rule promoted", func(t *testing.T) {
- promoteBurstRule(t)
+ t.Run("default mode", func(t *testing.T) {
// With the .env rule watching (as an app's own allow rule will make
// it), a burst refusal still never takes a file the site has.
env, ok := edgeguard.RuleByID("hard.secrets.env")
diff --git a/internal/edge/burst_notice.go b/internal/edge/burst_notice.go
index a5a518d75..d174957bf 100644
--- a/internal/edge/burst_notice.go
+++ b/internal/edge/burst_notice.go
@@ -385,6 +385,27 @@ func (e *Edge) runBurstPeer(n *burstNotices, p *burstPeer) {
}
}
+// burstPeerCurrent reports whether p is still one of this box's notice
+// peers in the home map as it stands now, pruning every peer that is not.
+// A box that left the edges files, stopped advertising notices or lost its
+// dial address is otherwise pruned only on the next trip, so a notice
+// queued for it, or waiting for a slot in the budget, would still be sent
+// to it (#491 follow-up). Checked before every slot is taken, so a dropped
+// notice never spends one.
+func (e *Edge) burstPeerCurrent(n *burstNotices, p *burstPeer) bool {
+ m := e.homes.Load()
+ if m == nil {
+ return false
+ }
+ // The snapshot is read under n.mu, as sendBurstNotices reads it, so a
+ // worker can never prune with a map older than the one a newer peer was
+ // created from (Astra R1 P2).
+ n.mu.Lock()
+ defer n.mu.Unlock()
+ n.pruneLocked(n.targetsLocked(m.snapshot(), e.box, m.privateDial))
+ return n.peers[p.box] == p
+}
+
// retire removes an idle peer, unless a notice arrived for it meanwhile.
func (n *burstNotices) retire(p *burstPeer) bool {
n.mu.Lock()
@@ -405,6 +426,11 @@ func (n *burstNotices) retire(p *burstPeer) bool {
func (e *Edge) dispatchBurstNotice(n *burstNotices, p *burstPeer, nt burstNotice) {
var at time.Time
for {
+ if !e.burstPeerCurrent(n, p) {
+ n.count(func(s *burstNoticeStats) { s.Gone++ })
+ e.logThrottled("burst-notice-gone", fmt.Sprintf("probe-burst notice to %s dropped: the box left the edges files", p.box))
+ return
+ }
now := e.burstNow()
if now.Sub(nt.trip) > burstNoticeMaxAge || !nt.until.After(now) {
n.count(func(s *burstNoticeStats) { s.Stale++ })
diff --git a/internal/edge/burst_notice_test.go b/internal/edge/burst_notice_test.go
index 2f578afae..ad07e8706 100644
--- a/internal/edge/burst_notice_test.go
+++ b/internal/edge/burst_notice_test.go
@@ -3,6 +3,7 @@ package edge
import (
"bufio"
"bytes"
+ "cmp"
"context"
"crypto/rand"
"crypto/tls"
@@ -309,9 +310,19 @@ func transmitted(x *noticeEdge) int64 {
}
// A client that trips on annie is refused on betty, on betty's own app,
-// with the record saying the cool-down started on another app.
+// with the record saying the cool-down started on another app: in block
+// mode, and in the default mode since the promotion (#491).
func TestBurstNoticeAppliesOnThePeer(t *testing.T) {
- s := newNoticeScene(t, true)
+ for _, protect := range []string{"block", ""} {
+ t.Run("mode "+cmp.Or(protect, "default"), func(t *testing.T) {
+ s := newNoticeScene(t, true)
+ t.Setenv("CARLOS_EDGE_PROTECT", protect)
+ burstNoticeAppliesOnThePeer(t, s)
+ })
+ }
+}
+
+func burstNoticeAppliesOnThePeer(t *testing.T, s *noticeScene) {
a := s.add(t, "annie", "127.0.0.11", "shop.example.com", "bdk", "shop", true)
b := s.add(t, "betty", "127.0.0.12", "blog.example.com", "bab", "blog", true)
s.publish(t)
@@ -542,6 +553,111 @@ func TestBurstNoticeOnlyToAdvertisingPeers(t *testing.T) {
}
}
+// #491 follow-up: a peer that leaves while a notice for it waits for a slot
+// in the budget is dropped at dispatch, not sent once the slot frees, and
+// its worker stops then rather than on the next trip. A peer that stayed
+// still gets its notice.
+func TestBurstNoticeDepartedPeerStopsAtDispatch(t *testing.T) {
+ s := newNoticeScene(t, true)
+ a := s.add(t, "annie", "127.0.0.11", "shop.example.com", "bdk", "shop", true)
+ b := s.add(t, "betty", "127.0.0.12", "blog.example.com", "bab", "blog", true)
+ c := s.add(t, "carol", "127.0.0.13", "docs.example.com", "bab", "docs", true)
+ s.publish(t)
+ stats := func() burstNoticeStats { return a.edge().notices.stats() }
+ peers := func() int {
+ n := a.edge().notices
+ n.mu.Lock()
+ defer n.mu.Unlock()
+ return len(n.peers)
+ }
+
+ // 60 trips 50 s in use the whole budget; one more 105 s in waits for the
+ // slots that free at 110 s, one notice per peer.
+ s.clock.advance(50 * time.Second)
+ for i := range 60 {
+ s.trip(t, a, noticeClient(i))
+ }
+ waitFor(t, 10*time.Second, "120 notices sent", func() bool { return stats().Sent == 120 })
+ s.clock.advance(55 * time.Second)
+ s.trip(t, a, noticeClient(60))
+ time.Sleep(300 * time.Millisecond)
+ if st := stats(); st.Sent != 120 || st.Gone != 0 || peers() != 2 {
+ t.Fatalf("counts %+v, %d peers while two notices wait for a slot", st, peers())
+ }
+
+ // Betty stops advertising notices while hers waits.
+ b.file.advertise = false
+ s.publish(t)
+ s.clock.advance(5*time.Second + 100*time.Millisecond)
+ waitFor(t, 5*time.Second, "carol's notice sent and betty's dropped", func() bool {
+ st := stats()
+ return st.Sent == 121 && st.Gone == 1
+ })
+ if n := len(b.arrivals()); n != 60 {
+ t.Fatalf("betty saw %d notices, want the 60 sent before she left", n)
+ }
+ if n := len(c.arrivals()); n != 61 {
+ t.Fatalf("carol saw %d notices, want 61", n)
+ }
+ waitFor(t, 5*time.Second, "betty's worker gone", func() bool { return peers() == 1 })
+}
+
+// Astra R1 P2: a worker checking its peer never prunes with a home map
+// older than the one a newer peer was created from. The worker waits on
+// n.mu while sendBurstNotices, holding it, sees betty arrive in a newer
+// snapshot and creates her peer; once the worker has the lock, betty stays.
+// With the snapshot read before the lock the worker would prune her.
+func TestBurstPeerCurrentNeverPrunesWithAnOlderSnapshot(t *testing.T) {
+ file := func(box, eip, host string) edgesFileView {
+ return edgesFileView{V: 1, Box: box, EIP: eip, BurstNotices: true, Hosts: map[string]edgesHostView{host: {Role: "home"}}}
+ }
+ annie, betty, carol := file("annie", "192.0.2.11", "shop.example.com"), file("betty", "192.0.2.12", "blog.example.com"), file("carol", "192.0.2.13", "docs.example.com")
+ m := &homeMap{snap: &homeSnapshot{read: true, files: map[string]edgesFileView{
+ "control/edges/annie.json": annie, "control/edges/carol.json": carol,
+ }}}
+ e := &Edge{box: "annie"}
+ e.homes.Store(m)
+ n := newBurstNotices()
+ peer := func(box string) *burstPeer {
+ return &burstPeer{box: box, q: make(chan burstNotice, 1), stop: make(chan struct{})}
+ }
+ carolPeer := peer("carol")
+ n.peers["carol"] = carolPeer
+
+ n.mu.Lock()
+ done := make(chan bool, 1)
+ go func() { done <- e.burstPeerCurrent(n, carolPeer) }()
+ // Long enough for the worker to reach the lock (and, read in the old
+ // order, the snapshot without betty).
+ time.Sleep(200 * time.Millisecond)
+ m.mu.Lock()
+ m.snap = &homeSnapshot{read: true, files: map[string]edgesFileView{
+ "control/edges/annie.json": annie, "control/edges/betty.json": betty, "control/edges/carol.json": carol,
+ }}
+ m.mu.Unlock()
+ targets := n.targetsLocked(m.snapshot(), e.box, false)
+ if len(targets) != 2 {
+ t.Fatalf("targets %+v, want betty and carol", targets)
+ }
+ bettyPeer := peer("betty")
+ n.peers["betty"] = bettyPeer
+ n.mu.Unlock()
+
+ if !<-done {
+ t.Fatal("carol, still a peer, was reported gone")
+ }
+ n.mu.Lock()
+ defer n.mu.Unlock()
+ if n.peers["betty"] != bettyPeer {
+ t.Fatal("betty's new peer was pruned with the older snapshot")
+ }
+ select {
+ case <-bettyPeer.stop:
+ t.Fatal("betty's worker was stopped")
+ default:
+ }
+}
+
// R3-2: the budget is taken at dispatch, over any 60 s and not per
// calendar minute, and a notice that cannot be sent within 10 s of its
// trip is dropped and counted.
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index f6fc9eadb..4f47d2618 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -343,7 +343,7 @@ type Edge struct {
// guard is CARLOS_EDGE_PROTECT, read once in New: what the edge does
// with a request matching a hard or probe rule (guard.go). By default
// each rule's own mode: from catalogue version 2 the hard tier blocks
- // and the probe tier watches.
+ // and the probe tier watches; the probe-burst rule blocks (#491).
guard guardMode
// guardMint is mintRef, bound once in New: a method value taken per
// request would allocate for every guarded request, and most never
diff --git a/internal/edge/guard.go b/internal/edge/guard.go
index 268ec02d7..8d6ce9961 100644
--- a/internal/edge/guard.go
+++ b/internal/edge/guard.go
@@ -23,8 +23,9 @@ type guardMode uint8
const (
// guardCatalogue, the default, does what each rule's own mode says. From
// catalogue version 2 the hard tier blocks; the probe tier watches and
- // the burst rule counts, so their matches are recorded with the app's
- // answer.
+ // its burst-mode rules count, so their matches are recorded with the
+ // app's answer. The probe-burst rule (edgeguard.BurstRule) blocks since
+ // its calibration review (#491): a cooling client is refused.
guardCatalogue guardMode = iota
// guardOff runs no check at all.
guardOff
@@ -293,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) {
@@ -310,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
}
diff --git a/internal/edgeguard/catalogue.go b/internal/edgeguard/catalogue.go
index 111686ca5..5ade98fec 100644
--- a/internal/edgeguard/catalogue.go
+++ b/internal/edgeguard/catalogue.go
@@ -116,8 +116,11 @@ var (
// it, because the cool-down is about the client, and the edge decides it
// beside Check rather than through it. It is here so a record or a
// reference code that names it is explained like any other rule (RuleByID,
-// RuleByHash). Its mode is watch until blocking is approved.
-var BurstRule = &Rule{ID: reqrec.BurstRuleID, Group: "probe-burst", Tier: reqrec.TierBurst, Mode: ModeWatch}
+// RuleByHash). It blocks: a client in a cool-down is refused the catalogue
+// paths the app is not known to serve, wherever the cool-down started. It
+// watched from release until the calibration review (#491); an app's
+// record-only switch still turns it off for that app.
+var BurstRule = &Rule{ID: reqrec.BurstRuleID, Group: "probe-burst", Tier: reqrec.TierBurst, Mode: ModeBlock}
var burstRuleHash = reqrec.RuleHash(BurstRule.ID)
diff --git a/internal/edgeguard/catalogue_test.go b/internal/edgeguard/catalogue_test.go
index 792703b1d..305f9aee6 100644
--- a/internal/edgeguard/catalogue_test.go
+++ b/internal/edgeguard/catalogue_test.go
@@ -155,7 +155,7 @@ func TestParseAccepts(t *testing.T) {
// ever matches it, because a cool-down is about the client, not the request.
func TestBurstRuleLookups(t *testing.T) {
r := BurstRule
- if r.ID != "burst.probe-burst.cooldown" || r.Group != "probe-burst" || r.Tier != reqrec.TierBurst || r.Mode != ModeWatch {
+ if r.ID != "burst.probe-burst.cooldown" || r.Group != "probe-burst" || r.Tier != reqrec.TierBurst || r.Mode != ModeBlock {
t.Fatalf("BurstRule = %+v", *r)
}
if got, ok := RuleByID(r.ID); !ok || got != r {
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index da37016e4..e29503ca9 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -212,3 +212,4 @@ plan14-root-reads-offline-move-stage-refusals-339.tsv 846d1f22e6eb6b2cd8b3086fa5
plan14-root-reads-fleet-tunnel-tls-state.tsv 846d1f22e6eb6b2cd8b3086fa554f15deba70418c6542b46b2e2a6a138b6c332
plan14-root-reads-replica-console-account.tsv 87e151a55efb12fb84e9c5939f2ead9058527d8213e2eb16ee6c0f109787bb16
plan14-root-reads-offline-move-pool-target-413.tsv f79b455e32eb0f63e19ba8b5c67129e1af9315b8650c9e0807e83ec630a82182
+plan14-root-reads-probe-burst-block.tsv 94ccbabaf19c3a449cec248a0c32fcc8593c82d3f7f433c6a48b6e0fdf068167
diff --git a/internal/provision/testdata/plan14-root-reads-probe-burst-block.tsv b/internal/provision/testdata/plan14-root-reads-probe-burst-block.tsv
new file mode 100644
index 000000000..415f6fb6c
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-probe-burst-block.tsv
@@ -0,0 +1,6 @@
+# Census overlay probe-burst-block, written by census-propose (#369). census-ruling-probe-burst-block, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-probe-burst-block.md.
+# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy ed0009717059de6de9cd99d188bcac56ec8a873d8910bb8821fe7cb3fea29815 internal/edge/guard.go Edge.noteBurst legacy accepted-legacy accepted-legacy;rev3=census-ruling-probe-burst-limit;basis=new: in the observer defer, counts a not-found (a 404, or a hard or probe match) from a non-browser client (no Sec-Fetch-Mode) toward the in-memory probe-burst limiter, keyed by the route's account/app; on a trip mints a reference code, files a Trip record into the in-memory recorder and queues notices to peer edges; the sites are the route value passed in; reads no file, store or registry; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=skips only the in-memory Trip record when demoUnrecorded(rt, r); cooling, the limiter and peer notices are unchanged; no new read;rev3=census-ruling-probe-burst-block;basis=after the not-found check, returns early (counts nothing) when the request matched no rule and its path names a site icon (burstIconPath: favicon.ico/.png/.svg, favicon-*.png, apple-touch-icon*.png, a pure string test on r.URL.Path); no new read, no file or store access, only fewer counts whole:Route@574,whole:Route@742,whole:Route@800 922524dfba524388e85449817d024288a23f775c6bd5ccdb4b1a3fd47a5bcd9b
+internal/edge/guard.go Edge.noteBurst legacy accepted-legacy accepted-legacy;rev3=census-ruling-probe-burst-limit;basis=new: in the observer defer, counts a not-found (a 404, or a hard or probe match) from a non-browser client (no Sec-Fetch-Mode) toward the in-memory probe-burst limiter, keyed by the route's account/app; on a trip mints a reference code, files a Trip record into the in-memory recorder and queues notices to peer edges; the sites are the route value passed in; reads no file, store or registry; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=skips only the in-memory Trip record when demoUnrecorded(rt, r); cooling, the limiter and peer notices are unchanged; no new read;rev3=census-ruling-probe-burst-block;basis=after the not-found check, returns early (counts nothing) when the request matched no rule and its path names a site icon (burstIconPath: favicon.ico/.png/.svg, favicon-*.png, apple-touch-icon*.png, a pure string test on r.URL.Path); no new read, no file or store access, only fewer counts whole:Route@574,whole:Route@742,whole:Route@800 922524dfba524388e85449817d024288a23f775c6bd5ccdb4b1a3fd47a5bcd9b
+@coverage internal/edge 46e4db369a9df88989104adffc0a3a13833d4c3397c41e276d37b6d358d308ce
+@coverage internal/edgeguard a26fa6f359b091151c8df59275bccd02cd2621686f40c4164f48f7155ac16895