carlos / platform Public

Probe-burst limit, shared across the platform (#491)

A client that collects 60 not-founds on one app within 60 s trips a
10-minute cool-down: its requests for catalogue paths the app is not known
to serve are refused (429 + reference code) on every app. Real pages and
existing static files are never refused; browser requests (Sec-Fetch-Mode)
never count; counting happens once, on the edge that saw the visitor's
headers. Trips go to every platform edge advertising burst_notices as
mesh-key-signed, AES-GCM-encrypted notices (receiver-bound, replay-checked,
bounded body and time, 120 sends/min at dispatch); fleet boxes cannot send
or accept. Per-app record-only switch (console, API, CLI), delivered through
the telemetry pass to every edge serving the app incl. far asset edges; one
lock per pass (Paul's ruling). New Protection group and Logs filter.
Watch-only by default; blocking is promoted on Paul's approval after
calibration. Copy PB-C01..C17 approved by Paul unchanged. Reviews: spec
builder check (Astra); plan Astra R1-R3; task reviews (Astra) T2-T4;
whole-branch Astra R1 + fix re-checks. Census probe-burst-limit approved by
Astra on #280. Not released.

Squashed from design-probe-burst-491 into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev b7802fd840cb3485e104d00a9a3e614b62bd15a2 parent b40f3bc
63 files changed, +6,680 −126
  • apimode.go +18 −0
  • docs/site/cli.md +10 −0
  • docs/superpowers/notes/census-proposal-probe-burst-limit.md +64 −0
  • docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md +53 −0
  • docs/superpowers/plans/2026-10-31-probe-burst-limit.md +225 −0
  • docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md +71 −0
  • docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R2.md +43 −0
  • docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R3.md +42 −0
  • docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md +242 −0
  • docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md +14 −0
  • internal/console/apierrors.go +68 −22
  • internal/console/approved_burst_copy_test.go +157 −0
  • internal/console/authcli.go +3 −0
  • internal/console/claim_invariant_fixtures_test.go +7 −0
  • internal/console/claim_invariant_probes_read_test.go +9 −0
  • internal/console/protectiongroups.go +2 −1
  • internal/console/protectionsetting.go +115 −0
  • internal/console/protectionsetting_test.go +303 −0
  • internal/console/protectionview.go +10 −2
  • internal/console/protectionview_test.go +33 −1
  • internal/console/server.go +1 −0
  • internal/console/templates/app_protection.html +20 −0
  • internal/console/testdata/claim-routes.txt +2 −0
  • internal/console/testdata/perf-budgets.txt +1 −1
  • internal/edge/answered.go +7 −0
  • internal/edge/asset_e2e_test.go +1 −0
  • internal/edge/assetcatch.go +88 −9
  • internal/edge/burst.go +265 −0
  • internal/edge/burst_edge_test.go +973 −0
  • internal/edge/burst_notice.go +702 −0
  • internal/edge/burst_notice_test.go +1,042 −0
  • internal/edge/burst_refusal.go +31 −0
  • internal/edge/burst_test.go +451 −0
  • internal/edge/edge.go +44 −5
  • internal/edge/guard.go +202 −18
  • internal/edge/guard_test.go +7 −1
  • internal/edge/homemap.go +4 −0
  • internal/edge/mesh.go +56 −0
  • internal/edge/race_off_test.go +6 −0
  • internal/edge/race_on_test.go +7 −0
  • internal/edge/reqrecords.go +7 −4
  • internal/edge/reqrecords_test.go +1 −0
  • internal/edge/static.go +36 −5
  • internal/edge/testdata/edges-forward-hub.json +1 −1
  • internal/edgeguard/catalogue.go +17 −0
  • internal/edgeguard/catalogue_test.go +31 −0
  • internal/host/agent.go +5 −0
  • internal/host/edgesfile.go +8 −0
  • internal/host/edgesfile_test.go +28 −5
  • internal/host/egress_nopolicy_linux_test.go +6 −3
  • internal/host/telemetry_pass.go +187 −43
  • internal/host/telemetry_pass_test.go +433 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/probe_burst_limit_census_test.go +50 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-probe-burst-limit.tsv +46 −0
  • internal/reqrec/recorder.go +64 −0
  • internal/reqrec/recorder_test.go +70 −0
  • internal/telemetry/telemetry.go +28 −4
  • internal/telemetry/telemetry_test.go +43 −0
  • main.go +3 −0
  • protection_cmd.go +81 −0
  • protection_cmd_test.go +134 −0

CI failed — run details

apimode.go

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/notes/census-proposal-probe-burst-limit.md

Loading diff…

docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md

Loading diff…

docs/superpowers/plans/2026-10-31-probe-burst-limit.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R1.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R2.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-PROBE-BURST-PLAN-R3.md

Loading diff…

docs/superpowers/specs/2026-10-31-probe-burst-limit-design.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-PROBE-BURST-LIMIT.md

Loading diff…

internal/console/apierrors.go

Loading diff…

internal/console/approved_burst_copy_test.go

Loading diff…

internal/console/authcli.go

Loading diff…

internal/console/claim_invariant_fixtures_test.go

Loading diff…

internal/console/claim_invariant_probes_read_test.go

Loading diff…

internal/console/protectiongroups.go

Loading diff…

internal/console/protectionsetting.go

Loading diff…

internal/console/protectionsetting_test.go

Loading diff…

internal/console/protectionview.go

Loading diff…

internal/console/protectionview_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/templates/app_protection.html

Loading diff…

internal/console/testdata/claim-routes.txt

Loading diff…

internal/console/testdata/perf-budgets.txt

Loading diff…

internal/edge/answered.go

Loading diff…

internal/edge/asset_e2e_test.go

Loading diff…

internal/edge/assetcatch.go

Loading diff…

internal/edge/burst.go

Loading diff…

internal/edge/burst_edge_test.go

Loading diff…

internal/edge/burst_notice.go

Loading diff…

internal/edge/burst_notice_test.go

Loading diff…

internal/edge/burst_refusal.go

Loading diff…

internal/edge/burst_test.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/guard.go

Loading diff…

internal/edge/guard_test.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edge/mesh.go

Loading diff…

internal/edge/race_off_test.go

Loading diff…

internal/edge/race_on_test.go

Loading diff…

internal/edge/reqrecords.go

Loading diff…

internal/edge/reqrecords_test.go

Loading diff…

internal/edge/static.go

Loading diff…

internal/edge/testdata/edges-forward-hub.json

Loading diff…

internal/edgeguard/catalogue.go

Loading diff…

internal/edgeguard/catalogue_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/edgesfile.go

Loading diff…

internal/host/edgesfile_test.go

Loading diff…

internal/host/egress_nopolicy_linux_test.go

Loading diff…

internal/host/telemetry_pass.go

Loading diff…

internal/host/telemetry_pass_test.go

Loading diff…

internal/provision/plan9_b8_census_test.go

Loading diff…

internal/provision/probe_burst_limit_census_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-chain.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-probe-burst-limit.tsv

Loading diff…

internal/reqrec/recorder.go

Loading diff…

internal/reqrec/recorder_test.go

Loading diff…

internal/telemetry/telemetry.go

Loading diff…

internal/telemetry/telemetry_test.go

Loading diff…

main.go

Loading diff…

protection_cmd.go

Loading diff…

protection_cmd_test.go

Loading diff…