| new file mode 100644 |
| index 000000000..6b78d95a0 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-static-headers.tsv |
| @@ -0,0 +1,14 @@ |
| +# Census overlay static-headers, written by census-propose (#369). census-ruling-static-headers, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-static-headers.md. |
| +# 3 body, 1 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 5a672c4cd5b701c3cac51b4d86ac789e4e7288c490ec378d2a3498ad2faf0446 internal/edge/static.go PackDir legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=PROPOSED-static-redirects;identity=the carlos CLI (carlos ship and carlos deploy --kind static, on the member's own machine);basis=also parses the root _redirects file it has already read (the same ReadFile) and refuses the pack when a line does not parse; no read added, offsets unchanged;rev3=census-ruling-static-headers;basis=also parses the root _headers file it has already read (the same ReadFile as every packed file) with parseHeaders, pure and in-memory, and refuses the pack when a line does not parse, exactly as it does for _redirects; no read added file:ReadFile@626,file:WalkDir@71 ff1fc031daf5053abbec1f2f2145ed93fccaa75ba5d6673d3c69020ce33dcbda |
| +@legacy 4e9f48a0daa7ef0921f0e259812850774019f8fcb65e253d9ca1caf995e88d58 internal/edge/static.go staticSite.serveFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-static-redirects;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; serveTree's former Open and open-file Stat of the file serveTree resolved inside the extracted, digest-verified tree, unchanged, plus a non-200 branch that copies the same open file under a _redirects 404 status; no root decision;rev3=census-ruling-static-headers;basis=takes the in-memory _headers lookup result (extra) and, on the 200 branch only, wraps the writer in headerWriter, which sets those header values on 200/206/304 at status time; the same Open and open-file Stat of the same resolved file; no read added, no root decision file:Open@145,file:Stat@1607 b1cfea3e2636b4aa04641a718a8353da1b8142fe9d608a40fa3b3269aee6778a |
| +@legacy a208b3ba964930bb622d89cd262bfc2617fe96360902ead001a34dbb1c9c2bcd internal/edge/static.go staticSite.serveTree legacy accepted-legacy 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;rev3=census-ruling-edge-protection-2;basis=consults the edge protection matcher (internal/edgeguard, pure and in-memory) on the request path (probe tier, only when no file and no _redirects rule names it) and on a rewrite target (hard tier, only when the file is there), and may answer the guard's 404 block page through guardDecide before a redirect or the rewritten file; the _redirects lookup gains an in-memory names check; the same index-aware Stat lookups inside the extracted tree, unchanged; no read added;rev3=census-ruling-static-dir-slash;basis=A directory requested without its trailing slash now answers a 301 to a relative "./<base>/" (query kept) instead of serving its index.html, unless the request was rewritten, the path ends in "/", a _redirects rule names the path, or the rules would redirect its slash form (redirectsSlashForm, the existing in-memory resolve with exists=true). It opens and stats exactly the files it did before; the new branch only writes a Location header and a status, from the request path and the rules it already parsed.;rev3=census-ruling-static-headers;basis=computes the in-memory _headers lookup once on the cleaned request path and host and passes it to serveFile; the _headers file itself is never answered (found excludes it, as _redirects); the same index-aware Stat lookups inside the extracted tree; no read added file:Stat@1301,file:Stat@1415 795cf8cc3fd62482607dd7078c20eca0cbba5e17ca8f241c589c9946d827545e |
| +@legacy 0df1c49dcb0dab338c17220845a25a46e194bb13f41f178c789e24e554677662 internal/edge/static.go staticSite.loadHeaders legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-headers;basis=new: reads the _headers file at the root of the extracted, digest-verified tree once per version swap (ReadFile of filepath.Join(dir, headersFile), dir from the signed pointer and manifest digest as loadRedirects uses), parses it in memory; a missing file is no rules, a read or parse error is logged; the same shape as loadRedirects file:ReadFile@83 34f2ba99895615e296aaa7cd34b4c905ce43508c0383861ad1d8f9f7171bffc8 |
| +@legacy 16fc00c45bc5bb7ed5530db23274d68318befd2b9244c501c5869cb0a2fbd494 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy 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;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed registry:Gate@18331,registry:Gate@18391,registry:Gate@18449,registry:Host@18434,registry:ImportGate@23924,registry:Kind@13994,registry:Kind@16464,registry:Kind@23866,registry:Kind@23895,whole:Route@11802,whole:Route@12014,whole:Route@12206,whole:Route@13997,whole:Route@15300,whole:Route@15395,whole:Route@15471,whole:Route@15515,whole:Route@16467,whole:Route@18334,whole:Route@18394,whole:Route@18437,whole:Route@18452,whole:Route@20085,whole:Route@23869,whole:Route@23898,whole:Route@23927,whole:Route@25759 12d592d2b0fd1ccc81a836ff238abff2a4dcb839264d5e7b6c3dd2803c32d8dc |
| +internal/edge/static.go PackDir legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=PROPOSED-static-redirects;identity=the carlos CLI (carlos ship and carlos deploy --kind static, on the member's own machine);basis=also parses the root _redirects file it has already read (the same ReadFile) and refuses the pack when a line does not parse; no read added, offsets unchanged;rev3=census-ruling-static-headers;basis=also parses the root _headers file it has already read (the same ReadFile as every packed file) with parseHeaders, pure and in-memory, and refuses the pack when a line does not parse, exactly as it does for _redirects; no read added file:ReadFile@626,file:WalkDir@71 ff1fc031daf5053abbec1f2f2145ed93fccaa75ba5d6673d3c69020ce33dcbda |
| +internal/edge/static.go staticSite.serveFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-static-redirects;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; serveTree's former Open and open-file Stat of the file serveTree resolved inside the extracted, digest-verified tree, unchanged, plus a non-200 branch that copies the same open file under a _redirects 404 status; no root decision;rev3=census-ruling-static-headers;basis=takes the in-memory _headers lookup result (extra) and, on the 200 branch only, wraps the writer in headerWriter, which sets those header values on 200/206/304 at status time; the same Open and open-file Stat of the same resolved file; no read added, no root decision file:Open@145,file:Stat@1607 b1cfea3e2636b4aa04641a718a8353da1b8142fe9d608a40fa3b3269aee6778a |
| +internal/edge/static.go staticSite.serveTree legacy accepted-legacy 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;rev3=census-ruling-edge-protection-2;basis=consults the edge protection matcher (internal/edgeguard, pure and in-memory) on the request path (probe tier, only when no file and no _redirects rule names it) and on a rewrite target (hard tier, only when the file is there), and may answer the guard's 404 block page through guardDecide before a redirect or the rewritten file; the _redirects lookup gains an in-memory names check; the same index-aware Stat lookups inside the extracted tree, unchanged; no read added;rev3=census-ruling-static-dir-slash;basis=A directory requested without its trailing slash now answers a 301 to a relative "./<base>/" (query kept) instead of serving its index.html, unless the request was rewritten, the path ends in "/", a _redirects rule names the path, or the rules would redirect its slash form (redirectsSlashForm, the existing in-memory resolve with exists=true). It opens and stats exactly the files it did before; the new branch only writes a Location header and a status, from the request path and the rules it already parsed.;rev3=census-ruling-static-headers;basis=computes the in-memory _headers lookup once on the cleaned request path and host and passes it to serveFile; the _headers file itself is never answered (found excludes it, as _redirects); the same index-aware Stat lookups inside the extracted tree; no read added file:Stat@1301,file:Stat@1415 795cf8cc3fd62482607dd7078c20eca0cbba5e17ca8f241c589c9946d827545e |
| +internal/edge/static.go staticSite.loadHeaders legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-headers;basis=new: reads the _headers file at the root of the extracted, digest-verified tree once per version swap (ReadFile of filepath.Join(dir, headersFile), dir from the signed pointer and manifest digest as loadRedirects uses), parses it in memory; a missing file is no rules, a read or parse error is logged; the same shape as loadRedirects file:ReadFile@83 34f2ba99895615e296aaa7cd34b4c905ce43508c0383861ad1d8f9f7171bffc8 |
| +internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy 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;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed registry:Gate@18331,registry:Gate@18391,registry:Gate@18449,registry:Host@18434,registry:ImportGate@23924,registry:Kind@13994,registry:Kind@16464,registry:Kind@23866,registry:Kind@23895,whole:Route@11802,whole:Route@12014,whole:Route@12206,whole:Route@13997,whole:Route@15300,whole:Route@15395,whole:Route@15471,whole:Route@15515,whole:Route@16467,whole:Route@18334,whole:Route@18394,whole:Route@18437,whole:Route@18452,whole:Route@20085,whole:Route@23869,whole:Route@23898,whole:Route@23927,whole:Route@25759 12d592d2b0fd1ccc81a836ff238abff2a4dcb839264d5e7b6c3dd2803c32d8dc |
| +@coverage internal/edge 8cce07179dff0c8061751b5a308d33e63ef542996f7b4924d5da27228eb3fb44 |