carlos / platform Public

census: edge protection Plan 2 decision rows corrected after review

The catalogue rows name both consumers, the edge and the console
(edgeguard.RuleByHash), and the rule modes. NewRef is re-frozen with
its production caller, Edge.mintRef, in place of the removed
Edge.recordMatch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev dbe35aa50699ff72a60c90c526a68011eba7f3a7 parent 88d6b71
3 files changed, +11 −8
  • docs/superpowers/notes/census-proposal-edge-protection-2.md +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +2 −2
  • internal/provision/testdata/plan14-root-reads-edge-protection-2-decisions.tsv +8 −5

CI failed — run details

diff --git a/docs/superpowers/notes/census-proposal-edge-protection-2.md b/docs/superpowers/notes/census-proposal-edge-protection-2.md
index 94458338e..6e387b5ac 100644
--- a/docs/superpowers/notes/census-proposal-edge-protection-2.md
+++ b/docs/superpowers/notes/census-proposal-edge-protection-2.md
@@ -18,6 +18,6 @@ Recorded dispositions, which each change must still satisfy:
- `internal/edge/static.go` `staticSite.serveTree`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=PROPOSED-static-redirects;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=the same index-aware Stat lookup inside the extracted tree, now run at most twice (the request path, then once for a _redirects rewrite destination cleaned rooted inside the same tree); the Open moves to serveFile; the _redirects file itself is never answered; no root decision
- `internal/edge/edge.go` `Edge.ServeHTTP`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added
-Seal: `9c8acc96a63057fb8c87d389eca0ba4aefcf043adc67525c85b448f70bd5fc0a` → `9a82b5316160dc6ca33d7b03224b7a7752ebb5b86cb07ed366c0cd6158dc478a`.
+Seal: `af8a0b99fed71b7d4346fa83f286c2a38aa4ef021a021a03bfd4bcfa9be4e586` → `aff44400a8919e89e9fa3406143e292f7a6809a5e3d6ef948a918d77c938d5da`.
Overlay: `internal/provision/testdata/plan14-root-reads-edge-protection-2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 6e050e1b5..723240445 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -25,5 +25,5 @@ plan14-root-reads-design-edge-rate-limit-358-decisions.tsv a067dcd9e32e6be2b7dd9
plan14-root-reads-design-edge-rate-limit-358.tsv 0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0
plan14-root-reads-plans-4b-after-grace.tsv 0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0
plan14-root-reads-certwarm-wake.tsv 91204fcbc484343c03bd5ae69e3084055bc519a5b317e2ae3dc49880080764e2
-plan14-root-reads-edge-protection-2-decisions.tsv 9c8acc96a63057fb8c87d389eca0ba4aefcf043adc67525c85b448f70bd5fc0a
-plan14-root-reads-edge-protection-2.tsv 9a82b5316160dc6ca33d7b03224b7a7752ebb5b86cb07ed366c0cd6158dc478a
+plan14-root-reads-edge-protection-2-decisions.tsv af8a0b99fed71b7d4346fa83f286c2a38aa4ef021a021a03bfd4bcfa9be4e586
+plan14-root-reads-edge-protection-2.tsv aff44400a8919e89e9fa3406143e292f7a6809a5e3d6ef948a918d77c938d5da
diff --git a/internal/provision/testdata/plan14-root-reads-edge-protection-2-decisions.tsv b/internal/provision/testdata/plan14-root-reads-edge-protection-2-decisions.tsv
index 7acd79ec0..41175c679 100644
--- a/internal/provision/testdata/plan14-root-reads-edge-protection-2-decisions.tsv
+++ b/internal/provision/testdata/plan14-root-reads-edge-protection-2-decisions.tsv
@@ -1,8 +1,11 @@
-# Census overlay edge-protection-2-decisions, written BY HAND (AGENTS.md, The census: census-propose refuses decisions). The decisions of census-ruling-edge-protection-2 (branch edge-protection-2, Plan 2 of docs/superpowers/specs/2026-10-24-edge-request-protection-design.md: the hard and probe tiers, watch by default; plan docs/superpowers/plans/2026-10-25-edge-protection-2-hard-probe-watch.md): one new unit and one removed. Loaded from the chain manifest before plan14-root-reads-edge-protection-2.tsv, which census-propose wrote for the approvals. Asked of the census owner on #280 with the card docs/superpowers/notes/census-proposal-edge-protection-2.md; rows carry the ruling from the start (#369).
-# No root read is added. The catalogue is data compiled into the binary and parsed at init; the edge inside the agent (carlos-edge.service, user carlos) is its only reader, and nothing opens it from disk. One frozen declaration is added, so the seal moves.
-# NEW, embedded data (file:external): the protection catalogue. Mirrors the console's embedded templates (internal/console/templates/*.html external, accepted legacy).
-@legacy 99d5044258b4fb0ae713b36b32413708ba8ac90858ddb373f84aef381a46c3e0 internal/edgeguard/catalogue.txt external legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-protection-2;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), the one caller of internal/edgeguard;basis=new: the edge protection catalogue, the hard and probe tier rules: embedded with go:embed into the binary (edgeguard.catalogueData) and parsed once at init (parseCatalogue, then buildIndex; init panics on a malformed row or a version line that disagrees with edgeguard.Version); never opened from disk at runtime; data, not code; it only says which request paths and query values the edge matches; no root decision; the class of the console's embedded templates (internal/console/templates/*.html external) file:external@0 f017cbb0b580fb799dec98930051c816c3ad45ed18a05eb424337fd1bdf3a269
-internal/edgeguard/catalogue.txt external legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-protection-2;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), the one caller of internal/edgeguard;basis=new: the edge protection catalogue, the hard and probe tier rules: embedded with go:embed into the binary (edgeguard.catalogueData) and parsed once at init (parseCatalogue, then buildIndex; init panics on a malformed row or a version line that disagrees with edgeguard.Version); never opened from disk at runtime; data, not code; it only says which request paths and query values the edge matches; no root decision; the class of the console's embedded templates (internal/console/templates/*.html external) file:external@0 f017cbb0b580fb799dec98930051c816c3ad45ed18a05eb424337fd1bdf3a269
+# Census overlay edge-protection-2-decisions, written BY HAND (AGENTS.md, The census: census-propose refuses decisions). The decisions of census-ruling-edge-protection-2 (branch edge-protection-2, Plan 2 of docs/superpowers/specs/2026-10-24-edge-request-protection-design.md: the hard and probe tiers, watch by default; plan docs/superpowers/plans/2026-10-25-edge-protection-2-hard-probe-watch.md): one new unit, one re-frozen and one removed. Loaded from the chain manifest before plan14-root-reads-edge-protection-2.tsv, which census-propose wrote for the approvals. Asked of the census owner on #280 with the card docs/superpowers/notes/census-proposal-edge-protection-2.md; rows carry the ruling from the start (#369).
+# No root read is added. The catalogue is data compiled into the binary and parsed at init. Its consumers are the edge inside the agent (carlos-edge.service, user carlos), which matches requests against it, and the console (console.service, user carlos-console), which names a reference code's rule with edgeguard.RuleByHash; nothing opens it from disk. Two frozen declarations are added (the catalogue, new, and NewRef, re-frozen), so the seal moves.
+# NEW, embedded data (file:external): the protection catalogue, each rule's match and mode. Mirrors the console's embedded templates (internal/console/templates/*.html external, accepted legacy).
+@legacy 0291888d7f4309afcf563fa8d5e61e9a948363ed26e0a217e211d35674c9dad2 internal/edgeguard/catalogue.txt external legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-protection-2;identity=its two consumers: the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), which matches requests against it, and the console (cmd/console serve under console.service, user carlos-console), which names a reference code's rule through edgeguard.RuleByHash (apiedgeref.go);basis=new: the edge protection catalogue, the hard and probe tier rules, each with what it matches and its mode (watch, block or burst): embedded with go:embed into the binary (edgeguard.catalogueData) and parsed once at init (parseCatalogue, then buildIndex; init panics on a malformed row or a version line that disagrees with edgeguard.Version); never opened from disk at runtime; data, not code; it only says which request paths and query values the edge matches, what the edge does with a match, and which rule a code names; no root decision; the class of the console's embedded templates (internal/console/templates/*.html external) file:external@0 f017cbb0b580fb799dec98930051c816c3ad45ed18a05eb424337fd1bdf3a269
+internal/edgeguard/catalogue.txt external legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-protection-2;identity=its two consumers: the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), which matches requests against it, and the console (cmd/console serve under console.service, user carlos-console), which names a reference code's rule through edgeguard.RuleByHash (apiedgeref.go);basis=new: the edge protection catalogue, the hard and probe tier rules, each with what it matches and its mode (watch, block or burst): embedded with go:embed into the binary (edgeguard.catalogueData) and parsed once at init (parseCatalogue, then buildIndex; init panics on a malformed row or a version line that disagrees with edgeguard.Version); never opened from disk at runtime; data, not code; it only says which request paths and query values the edge matches, what the edge does with a match, and which rule a code names; no root decision; the class of the console's embedded templates (internal/console/templates/*.html external) file:external@0 f017cbb0b580fb799dec98930051c816c3ad45ed18a05eb424337fd1bdf3a269
+# RE-FROZEN, basis only (census review, Astra, 2026-10-25): NewRef's caller is now Edge.mintRef, as Edge.recordMatch is removed below. Same digest, same read, same disposition; the basis says "production caller is Edge.mintRef" in place of "called only by Edge.recordMatch".
+@legacy 87090950033303f14d4a6eb0a3f49b62f7f8614bd91657d15e4900dae16bf49c internal/reqrec/ref.go NewRef legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-request-records;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new: production caller is Edge.mintRef; one crypto/rand.Read of the code's 8-byte nonce from the kernel's random source (rand.Read, not a file), then an HMAC-SHA256 seal over the code's head with the mesh key the caller passed in, when it passed one; the nonce only makes codes unique, and the code is a reference the owner looks up, never an authorization; no file, no store, no box state, nothing written; the class of mintMeshKey's crypto/rand read (J4 root-input) and dbreads nonce (census-ruling-db-region-forward-1) file:Read@484 a2e27bb0dfd313172d0b43c81f9dceb91c13910c0258f027b720cd59593960c8
+internal/reqrec/ref.go NewRef legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-request-records;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new: production caller is Edge.mintRef; one crypto/rand.Read of the code's 8-byte nonce from the kernel's random source (rand.Read, not a file), then an HMAC-SHA256 seal over the code's head with the mesh key the caller passed in, when it passed one; the nonce only makes codes unique, and the code is a reference the owner looks up, never an authorization; no file, no store, no box state, nothing written; the class of mintMeshKey's crypto/rand read (J4 root-input) and dbreads nonce (census-ruling-db-region-forward-1) file:Read@484 a2e27bb0dfd313172d0b43c81f9dceb91c13910c0258f027b720cd59593960c8
# Removed: Edge.recordMatch (frozen by edge-request-records-decisions) is no longer declared. Retired by an H3 census-ruling removal (zddr3's form; the loader takes H3 only with a census-ruling- basis). A removal is not in the seal.
@remove internal/edge/reqrecords.go Edge.recordMatch
@removed internal/edge/reqrecords.go Edge.recordMatch H3 census-ruling-edge-protection-2: no longer declared: its body is split in two. The reference-code mint (reqrec.NewRef from the time, the rule tier and id, this box's name and the mesh key the edge already holds in memory) moved unchanged into Edge.mintRef, in which the scan finds no read site, and the Match it filed is now built by Edge.observeRecords (re-frozen in the census-propose overlay edge-protection-2) from the guard verdict the observer defer finds on the request's outcome; its one scanned site, the route passed in, went with the Match. It ran in the edge inside the agent as carlos.