carlos / platform Public

census: re-propose after the final fix wave

Root-read census: claims extended for the six re-changed units
(serveDemoTraffic, pageindex Open, applyPageRoutes, pageRouteEligible,
ListenControl, applyPurgeTargets) and added for three new pure
predicates (Edge.ownsHost, pageServedHere, purgeOwns); envelopes
activator, edge, host and pageindex re-pinned; overlay and card
re-proposed under the same name.
Record-write census: re-digest serveDemoTraffic (nonrecord / sel:Put,
unchanged; it now also wraps the app's writer in the page diagnostics).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d528c0afb73311c0435550ec5699f441f9568f4a parent 6899bfa
5 files changed, +46 −32
  • docs/superpowers/notes/census-claims-edge-page-cache-1.tsv +9 −6
  • docs/superpowers/notes/census-proposal-edge-page-cache-1.md +9 −6
  • internal/provision/edge_page_cache_1_census_test.go +4 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv +23 −17

CI cancelled — superseded by a newer push — run details

Intent

Attributed to this commit: 46.8 g CO₂e (6,073,753 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on edge-page-cache-1, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/census-claims-edge-page-cache-1.tsv b/docs/superpowers/notes/census-claims-edge-page-cache-1.tsv
index e1e93bbfa..b202155be 100644
--- a/docs/superpowers/notes/census-claims-edge-page-cache-1.tsv
+++ b/docs/superpowers/notes/census-claims-edge-page-cache-1.tsv
@@ -32,11 +32,11 @@ internal/activator/inputs.go:SplitBackend.publishLaunchInputs refuses a unit-bac
internal/activator/inputs.go:inputsStamp stats one of the instance's two env files to key CurrentInputs' cache: os.Lstat for a nested row (the tenant-writable directory, the final link not followed), os.Stat for a flat row (outside any tenant's reach, as the flat read follows it); a missing file is absent; metadata only, as user carlos
internal/edge/cache.go:Cache.CurrentInputs calls the installed current-inputs hook (the exec backend's CurrentInputs) for rt, under no cache lock; false with no hook; in memory
internal/edge/heldstream.go:heldTask.legRequest unit existed with no read; now gives each leg request its own page mark holder when the held route is an instance (t.rt.Kind, the +registry:Kind site); in memory
-internal/edge/pagecache.go:Edge.applyPageRoutes the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache
+internal/edge/pagecache.go:Edge.applyPageRoutes the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache; final fix wave: builds the rows map before the armed check and hands Cache.RetainInputs the hosts with rows (in memory: drops other hosts' process inputs and, through the hook wireCurrentInputs installs, the exec backend's cached env reads); resets when pageServedHere fails over the live table this reload published (e.current()), which adds a tunnel-served, path-routed or missing live entry to the reset cases, mark kept (the +whole:Route site is the pageServedHere call); ResetAndClearOptIn now also retires the departed scope's in-memory state; no new file or registry read
internal/edge/pagecache.go:Edge.clearPages applies a purge's clear to the page index for the owner route's own scope (routeScope(owner)), never a scope looked up by host; a per-host clear names only host; in memory plus the asset store's page objects
internal/edge/pagecache.go:Edge.instanceHosts instanceHostsIn over one snapshot of the live route table (e.current()); in memory
internal/edge/pagecache.go:Edge.pageDiagnostics builds the request's page state for an instance route (up.route.Kind): the page index, the route's scope and whether it is opted in (an in-memory flag loaded from the mark files at Open); in memory
-internal/edge/pagecache.go:Edge.pageRouteEligible the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read
+internal/edge/pagecache.go:Edge.pageRouteEligible the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read; final fix wave: the row, tunnel and primary-entry tests move into pageServedHere over the same live table snapshot (the -registry:Host site is the primary lookup that moved there); the same rule, and the primary entry must now also be the same instance (sameInstance); no read added
internal/edge/pagecache.go:Edge.pagesOptedIn whether an instance route's scope holds an opt-in mark (in-memory flag); in memory
internal/edge/pagecache.go:Edge.servePage the page cache at the LRU point: on an eligible route and a readable request, looks the key up in the page index and serves a hit from the asset store's entry (serveAssetEntry); on a storable miss whose process inputs equal the current inputs (ProcessInputs), begins a recording; reads the route, the request and the box's own asset store
internal/edge/pagecache.go:instanceHostsIn every host of the given live-table snapshot whose entry is owner's instance (sameInstance), plus each LRU-cached host the snapshot resolves to it; wildcard keys left out; in memory
@@ -47,22 +47,25 @@ internal/edge/pagecache.go:routeScope pageScopeOf of a route (it builds an in-me
internal/edge/pagecache.go:sameInstance whether two routes have the same page scope (routeScope); pure
internal/edge/pagerecord.go:pageRecorder.finish publishes a recorded page into the page index or abandons it: checks the body length, the Set-Cookie trailer veto and stillCurrent; writes the scope's opt-in mark (MarkOptInFor, a file in the agent's $CARLOS_DATA_DIR/page-cache) only while the recording's epoch is current; commits the page through the asset store with the stored header; the route Host sites are its log lines and stillCurrent
internal/edge/purge.go:ListenPurge signature only: takes the route (rt registry.Route) instead of its host and passes it to ListenControl; the +whole:Route site is that parameter
-internal/edge/purge_header.go:Edge.applyPurgeTargets unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects
+internal/edge/purge_header.go:Edge.applyPurgeTargets unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects; final fix wave (ledger R10): every LRU purge (PurgeHost, PurgePath, PurgeURL, and the all expansion's own host) is of a host purgeOwns says its owner still owns in the same snapshot (the +whole:Route sites are the purgeOwns calls); page clears unchanged; in memory
internal/edge/purge_header.go:Edge.resolvePurgeOwnersIn resolvePurgeHosts' former body, verbatim but for three things: it takes the snapshot (cur) from its caller, answers purgeHost{host, owner} pairs, and a host admitted by the path-routing exception (another app) is owned by the serving route rt (the +registry:App sites), so its page clear is of rt's own pages; the same caps, validation and ownership checks
internal/edge/purge_header.go:pageHostsFor with no Carlos-Purge-Host, the serving route's own host plus the asked host when the snapshot resolves it to the same instance (sameInstance); both owned by rt; port stripped with net.SplitHostPort; in memory
internal/host/pagearm.go:armEdgePageCache with CARLOS_PAGE_CACHE=1 and an open asset store, creates $CARLOS_DATA_DIR/page-cache (0700, as the agent user) and opens the page index over the store (pageindex.Open, the file:Open site, which reads the mark files there); hands it to the edge; unarmed or on any error, logs and does nothing; called only from runAgent's ready hook
-internal/pageindex/index.go:Open makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself
+internal/pageindex/index.go:Open makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself; final fix wave: seeds the index's epoch counter once from random64 (x.epochs.Store), so scope epochs count up and never repeat within the process (a retired scope's ticket can never match a later state); no read added
internal/pageindex/index.go:random64 crypto/rand.Read of 8 bytes (the scanner's file:Read site), for scope epochs and mark temporary names
internal/pageindex/optin.go:Index.loadMarks creates the mark directory (0700) and reads it (os.ReadDir): removes crash temporaries, skips anything not a regular file (no symlink followed for the decision), and reads each regular file (os.ReadFile) as a JSON scope, kept only if its name is that scope's hash; the directory is $CARLOS_DATA_DIR/page-cache, written only by the agent
internal/pageindex/optin.go:syncDir opens the mark directory (os.Open) to fsync it after a rename or removal
internal/pageindex/optin.go:writeSynced creates a new temporary mark file (os.OpenFile O_CREATE|O_EXCL, 0600) in the mark directory, writes and fsyncs it; the caller renames it into place
internal/registry/registry.go:Registry.SetPages new narrow writer: UPDATE routes SET pages_off = ? WHERE host = ? AND kind <> 'forward' (the file:Exec and registry:sql sites), noRoute on an unmatched host; with a remote registry, the same call over the remote client (registry:remote); a copy of SetAssets' shape; called by convergeOwned and the remote dispatch
internal/activator/prepare.go:ExecBackend.listenControl passes the whole route to edge.ListenControl instead of rt.Host (the -registry:Host +whole:Route change); nothing else
-internal/edge/demo_traffic.go:Edge.serveDemoTraffic attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else
-internal/edge/purge.go:ListenControl takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query
+internal/edge/demo_traffic.go:Edge.serveDemoTraffic attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else; final fix wave: also wraps the app's writer in the page diagnostics writer (pageDiagnostics(r, host, up).wrap(appWriter)), which sets Carlos-Cache: bypass on a marked response and records nothing; in memory, no read added
+internal/edge/purge.go:ListenControl takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query; final fix wave (ledger R10): the LRU purge of the listener's host ("*" and an exact URL) runs only while the bridge says rt still owns that host in the live table (bridge.ownsHost), and "all" purges exactly the hosts the bridge's instanceHosts returns from one snapshot, which include the listener's host only while rt owns it (the +whole:Route site); with no bridge, the LRU as before; nothing more is read from the request than path and query
internal/provision/reconcile.go:convergeOwned converges the route's pages_off from the record in both directions (existing.PagesOff against !rec.PagesOn(), the three +registry:PagesOff sites) through reg.SetPages, logging in dry-run, as the assets switch above it does
internal/registry/forward.go:Route.InertForward a forward row must also have PagesOff false to be inert (the +registry:PagesOff site); PagesOff is forbidden on a forward row (forwardShape, ForwardForbidden)
internal/registry/registry.go:routeArgs binds b2iDB(t.PagesOff) in the new pages_off position of routeCols (78 columns)
internal/registry/registry.go:scanRoute scans the new pages_off column into Route.PagesOff
internal/registry/remote_dispatch.go:Registry.dispatchRemote adds the SetPages method: r.SetPages(q.Host, q.PagesOff), the request's PagesOff field (the +registry:Host and +registry:PagesOff sites); the same dispatch as SetAssets
cli.go:runInstances Task 12: one more arm in the instances verb switch, "set-pages" dispatching to runInstancesSetPages (instances_pages.go, a signed-in CLI client that PATCHes the console instance door with only {"pages":"on"|"off"}); a CLI subcommand a signed-in user runs, not called by the agent or by any root pass; read sites unchanged (13); no read added
+internal/edge/pagecache.go:Edge.ownsHost purgeOwns over one snapshot of the live route table (e.current()), for the control socket's purge bridge (ledger R10); in memory, no file or registry read
+internal/edge/pagecache.go:pageServedHere a pure predicate over a live-table snapshot and a route row: pageRowEligible(rt), and the snapshot's entry for rt.Host (the registry:Host site) is the same instance (sameInstance), not served over a tunnel, with no path rows; asked by pageRouteEligible and applyPageRoutes; in memory
+internal/edge/purge_header.go:purgeOwns a pure predicate over a live-table snapshot (ledger R10): whether host resolves (lookupIn) to owner's instance (sameInstance), or path-routes to owner.Host (pathRoutesTo) while the snapshot's entry for owner.Host is owner's instance; in memory; it only narrows which LRU entries a purge may remove
diff --git a/docs/superpowers/notes/census-proposal-edge-page-cache-1.md b/docs/superpowers/notes/census-proposal-edge-page-cache-1.md
index a1bab9b32..e89960b86 100644
--- a/docs/superpowers/notes/census-proposal-edge-page-cache-1.md
+++ b/docs/superpowers/notes/census-proposal-edge-page-cache-1.md
@@ -1,6 +1,6 @@
# Census approval: edge-page-cache-1
-Ruling `census-ruling-edge-page-cache-1`. The independent reviewer approves or rejects every change below, 41 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+Ruling `census-ruling-edge-page-cache-1`. The independent reviewer approves or rejects every change below, 44 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
| unit | change | read sites | what changed |
|---|---|---|---|
@@ -75,24 +75,27 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/activator/inputs.go:inputsStamp`: reads +file:Lstat, +file:Stat; written legacy, accepted-legacy, frozen
- new `internal/edge/cache.go:Cache.CurrentInputs`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/edge/heldstream.go:heldTask.legRequest`: reads +registry:Kind, +whole:Route; written legacy, accepted-legacy, frozen
-- new `internal/edge/pagecache.go:Edge.applyPageRoutes`: reads +registry:Host, +registry:PagesOff, +whole:Route ×7; written legacy, accepted-legacy, frozen
+- new `internal/edge/pagecache.go:Edge.applyPageRoutes`: reads +registry:Host, +registry:PagesOff, +whole:Route ×8; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:Edge.clearPages`: reads +registry:Host, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:Edge.instanceHosts`: reads +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/edge/pagecache.go:Edge.ownsHost`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:Edge.pageDiagnostics`: reads +registry:Kind, +whole:Route; written legacy, accepted-legacy, frozen
-- new `internal/edge/pagecache.go:Edge.pageRouteEligible`: reads +registry:Host ×3, +registry:Version, +whole:Route ×5; written legacy, accepted-legacy, frozen
+- new `internal/edge/pagecache.go:Edge.pageRouteEligible`: reads +registry:Host ×2, +registry:Version, +whole:Route ×5; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:Edge.pagesOptedIn`: reads +registry:Kind, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:Edge.servePage`: reads +registry:Host, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:instanceHostsIn`: reads +registry:Host, +whole:Route ×4; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:pageRowEligible`: reads +registry:Backing, +registry:Gate, +registry:HA, +registry:ImportGate, +registry:Kind, +registry:PagesOff, +registry:Status; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:pageScopeOf`: reads +registry:App, +registry:Host, +whole:Route ×3; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:pageServe.stillCurrent`: reads +registry:Host ×3, +whole:Route ×3; written legacy, accepted-legacy, frozen
+- new `internal/edge/pagecache.go:pageServedHere`: reads +registry:Host, +whole:Route ×3; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:routeScope`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
- new `internal/edge/pagecache.go:sameInstance`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
- new `internal/edge/pagerecord.go:pageRecorder.finish`: reads +registry:Host ×4, +whole:Route ×4; written legacy, accepted-legacy, frozen
- new `internal/edge/purge.go:ListenPurge`: reads +whole:Route; written legacy, accepted-legacy, frozen
-- new `internal/edge/purge_header.go:Edge.applyPurgeTargets`: reads +whole:Route ×3; written legacy, accepted-legacy, frozen
+- new `internal/edge/purge_header.go:Edge.applyPurgeTargets`: reads +whole:Route ×5; written legacy, accepted-legacy, frozen
- new `internal/edge/purge_header.go:Edge.resolvePurgeOwnersIn`: reads +registry:Account ×2, +registry:App ×6, +registry:Host ×17, +whole:Route ×12; written legacy, accepted-legacy, frozen
- new `internal/edge/purge_header.go:pageHostsFor`: reads +registry:Host ×2, +whole:Route ×4; written legacy, accepted-legacy, frozen
+- new `internal/edge/purge_header.go:purgeOwns`: reads +registry:Host ×2, +whole:Route ×4; written legacy, accepted-legacy, frozen
- new `internal/host/pagearm.go:armEdgePageCache`: reads +file:Open; written legacy, accepted-legacy, frozen
- new `internal/pageindex/index.go:Open`: reads +file:Open; written legacy, accepted-legacy, frozen
- new `internal/pageindex/index.go:random64`: reads +file:Read; written legacy, accepted-legacy, frozen
@@ -103,13 +106,13 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- other `changed registry schema`: closed only if it is the registry schema (re-pinned)
- reads `internal/activator/prepare.go:ExecBackend.listenControl`: -registry:Host, +whole:Route; keeps legacy, task accepted-legacy
- reads `internal/edge/demo_traffic.go:Edge.serveDemoTraffic`: +registry:Kind, +whole:Route; keeps legacy, task accepted-legacy
-- reads `internal/edge/purge.go:ListenControl`: +file:Query ×2, +registry:Host, +whole:Route ×2; keeps legacy, task accepted-legacy
+- reads `internal/edge/purge.go:ListenControl`: +file:Query ×2, +registry:Host, +whole:Route ×3; keeps legacy, task accepted-legacy
- reads `internal/provision/reconcile.go:convergeOwned`: +registry:PagesOff ×3; keeps legacy, task accepted-legacy
- reads `internal/registry/forward.go:Route.InertForward`: +registry:PagesOff; keeps legacy, task accepted-legacy
- reads `internal/registry/registry.go:routeArgs`: +registry:PagesOff; keeps authority, task E3
- reads `internal/registry/registry.go:scanRoute`: +registry:PagesOff; keeps legacy, task accepted-legacy
- reads `internal/registry/remote_dispatch.go:Registry.dispatchRemote`: +registry:Host, +registry:PagesOff; keeps hint, task E2
-Seal: `75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4` → `4a9c361020d482cc0a3e9d5746807440672ee8304e11521dea8b88a2038e89f7`.
+Seal: `75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4` → `f751112843349d55c0256e9dc5651036f86a43c4f2568da409a59e363e25a1cc`.
Overlay: `internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/edge_page_cache_1_census_test.go b/internal/provision/edge_page_cache_1_census_test.go
index 5c9b7de4a..678ab98fa 100644
--- a/internal/provision/edge_page_cache_1_census_test.go
+++ b/internal/provision/edge_page_cache_1_census_test.go
@@ -8,7 +8,9 @@ package provision
// now carries a page mark holder (withPageMarkHolder, a request context
// value), as ServeHTTP attaches it on the ordinary path. Its one Put is
// still gzipPool.Put, a gzip writer back to sync.Pool. nonrecord /
-// sel:Put, as before.
+// sel:Put, as before. The final fix wave also wraps the app's writer
+// in the page diagnostics writer (pageDiagnostics(...).wrap), which
+// only sets a response header; still no record write.
// - Edge.maybeStore: returns early, storing nothing, when the response
// carried the app's page cache opt-in (pageMarkOf(rec.request).Marked),
// so a page cache response never enters the LRU. Its one Put is still
@@ -31,7 +33,7 @@ package provision
func edgePageCache1WriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), instanceRestore658WriteCensusInventory()...)
replacements := []censusEntry{
- {"internal/edge/demo_traffic.go", "Edge.serveDemoTraffic", "nonrecord", "sel:Put", "afd123392d1c9c1b1faed7f394bf2f0f280e8ba8774aaffe00a73898f5d60066"},
+ {"internal/edge/demo_traffic.go", "Edge.serveDemoTraffic", "nonrecord", "sel:Put", "0bf14e3f377fe657b3a95be545c7dcb6aa2746e26ea40ff77c26143ba60c84e3"},
{"internal/edge/edge.go", "Edge.maybeStore", "nonrecord", "sel:Put", "0a03abb57ec4cf01239d84bcaa03b21f0b9b2115e0cc31f1f4cbc9dcbf5ab5a8"},
{"cli.go", "runInstances", "key-site", "lit:instances", "d2f6ea17746702eb637fb0d72c215754739a68118338cb001c7b437436e84794"},
{"internal/console/apiinstances.go", "Server.handleAPIInstanceUpdate", "record-writer", "key:UpdateRecord", "b5c47cac78a8c40d6c08f05600b811dc9efd0511d5be7d6e4badff3540a55398"},
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 17c0daf0e..da006b719 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -130,4 +130,4 @@ plan14-root-reads-instance-syscall-filter.tsv b970bb28c5a633d2572a1da549030e9258
plan14-root-reads-instance-restore-658-cli.tsv b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c
plan14-root-reads-instance-stop-execstop-528.tsv 75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4
plan14-root-reads-region-ha-shutting-down-retry.tsv 75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4
-plan14-root-reads-edge-page-cache-1.tsv 4a9c361020d482cc0a3e9d5746807440672ee8304e11521dea8b88a2038e89f7
+plan14-root-reads-edge-page-cache-1.tsv f751112843349d55c0256e9dc5651036f86a43c4f2568da409a59e363e25a1cc
diff --git a/internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv b/internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv
index 820600a3a..4fb6656f0 100644
--- a/internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-edge-page-cache-1.tsv
@@ -1,6 +1,6 @@
# Census overlay edge-page-cache-1, written by census-propose (#369). census-ruling-edge-page-cache-1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-edge-page-cache-1.md.
# 22 body, 5 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-# 41 new dispositions: 8 reads re-frozen at their disposition with the claim, 32 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
+# 44 new dispositions: 8 reads re-frozen at their disposition with the claim, 35 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
@legacy cbb69c3ce5e4c23e31e24c09158166e5c1eff0dc55ebe4b138e9f7f0d88596a7 cli.go runInstances legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the carlos CLI: its API verbs on a person's machine as that person, its local listing by hand on a box as whoever runs it (no box unit): main's body with one more dispatch arm, import, which goes to the API-mode import verbs; read sites unchanged;rev3=census-ruling-edge-asset-cache-1;basis=one more dispatch arm, set-assets, which goes to runInstancesSetAssets (the API-mode verb that turns an instance's asset cache on or off through the console); read sites unchanged (13), none added;rev3=census-ruling-edge-page-cache-1;basis=Task 12: one more arm in the instances verb switch, "set-pages" dispatching to runInstancesSetPages (instances_pages.go, a signed-in CLI client that PATCHes the console instance door with only {"pages":"on"|"off"}); a CLI subcommand a signed-in user runs, not called by the agent or by any root pass; read sites unchanged (13); no read added file:Open@1471,registry:App@3344,registry:Backing@3426,registry:Channel@3359,registry:Environment@3370,registry:Hibernate@3235,registry:Host@3336,registry:Kind@3351,registry:Replication@3411,registry:Status@3385,registry:Unit@3437,registry:Version@3395,whole:Route@3209 d2f6ea17746702eb637fb0d72c215754739a68118338cb001c7b437436e84794
@legacy 5b8bcd390bfb747cc155d4487c76b95a8d6fd165331007a9de6ac40ff23f18c7 internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added.;rev3=census-ruling-wake-storm-cap;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): waits for a box-wide wake slot (acquireWakeSlot, an in-memory buffered channel) before doWake; the fence/shutdown/retired/disabled refusals move into refuseWakeLocked and are asked again after admission (one fewer direct whole-Route read here: a.disabled(e.route) now runs inside refuseWakeLocked, same value); e.wakeStart is set at admission and e.admitted marks it. Only waits and refuses more; no new read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Install the successful-acquire observer and restrict due, worker and resident starts before doWake, off a.mu. Add a whole-route argument to restriction; refused work has known-no-start evidence.;rev3=census-ruling-region-ha-g2-fixes;basis=Bind recovery wakes to the service lifetime; no new read.;rev3=census-ruling-edge-page-cache-1;basis=the generation-current call is now noteCurrent(e) instead of noteCurrent(e.host, e.gen.N), so the new noteCurrent can also publish the process's page cache launch inputs; read sites unchanged (16); no read added registry:Socket@8549,registry:Socket@8710,registry:Stateless@10044,registry:Stateless@10792,whole:Route@10035,whole:Route@10090,whole:Route@10794,whole:Route@1762,whole:Route@3277,whole:Route@3404,whole:Route@3461,whole:Route@466,whole:Route@6811,whole:Route@8502,whole:Route@8551,whole:Route@8712 9d91d8d7ad4bd5bb348efd5391153a548d953eb52dbffe41e8cb05cb2fed3ff7
@legacy bcf92e06a7503a6d998b36bd065bce4f5e6c442e4b6c2902f19792a1be01200b internal/activator/backend_exec.go ExecBackend.Start legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=a rootfs row (Runtime) goes through rootfsGates and startRootfsFromLive, never the layout switch; a binary row's path is unchanged; the new kind is registry:Runtime, one site; no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: haSpawnGate(rt) first (+whole:Route), refusing an HA-acquired host whose row is no longer contained; otherwise unchanged; only adds a refusal;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 N1 and Task 7: ctx to the rootfs gates; startRootfsFromLive now returns the staged identity (the version is passed on); a row with a runtime other than rootfs-v1 is refused before the binary path (refuseUnknownRuntime); adds a refusal only;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read.;rev3=census-ruling-edge-page-cache-1;basis=passes an empty build to startChildAt's new build argument (the live link, whose build is not pinned); read sites unchanged (14); no read added registry:Host@784,registry:Runtime@274,registry:Socket@441,registry:Socket@656,registry:Socket@838,whole:Route@123,whole:Route@159,whole:Route@227,whole:Route@346,whole:Route@437,whole:Route@521,whole:Route@581,whole:Route@652,whole:Route@834 13b1fedf91936839ddad5ce101680e5e757d46b8c3733e58bc6a3a4f36e7a4bb
@@ -25,34 +25,37 @@
@legacy 61948bc280b9d1f7025352e04ec3a3da9fb162adc694634d1a4124e56dcb9903 internal/activator/inputs.go inputsStamp legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=stats one of the instance's two env files to key CurrentInputs' cache: os.Lstat for a nested row (the tenant-writable directory, the final link not followed), os.Stat for a flat row (outside any tenant's reach, as the flat read follows it); a missing file is absent; metadata only, as user carlos file:Lstat@111,file:Stat@70 669b6ec9de2d71b30cdc1ba6556bab8b227d5acea0c04200c44ffc13e61861c6
@legacy cb9643a6565f6f94c6a60e019ab0cc16834c4060be3179e841b9914a440f3863 internal/edge/cache.go Cache.CurrentInputs legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=calls the installed current-inputs hook (the exec backend's CurrentInputs) for rt, under no cache lock; false with no hook; in memory whole:Route@212 abea6289465e12fd8ff8f52359b6bd9cfb4b5363fb3857489d4efd9b9009b8d2
@legacy 3f88d29360894d817d00c8f7b88ec5d2dfe8412587551ebd835ce9b711ad87ab internal/edge/heldstream.go heldTask.legRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now gives each leg request its own page mark holder when the held route is an instance (t.rt.Kind, the +registry:Kind site); in memory registry:Kind@626,whole:Route@628 942046cbee13473fa2651c981b68c874f9665e7b16f32369a6bd3ec24ad35c7e
-@legacy d5cdd0ec1d7f1690c25de45feabbfaab3255d10d84d3ff56aa2a027c9882fc57 internal/edge/pagecache.go Edge.applyPageRoutes legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache registry:Host@263,registry:PagesOff@385,whole:Route@208,whole:Route@243,whole:Route@258,whole:Route@274,whole:Route@320,whole:Route@373,whole:Route@789 a68b7b6f83783817d7de4f2da0b1d2ec029932a4478458fb30c3eec7a83087d4
+@legacy b64e1accf3d8c77d4bb104b557df59accf972f1100a74825b73398ca55edd5cb internal/edge/pagecache.go Edge.applyPageRoutes legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache; final fix wave: builds the rows map before the armed check and hands Cache.RetainInputs the hosts with rows (in memory: drops other hosts' process inputs and, through the hook wireCurrentInputs installs, the exec backend's cached env reads); resets when pageServedHere fails over the live table this reload published (e.current()), which adds a tunnel-served, path-routed or missing live entry to the reset cases, mark kept (the +whole:Route site is the pageServedHere call); ResetAndClearOptIn now also retires the departed scope's in-memory state; no new file or registry read registry:Host@173,registry:PagesOff@621,whole:Route@1027,whole:Route@118,whole:Route@153,whole:Route@168,whole:Route@184,whole:Route@371,whole:Route@556,whole:Route@609 1e13c5d0a85442195d166469d9bb6be1a17b7016eb14ae1831a364902893b246
@legacy 7c831bee1563bae3d31126c560e185eca77bc55b5d1c3ffd7e41ce3c5eeb4a47 internal/edge/pagecache.go Edge.clearPages legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=applies a purge's clear to the page index for the owner route's own scope (routeScope(owner)), never a scope looked up by host; a per-host clear names only host; in memory plus the asset store's page objects registry:Host@119,whole:Route@313 5248da064ec52768c1516e78087a0cefbf274b9d25f6e8c106d5f46c40a8cc40
@legacy 365454dc460b390f6c5f8a8d139b1832c8894ef48182b8b45addfefe75662eaf internal/edge/pagecache.go Edge.instanceHosts legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=instanceHostsIn over one snapshot of the live route table (e.current()); in memory whole:Route@116 95cea6b3d918d621bd1041ecff1e6a6bc9d2aa95251ad7a17edc832c5ceba911
+@legacy 7102a7b205493450392258178eaad8a447c6506315902759aeb85773f47a297f internal/edge/pagecache.go Edge.ownsHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=purgeOwns over one snapshot of the live route table (e.current()), for the control socket's purge bridge (ledger R10); in memory, no file or registry read whole:Route@97 92ca3c8b0721066f2ce4dba3081a3c2c27be00afa2cb5889893937bb8110862e
@legacy ef4184eed4615f03449ccf6b21d6e704969ded3092273cef0c7b0f94f41fba6d internal/edge/pagecache.go Edge.pageDiagnostics legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=builds the request's page state for an instance route (up.route.Kind): the page index, the route's scope and whether it is opted in (an in-memory flag loaded from the mark files at Open); in memory registry:Kind@91,whole:Route@94 f746c4aa5fae6ea028423b4ee90e061dbda774bda1b888d16380fbdcd79d5ddc
-@legacy 9ddb38d601a1d8ddc532ab828c7e4176a21831c73ed0f0377608d0f8a5fc991b internal/edge/pagecache.go Edge.pageRouteEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read registry:Host@401,registry:Host@419,registry:Host@472,registry:Version@765,whole:Route@152,whole:Route@179,whole:Route@285,whole:Route@405,whole:Route@860 e968e1599e91134c5f9bbc2c02e0b583f6bb0bff7240f54514cc8a990cb3ecb1
+@legacy 72bcfe585dbef97293d79cde84bad711ef0957fbab9b9712550ba7789ee9b973 internal/edge/pagecache.go Edge.pageRouteEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read; final fix wave: the row, tunnel and primary-entry tests move into pageServedHere over the same live table snapshot (the -registry:Host site is the primary lookup that moved there); the same rule, and the primary entry must now also be the same instance (sameInstance); no read added registry:Host@403,registry:Host@421,registry:Version@684,whole:Route@152,whole:Route@199,whole:Route@305,whole:Route@407,whole:Route@779 fa951fe6442274df7a69be014d49017d7053308a7fd8a87c12a7f1b77cdb090e
@legacy b94d2746105c86ee5e2f58258e505b5238870d0a3dd7fb5d3be82045aa267cf2 internal/edge/pagecache.go Edge.pagesOptedIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=whether an instance route's scope holds an opt-in mark (in-memory flag); in memory registry:Kind@89,whole:Route@92 b61a315a0b13223b69167cb92f22edfa505617eaad608a82cce136c661af0689
@legacy aa17d50c0721f87b427de7d00a3c21171e8efbd8b1475d06ec1776d8bbe07160 internal/edge/pagecache.go Edge.servePage legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page cache at the LRU point: on an eligible route and a readable request, looks the key up in the page index and serves a hit from the asset store's entry (serveAssetEntry); on a storable miss whose process inputs equal the current inputs (ProcessInputs), begins a recording; reads the route, the request and the box's own asset store registry:Host@737,whole:Route@740 ea5ff6569a78e58a8b0f5c9c51f9b2275ca774deb270c58d63baea3e7a4beb8a
@legacy 631190887a06ef4118c00f20cee352e2b9e2fb614c071286392661e2838b92dd internal/edge/pagecache.go instanceHostsIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=every host of the given live-table snapshot whose entry is owner's instance (sameInstance), plus each LRU-cached host the snapshot resolves to it; wildcard keys left out; in memory registry:Host@98,whole:Route@234,whole:Route@241,whole:Route@355,whole:Route@362 3520f1b24e326eef819031a044dfa2cfdbaa80f30260e51c13c793819fce8518
@legacy 54fcae3b79cc984ffdfafc6c472be8c2e44087bb5a425d46d017aa71f1533f9c internal/edge/pagecache.go pageRowEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over one route row: an instance, not forward, not HA, not a sidecar, not unit-backed, status ready, no gate, no import gate, PagesOff false registry:Backing@128,registry:Gate@192,registry:HA@100,registry:ImportGate@209,registry:Kind@55,registry:PagesOff@233,registry:Status@168 d568f708b4b147768c0ddccbca73f3781a267fabada4eb462415aa231d237610
@legacy ceb8614db3a943e328b097b6192e67b6a3d6a585063e313a07c3b8aec52c3c74 internal/edge/pagecache.go pageScopeOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page scope of an upstream: release.RouteAccount(route), route.App and route.Host; pure registry:App@118,registry:Host@142,whole:Route@105,whole:Route@121,whole:Route@145 6ab7fdf066187767d2104ba6e1afcea49ea5eaa817cdfe2a9495f2be1affa1e3
@legacy 15ce29f876679f761f8970378b8f6c5ead0c97b799419048efb46f1a70946471 internal/edge/pagecache.go pageServe.stillCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=before a recorded page is published, re-resolves host and path in the live table (lookupUpstreamPath), checks the same instance and scope, re-runs pageRouteEligible and compares the current and process inputs with the recording's; in memory registry:Host@122,registry:Host@140,registry:Host@350,whole:Route@126,whole:Route@146,whole:Route@354 592d1a20aab772475cd64b43a54892488b34d7fd55c5ee30adf9c97f62524f77
+@legacy 8f55a27ea454dc03518f8d3b26ebb3d3fb0ced85ce48b6983be7a7e39eec8e1e internal/edge/pagecache.go pageServedHere legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over a live-table snapshot and a route row: pageRowEligible(rt), and the snapshot's entry for rt.Host (the registry:Host site) is the same instance (sameInstance), not served over a tunnel, with no path rows; asked by pageRouteEligible and applyPageRoutes; in memory registry:Host@132,whole:Route@176,whole:Route@183,whole:Route@90 13c16c6870982257940f33438804bbecc945a98ab36feeec8044dbc261437f2c
@legacy c6dc029bd495f085b67e9851a596eb3729db63a2892017e1fd5c2bfdf36fede4 internal/edge/pagecache.go routeScope legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=pageScopeOf of a route (it builds an in-memory upstream{route: rt} only to ask that); pure whole:Route@81,whole:Route@88 0d0ce1202034e50490832377c0d1568abaf1ee363d38b6763781906f8f1cf5ac
@legacy b52fbfda197ab5e91bee022a58240635632ff86e1f91ce4201478dbb72b118d8 internal/edge/pagecache.go sameInstance legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=whether two routes have the same page scope (routeScope); pure whole:Route@64,whole:Route@81 4aeeacb2aea633dd3ee54d1934a61853d5f198b964f2f4948766e3a9970ed404
@legacy 400e9ce586030606a0ac0b334fd31be005b3e65d0c2d57d8b199934acb6019e6 internal/edge/pagerecord.go pageRecorder.finish legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=publishes a recorded page into the page index or abandons it: checks the body length, the Set-Cookie trailer veto and stillCurrent; writes the scope's opt-in mark (MarkOptInFor, a file in the agent's $CARLOS_DATA_DIR/page-cache) only while the recording's epoch is current; commits the page through the asset store with the stored header; the route Host sites are its log lines and stillCurrent registry:Host@1141,registry:Host@1247,registry:Host@641,registry:Host@756,whole:Route@1147,whole:Route@1253,whole:Route@647,whole:Route@762 9a35604dc5049091a17538941863f309986475f3fefed57c861af3a80e38d1c1
@legacy dfb1009a764eb95c6f73e4aa06ebec32e0ce6897af1a3af2e1b9aca8300d711c internal/edge/purge.go ListenPurge legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=signature only: takes the route (rt registry.Route) instead of its host and passes it to ListenControl; the +whole:Route site is that parameter whole:Route@129 f7a179808f792b3e4cc4c3bfa0d2460fc889fe20dd1d27a2d8bdb048816f2ce5
-@legacy c7c8b4db4333bdb0ea25b4f5a6fb1bb962316d7519793a3dc483c2d1c0242072 internal/edge/purge_header.go Edge.applyPurgeTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects whole:Route@1841,whole:Route@1934,whole:Route@252 9f8ad87b4f539fa5806a69ef2a3c1e59ab3c3cd98ec485217a6e4a835a437d68
+@legacy 59e88d383e4295fde59140b320d299ef8e029e4b9b5afb1a52f23d50ea2104f1 internal/edge/purge_header.go Edge.applyPurgeTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects; final fix wave (ledger R10): every LRU purge (PurgeHost, PurgePath, PurgeURL, and the all expansion's own host) is of a host purgeOwns says its owner still owns in the same snapshot (the +whole:Route sites are the purgeOwns calls); page clears unchanged; in memory whole:Route@1994,whole:Route@2090,whole:Route@2183,whole:Route@252,whole:Route@466 e933dcefb7853f0e779938d98dd2d1c86e1e5637ed92423c4029d305d121dc2a
@legacy 982dd7be0eed8920f986a1fcf2779fa2e430a5ed222adbba84a65363c6f1fd09 internal/edge/purge_header.go Edge.resolvePurgeOwnersIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=resolvePurgeHosts' former body, verbatim but for three things: it takes the snapshot (cur) from its caller, answers purgeHost{host, owner} pairs, and a host admitted by the path-routing exception (another app) is owned by the serving route rt (the +registry:App sites), so its page clear is of rt's own pages; the same caps, validation and ownership checks registry:Account@4904,registry:Account@4952,registry:App@4115,registry:App@4133,registry:App@4896,registry:App@4938,registry:App@5043,registry:App@5056,registry:Host@1095,registry:Host@1223,registry:Host@1429,registry:Host@1542,registry:Host@168,registry:Host@1821,registry:Host@2018,registry:Host@2441,registry:Host@4098,registry:Host@4248,registry:Host@4446,registry:Host@4608,registry:Host@479,registry:Host@4887,registry:Host@5668,registry:Host@5829,registry:Host@602,whole:Route@177,whole:Route@2701,whole:Route@4120,whole:Route@4173,whole:Route@4204,whole:Route@4559,whole:Route@4941,whole:Route@4955,whole:Route@5032,whole:Route@5196,whole:Route@5204,whole:Route@5251 101b4ea79f63e8ffa30a4fc5285f7f8955342a9c5960f569ac3b32ae032eb46f
@legacy 81518db46c1c84b37c647feee5f2090273f75f948e9aafeaf0b565d16d78ce39 internal/edge/purge_header.go pageHostsFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=with no Carlos-Purge-Host, the serving route's own host plus the asked host when the snapshot resolves it to the same instance (sameInstance); both owned by rt; port stripped with net.SplitHostPort; in memory registry:Host@109,registry:Host@233,whole:Route@118,whole:Route@316,whole:Route@323,whole:Route@381 6710bff0ba004394ecfc1d347db55e0901f14705f2daa0a6f36b9bf7ea6f44da
+@legacy 1e804cbcc08364228202a66a0c0db54448715913f5b3741ed1e1918f3091e0be internal/edge/purge_header.go purgeOwns legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over a live-table snapshot (ledger R10): whether host resolves (lookupIn) to owner's instance (sameInstance), or path-routes to owner.Host (pathRoutesTo) while the snapshot's entry for owner.Host is owner's instance; in memory; it only narrows which LRU entries a purge may remove registry:Host@212,registry:Host@262,whole:Route@157,whole:Route@164,whole:Route@309,whole:Route@316 921b08c4d6da36a521451a7cae2d9649c8e56f10c5d46501124dedfaa36cb7b0
@legacy 728bbfafb437b7d3d804219c9a8ab8f734cd40b6dbf7cda6a4c0c3c60c85c49a internal/host/pagearm.go armEdgePageCache legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=with CARLOS_PAGE_CACHE=1 and an open asset store, creates $CARLOS_DATA_DIR/page-cache (0700, as the agent user) and opens the page index over the store (pageindex.Open, the file:Open site, which reads the mark files there); hands it to the edge; unarmed or on any error, logs and does nothing; called only from runAgent's ready hook file:Open@450 8fed79bd25e53d46e25a84dbffa1206d47527dfd6b2c1cc549d8ed544404fee3
-@legacy b3b5adc2bd8776c4cab6da7a239972e517470612848f4c29e7283a80b9d9d409 internal/pageindex/index.go Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself file:Open@5 3574543354a9d2d91488785cfe74db5009b6a040537ee291ac6d491016f99324
+@legacy 0f4f8461467a1eee8097aa42e17e4c3c3ba0e830a29e18ee6e3aee7fc67ae27a internal/pageindex/index.go Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself; final fix wave: seeds the index's epoch counter once from random64 (x.epochs.Store), so scope epochs count up and never repeat within the process (a retired scope's ticket can never match a later state); no read added file:Open@5 93433b818a9179a3babaa8c9fa43be2a3b6b0f6671d53328d27a77de36ce7403
@legacy 9f60742f17a98d75a34f72ec8491d4d632dbc2b72f80c30387036ad21b3a362d internal/pageindex/index.go random64 legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=crypto/rand.Read of 8 bytes (the scanner's file:Read site), for scope epochs and mark temporary names file:Read@41 2e20c178c65b44d4ddc876c0e6ca5ae5eff8c87cc078c972e61979d6fbc2f9f3
@legacy b46e22d6d1d754271311752fc6b5d280ae56589fa2512a37a87e0eb43af93f3e internal/pageindex/optin.go Index.loadMarks legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=creates the mark directory (0700) and reads it (os.ReadDir): removes crash temporaries, skips anything not a regular file (no symlink followed for the decision), and reads each regular file (os.ReadFile) as a JSON scope, kept only if its name is that scope's hash; the directory is $CARLOS_DATA_DIR/page-cache, written only by the agent file:ReadDir@166,file:ReadFile@553 425036c4b6cf4ff0126f7b4ebc3fbb98465d9dba15fe6ee0e1183209732a1419
@legacy a0a63a8499ae4e4d9f22024dd30e6a5ff57c9fa763bfa2dd3d8e612ef5d47b00 internal/pageindex/optin.go syncDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=opens the mark directory (os.Open) to fsync it after a rename or removal file:Open@92 d39d227bd0d565399d71b2edf66ce7dd7dfde7b3d244dc9138f9949f7c643240
@legacy 9a581c13be251849daad3011ca1c0c6223f5ef960677a5794ae02631edb23c43 internal/pageindex/optin.go writeSynced legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=creates a new temporary mark file (os.OpenFile O_CREATE|O_EXCL, 0600) in the mark directory, writes and fsyncs it; the caller renames it into place file:OpenFile@62 44025a75750b5a06bbb122d1a97736131bdf79c901bf1930a057f3b65268e510
@legacy 4ae3132c0a6ab73e36a0ccdc63ac92290524f579abff6cd6d94c6b397263aa00 internal/registry/registry.go Registry.SetPages legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=new narrow writer: UPDATE routes SET pages_off = ? WHERE host = ? AND kind <> 'forward' (the file:Exec and registry:sql sites), noRoute on an unmatched host; with a remote registry, the same call over the remote client (registry:remote); a copy of SetAssets' shape; called by convergeOwned and the remote dispatch file:Exec@209,registry:remote@63,registry:remote@93,registry:sql@209,registry:sql@436,whole:remoteClient@65,whole:remoteClient@95 38ec8a72df4d940b7e5a8f24e969a6177fb0472a99381c1bdad66b25f5c15f3c
@legacy e9430cdf950f9770af7050b4d956a086302fe6ffe6529db378681b9fe6fb2032 internal/activator/prepare.go ExecBackend.listenControl legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=passes the whole route to edge.ListenControl instead of rt.Host (the -registry:Host +whole:Route change); nothing else registry:Host@490,registry:Host@545,registry:Host@627,registry:Host@835,whole:Route@719 216a625e9bab7711678a28bb4a6f1d35799ef0f3acb57a3a9e041791eeb45b00
-@legacy 99e162a90dee33579d446ef2fee8b2e88f41fe039b9f809df6e963b1ad344e77 internal/edge/demo_traffic.go Edge.serveDemoTraffic legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo_traffic.go:128-334 reads the resolved Route and passes it to existing admission, metering, rate and activator helpers. Resident serving checks precede the inert moved hook (:143), retirement and durable request debit (:302); output debits use the writer below compression. Forwarders do not count or transform again. Existing expiry/control cancellations and five-second write bounds apply; no request-path console or bucket read.;rev3=census-ruling-edge-page-cache-1;basis=attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else registry:App@2627,registry:DemoExpiresAt@1362,registry:Kind@6217,whole:Route@1061,whole:Route@1365,whole:Route@1504,whole:Route@1591,whole:Route@1714,whole:Route@223,whole:Route@2238,whole:Route@2554,whole:Route@2619,whole:Route@2630,whole:Route@2716,whole:Route@2812,whole:Route@2886,whole:Route@2933,whole:Route@2991,whole:Route@3020,whole:Route@3239,whole:Route@3270,whole:Route@3302,whole:Route@3675,whole:Route@375,whole:Route@4339,whole:Route@4389,whole:Route@4441,whole:Route@454,whole:Route@4680,whole:Route@5445,whole:Route@5988,whole:Route@6220,whole:Route@6607 afd123392d1c9c1b1faed7f394bf2f0f280e8ba8774aaffe00a73898f5d60066
-@legacy 2230ef5d3b1df7753ace1f49aed4bc9b7bc9d22afb2acc383c1e6c74fb4423a2 internal/edge/purge.go ListenControl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-page-cache-1;basis=takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query file:Query@1234,file:Query@1708,file:Query@1832,file:Query@824,registry:Host@136,whole:Route@1532,whole:Route@750 78ead77778fd68c38b53b11f1628c49bfbd1966341633b84150f9683a89de085
+@legacy aaf5668cd5bc0e8add3b1c5ac5fa53adca9812e64a1b0670359e483f25e94555 internal/edge/demo_traffic.go Edge.serveDemoTraffic legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo_traffic.go:128-334 reads the resolved Route and passes it to existing admission, metering, rate and activator helpers. Resident serving checks precede the inert moved hook (:143), retirement and durable request debit (:302); output debits use the writer below compression. Forwarders do not count or transform again. Existing expiry/control cancellations and five-second write bounds apply; no request-path console or bucket read.;rev3=census-ruling-edge-page-cache-1;basis=attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else; final fix wave: also wraps the app's writer in the page diagnostics writer (pageDiagnostics(r, host, up).wrap(appWriter)), which sets Carlos-Cache: bypass on a marked response and records nothing; in memory, no read added registry:App@2627,registry:DemoExpiresAt@1362,registry:Kind@6495,whole:Route@1061,whole:Route@1365,whole:Route@1504,whole:Route@1591,whole:Route@1714,whole:Route@223,whole:Route@2238,whole:Route@2554,whole:Route@2619,whole:Route@2630,whole:Route@2716,whole:Route@2812,whole:Route@2886,whole:Route@2933,whole:Route@2991,whole:Route@3020,whole:Route@3239,whole:Route@3270,whole:Route@3302,whole:Route@3675,whole:Route@375,whole:Route@4339,whole:Route@4389,whole:Route@4441,whole:Route@454,whole:Route@4680,whole:Route@5445,whole:Route@5988,whole:Route@6498,whole:Route@6946 0bf14e3f377fe657b3a95be545c7dcb6aa2746e26ea40ff77c26143ba60c84e3
+@legacy 48a18aa20247926f68f28a8fdd261ce0272d4055e2d459ca57b19e9ca484b6aa internal/edge/purge.go ListenControl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-page-cache-1;basis=takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query; final fix wave (ledger R10): the LRU purge of the listener's host ("*" and an exact URL) runs only while the bridge says rt still owns that host in the live table (bridge.ownsHost), and "all" purges exactly the hosts the bridge's instanceHosts returns from one snapshot, which include the listener's host only while rt owns it (the +whole:Route site); with no bridge, the LRU as before; nothing more is read from the request than path and query file:Query@1190,file:Query@1624,file:Query@2176,file:Query@2306,registry:Host@136,whole:Route@1128,whole:Route@2012,whole:Route@750 71f2bbe779aff736fa22b281d23d4ec1d69ebb493e1352d961e1ee124269dfb6
@legacy 71008e7760f2c1fbc37b61f8ee674d50b0844ebe14bfb49e4349e4c081cd5cb7 internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-agent-start-demo-1;basis=Compares existing route descriptor to record descriptor before any ordinary convergence; refuses identity loss or change.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: clear a legacy owned set row when the local incarnation is no greater than the record counter, even when CreatedAt changed its replica hash. Same exact-row ClearReplicaAssignment CAS and member/hold/projection refusals; no new read. A pair installed earlier in a pass invalidates the observed-row CAS and is retried next pass. merge of origin/main 6be08467: Check main demo identity before any set mutation; additionally refuse mixed demo/set state. Retain branch legacy successor clearing and set convergence.;rev3=census-ruling-edge-page-cache-1;basis=converges the route's pages_off from the record in both directions (existing.PagesOff against !rec.PagesOn(), the three +registry:PagesOff sites) through reg.SetPages, logging in dry-run, as the assets switch above it does registry:Account@610,registry:Addr@3897,registry:Addr@4119,registry:Addr@4546,registry:Addrs@3924,registry:Addrs@4140,registry:Addrs@4567,registry:App@645,registry:AssetGen@5404,registry:AssetGen@5590,registry:AssetGen@5981,registry:AssetsOff@5374,registry:AssetsOff@5564,registry:AssetsOff@5955,registry:Assigned@9256,registry:Assigned@9460,registry:Assigned@9909,registry:Channel@1632,registry:Channel@1762,registry:Channel@2093,registry:Copies@1069,registry:Copies@1088,registry:DemoExpiresAt@429,registry:DemoHost@345,registry:DemoID@311,registry:DemoLifetime@383,registry:EgressAllow@11175,registry:EgressAllow@11431,registry:EgressAllow@11853,registry:Environment@2135,registry:Environment@2277,registry:Environment@2636,registry:FleetBoxes@1027,registry:FleetBoxes@1050,registry:FleetBoxes@263,registry:FleetBoxes@552,registry:HA@8633,registry:Health@3951,registry:Health@4163,registry:Health@4590,registry:Host@672,registry:Incarnation@701,registry:Moved@9295,registry:Moved@9479,registry:Moved@9928,registry:PagesOff@6114,registry:PagesOff@6244,registry:PagesOff@6558,registry:PolicyExpiresAt@11256,registry:Provisioned@586,registry:Replica@7992,registry:Replica@8120,registry:Replica@8452,registry:ReplicaIncarnation@1155,registry:ReplicaIncarnation@1186,registry:ReplicaIncarnation@1276,registry:ReplicaIncarnation@1359,registry:ReplicaIncarnation@1467,registry:ReplicaRevision@1103,registry:ReplicaRevision@1131,registry:Replicas@7123,registry:Replicas@7248,registry:Replicas@7570,registry:Size@11217,registry:Size@11469,registry:Size@11891,registry:Stateless@1214,registry:StatusNamed@2712,registry:StatusNamed@2856,registry:StatusNamed@3220,registry:Steering@4626,registry:Steering@4759,registry:Steering@5097,registry:UpdateSettings@10233,registry:UpdateSettings@10373,registry:UpdateSettings@10733,whole:Route@1349,whole:Route@870 f7c596cc87c437f038c0d23f616d29ea0d38ec88a2e47cc6e4ede5414aba0ed6
@legacy 983ae7ad913a44ea20b3b726cf958402445199b8783423f74fbca4638b80b30f internal/registry/forward.go Route.InertForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 2: true only when every one of the 50 forbidden columns of §4.2 is zero (one +registry:<field> site each, nothing else). Pure.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): two more forbidden fields must be zero on a forward row, Assigned == "" and !Moved (fleet_assigned, fleet_moved in ForwardForbidden). Stricter, never looser.;rev3=census-ruling-stateless-replicas-2;basis=Pure validation additionally refuses malformed set projections; all unrelated forbidden fields still must be zero.;rev3=census-ruling-edge-page-cache-1;basis=a forward row must also have PagesOff false to be inert (the +registry:PagesOff site); PagesOff is forbidden on a forward row (forwardShape, ForwardForbidden) registry:Addr@114,registry:Addrs@132,registry:Args@836,registry:AssetGen@304,registry:AssetsOff@287,registry:Assigned@1189,registry:Backing@762,registry:BuildState@1026,registry:Canary@683,registry:Caps@596,registry:ClaimIncarnation@1088,registry:ClaimOwner@1141,registry:ClaimRowID@1165,registry:ClaimStamp@1118,registry:DBPath@366,registry:EgressAllow@954,registry:Environment@551,registry:Gate@664,registry:GoodDemand@481,registry:GoodDigest@457,registry:GoodVersion@432,registry:HA@633,registry:Health@151,registry:Hibernate@615,registry:HoldOp@171,registry:IdleSeconds@854,registry:ImportGate@262,registry:Incarnation@191,registry:LastError@343,registry:MaxRunSeconds@878,registry:Moved@1212,registry:NextDue@722,registry:PagesOff@327,registry:Platform@802,registry:PolicyExpiresAt@997,registry:Pool@533,registry:PrevVersion@407,registry:Replica@1073,registry:Replicas@1050,registry:Replication@697,registry:Runtime@643,registry:Seed@818,registry:SeedSource@238,registry:ServingSeq@215,registry:ServingVersion@505,registry:Size@979,registry:Socket@94,registry:StatusNamed@743,registry:Steering@904,registry:Tunnel@576,registry:Unit@783,registry:UpdateSettings@926,registry:Version@386 5bdea6c74f6b3a6615657d23053f0a9ac699f47c82d27dddb803e8edf6fd08cd
@legacy 5a1b549611ed909a2cb594f360ecef3d534278a83d1ae373d3b2c581ca79a27c internal/registry/registry.go scanRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user): main's body with the two new columns scanned;rev3=census-ruling-design-edge-rate-limit-358;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user): main's body with the rate_limit column scanned into Route.RateLimit; the new kind is registry:RateLimit, one site; no other read;rev3=census-ruling-rootfs-apps-2;identity=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user);basis=main's body with the runtime column scanned into Route.Runtime, before rate_limit; the new kind is registry:Runtime, one site; no other read; re-digested at the merge of origin/main 3c33f2eb: main's assets_off and asset_gen (edge asset cache plan 1) scanned beside runtime and rate_limit; routeColCount 59; re-digested again at the merge of origin/main 953b9fda: main's incarnation and serving_seq (self-serve moves plan 1) scanned after asset_gen; routeColCount 61;rev3=census-ruling-instance-egress-sizes-328-329;identity=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user);basis=#328/#329 plan 1 Task 4: main's body with egress_allow, size and policy_expires_at scanned into Route.EgressAllow, Route.Size and Route.PolicyExpiresAt after serving_seq; the new kinds are registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each; routeColCount 64; no other read;rev3=census-ruling-region-ha-p1a;basis=scans one more column, ha, into Route.HA (+registry:HA); routeColCount 64 to 65; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): scans three more columns, fleet_assigned, fleet_moved and fleet_label, into Route.Assigned, Moved and FleetLabel. Any root caller of Registry.Get sees three more fields, which no root decision reads (grep: only the activator start rule, edge, provision and registry read them).;rev3=census-ruling-stateless-replicas-1;basis=Decode the additive stateless registry column; no launch authority.;rev3=census-ruling-agent-start-demo-1;basis=Reads the four additive demo columns in the existing row scan.;rev3=census-ruling-stateless-replicas-2;basis=Existing row scanner reads four additive SQL columns from the same row and connection. merge of origin/main 6be08467: Read both main demo and branch replica values from the same 77-column row; merge-only source change.;rev3=census-ruling-edge-page-cache-1;basis=scans the new pages_off column into Route.PagesOff registry:Account@436,registry:Addr@204,registry:Addrs@526,registry:App@279,registry:Args@585,registry:AssetGen@895,registry:AssetsOff@1246,registry:Assigned@1002,registry:Backing@361,registry:BuildState@810,registry:Canary@1328,registry:Caps@466,registry:CertExpiresAt@418,registry:Channel@309,registry:ClaimIncarnation@647,registry:ClaimOwner@683,registry:ClaimRowID@698,registry:ClaimStamp@668,registry:Copies@1065,registry:CreatedAt@569,registry:DBPath@240,registry:DNSCheckedAt@401,registry:DNSStatus@387,registry:DemoExpiresAt@1160,registry:DemoHost@1130,registry:DemoID@1119,registry:DemoLifetime@1143,registry:EgressAllow@952,registry:Environment@450,registry:FleetBox@511,registry:FleetBoxes@1050,registry:FleetLabel@1023,registry:Gate@560,registry:GoodDemand@757,registry:GoodDigest@742,registry:GoodVersion@726,registry:HA@1208,registry:Health@536,registry:Hibernate@1304,registry:HoldOp@713,registry:Host@166,registry:IdleSeconds@594,registry:ImportGate@842,registry:Incarnation@919,registry:Kind@184,registry:LastError@226,registry:MaxRunSeconds@610,registry:Moved@1224,registry:NextDue@349,registry:PagesOff@1276,registry:Platform@1374,registry:PolicyExpiresAt@977,registry:Pool@287,registry:PrevVersion@263,registry:Provisioned@1398,registry:RateLimit@869,registry:Region@298,registry:Replica@1425,registry:ReplicaIncarnation@1096,registry:ReplicaRevision@1076,registry:Replicas@628,registry:Replication@333,registry:Runtime@857,registry:Seed@493,registry:SeedSource@827,registry:ServingSeq@935,registry:ServingVersion@772,registry:Size@968,registry:Slug@175,registry:Socket@193,registry:Stateless@1178,registry:Status@213,registry:StatusNamed@1349,registry:Steering@547,registry:Tunnel@475,registry:Unit@502,registry:UpdateSettings@791,registry:Version@251,whole:Route@1454 4d459b84016ba61bba59ef295f6bad868583dfe3c0c1530ff9b382e9580bd266
@@ -90,34 +93,37 @@ internal/activator/inputs.go SplitBackend.publishLaunchInputs legacy accepted-le
internal/activator/inputs.go inputsStamp legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=stats one of the instance's two env files to key CurrentInputs' cache: os.Lstat for a nested row (the tenant-writable directory, the final link not followed), os.Stat for a flat row (outside any tenant's reach, as the flat read follows it); a missing file is absent; metadata only, as user carlos file:Lstat@111,file:Stat@70 669b6ec9de2d71b30cdc1ba6556bab8b227d5acea0c04200c44ffc13e61861c6
internal/edge/cache.go Cache.CurrentInputs legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=calls the installed current-inputs hook (the exec backend's CurrentInputs) for rt, under no cache lock; false with no hook; in memory whole:Route@212 abea6289465e12fd8ff8f52359b6bd9cfb4b5363fb3857489d4efd9b9009b8d2
internal/edge/heldstream.go heldTask.legRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now gives each leg request its own page mark holder when the held route is an instance (t.rt.Kind, the +registry:Kind site); in memory registry:Kind@626,whole:Route@628 942046cbee13473fa2651c981b68c874f9665e7b16f32369a6bd3ec24ad35c7e
-internal/edge/pagecache.go Edge.applyPageRoutes legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache registry:Host@263,registry:PagesOff@385,whole:Route@208,whole:Route@243,whole:Route@258,whole:Route@274,whole:Route@320,whole:Route@373,whole:Route@789 a68b7b6f83783817d7de4f2da0b1d2ec029932a4478458fb30c3eec7a83087d4
+internal/edge/pagecache.go Edge.applyPageRoutes legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page reload hook, under reloadMu: for every scope the page index holds, finds the row by host in the rows Reload last read (e.pageRoutes, no new registry read); resets the scope and clears its opt-in mark when the row is gone, names another account or app (routeScope), or has PagesOff; resets only when the row is not eligible (pageRowEligible); the mark files are under the agent's own $CARLOS_DATA_DIR/page-cache; final fix wave: builds the rows map before the armed check and hands Cache.RetainInputs the hosts with rows (in memory: drops other hosts' process inputs and, through the hook wireCurrentInputs installs, the exec backend's cached env reads); resets when pageServedHere fails over the live table this reload published (e.current()), which adds a tunnel-served, path-routed or missing live entry to the reset cases, mark kept (the +whole:Route site is the pageServedHere call); ResetAndClearOptIn now also retires the departed scope's in-memory state; no new file or registry read registry:Host@173,registry:PagesOff@621,whole:Route@1027,whole:Route@118,whole:Route@153,whole:Route@168,whole:Route@184,whole:Route@371,whole:Route@556,whole:Route@609 1e13c5d0a85442195d166469d9bb6be1a17b7016eb14ae1831a364902893b246
internal/edge/pagecache.go Edge.clearPages legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=applies a purge's clear to the page index for the owner route's own scope (routeScope(owner)), never a scope looked up by host; a per-host clear names only host; in memory plus the asset store's page objects registry:Host@119,whole:Route@313 5248da064ec52768c1516e78087a0cefbf274b9d25f6e8c106d5f46c40a8cc40
internal/edge/pagecache.go Edge.instanceHosts legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=instanceHostsIn over one snapshot of the live route table (e.current()); in memory whole:Route@116 95cea6b3d918d621bd1041ecff1e6a6bc9d2aa95251ad7a17edc832c5ceba911
+internal/edge/pagecache.go Edge.ownsHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=purgeOwns over one snapshot of the live route table (e.current()), for the control socket's purge bridge (ledger R10); in memory, no file or registry read whole:Route@97 92ca3c8b0721066f2ce4dba3081a3c2c27be00afa2cb5889893937bb8110862e
internal/edge/pagecache.go Edge.pageDiagnostics legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=builds the request's page state for an instance route (up.route.Kind): the page index, the route's scope and whether it is opted in (an in-memory flag loaded from the mark files at Open); in memory registry:Kind@91,whole:Route@94 f746c4aa5fae6ea028423b4ee90e061dbda774bda1b888d16380fbdcd79d5ddc
-internal/edge/pagecache.go Edge.pageRouteEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read registry:Host@401,registry:Host@419,registry:Host@472,registry:Version@765,whole:Route@152,whole:Route@179,whole:Route@285,whole:Route@405,whole:Route@860 e968e1599e91134c5f9bbc2c02e0b583f6bb0bff7240f54514cc8a990cb3ecb1
+internal/edge/pagecache.go Edge.pageRouteEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the route half of the page rule: row eligible (pageRowEligible), not via a tunnel, no plan throttle, no path rows on the asked host or the primary (live table lookups), the serving build's asset declarations known and not covering path (the policy's in-memory manifest cache, DeclaresPrefix), and current inputs known (Cache.CurrentInputs); no direct file or registry read; final fix wave: the row, tunnel and primary-entry tests move into pageServedHere over the same live table snapshot (the -registry:Host site is the primary lookup that moved there); the same rule, and the primary entry must now also be the same instance (sameInstance); no read added registry:Host@403,registry:Host@421,registry:Version@684,whole:Route@152,whole:Route@199,whole:Route@305,whole:Route@407,whole:Route@779 fa951fe6442274df7a69be014d49017d7053308a7fd8a87c12a7f1b77cdb090e
internal/edge/pagecache.go Edge.pagesOptedIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=whether an instance route's scope holds an opt-in mark (in-memory flag); in memory registry:Kind@89,whole:Route@92 b61a315a0b13223b69167cb92f22edfa505617eaad608a82cce136c661af0689
internal/edge/pagecache.go Edge.servePage legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page cache at the LRU point: on an eligible route and a readable request, looks the key up in the page index and serves a hit from the asset store's entry (serveAssetEntry); on a storable miss whose process inputs equal the current inputs (ProcessInputs), begins a recording; reads the route, the request and the box's own asset store registry:Host@737,whole:Route@740 ea5ff6569a78e58a8b0f5c9c51f9b2275ca774deb270c58d63baea3e7a4beb8a
internal/edge/pagecache.go instanceHostsIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=every host of the given live-table snapshot whose entry is owner's instance (sameInstance), plus each LRU-cached host the snapshot resolves to it; wildcard keys left out; in memory registry:Host@98,whole:Route@234,whole:Route@241,whole:Route@355,whole:Route@362 3520f1b24e326eef819031a044dfa2cfdbaa80f30260e51c13c793819fce8518
internal/edge/pagecache.go pageRowEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over one route row: an instance, not forward, not HA, not a sidecar, not unit-backed, status ready, no gate, no import gate, PagesOff false registry:Backing@128,registry:Gate@192,registry:HA@100,registry:ImportGate@209,registry:Kind@55,registry:PagesOff@233,registry:Status@168 d568f708b4b147768c0ddccbca73f3781a267fabada4eb462415aa231d237610
internal/edge/pagecache.go pageScopeOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=the page scope of an upstream: release.RouteAccount(route), route.App and route.Host; pure registry:App@118,registry:Host@142,whole:Route@105,whole:Route@121,whole:Route@145 6ab7fdf066187767d2104ba6e1afcea49ea5eaa817cdfe2a9495f2be1affa1e3
internal/edge/pagecache.go pageServe.stillCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=before a recorded page is published, re-resolves host and path in the live table (lookupUpstreamPath), checks the same instance and scope, re-runs pageRouteEligible and compares the current and process inputs with the recording's; in memory registry:Host@122,registry:Host@140,registry:Host@350,whole:Route@126,whole:Route@146,whole:Route@354 592d1a20aab772475cd64b43a54892488b34d7fd55c5ee30adf9c97f62524f77
+internal/edge/pagecache.go pageServedHere legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over a live-table snapshot and a route row: pageRowEligible(rt), and the snapshot's entry for rt.Host (the registry:Host site) is the same instance (sameInstance), not served over a tunnel, with no path rows; asked by pageRouteEligible and applyPageRoutes; in memory registry:Host@132,whole:Route@176,whole:Route@183,whole:Route@90 13c16c6870982257940f33438804bbecc945a98ab36feeec8044dbc261437f2c
internal/edge/pagecache.go routeScope legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=pageScopeOf of a route (it builds an in-memory upstream{route: rt} only to ask that); pure whole:Route@81,whole:Route@88 0d0ce1202034e50490832377c0d1568abaf1ee363d38b6763781906f8f1cf5ac
internal/edge/pagecache.go sameInstance legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=whether two routes have the same page scope (routeScope); pure whole:Route@64,whole:Route@81 4aeeacb2aea633dd3ee54d1934a61853d5f198b964f2f4948766e3a9970ed404
internal/edge/pagerecord.go pageRecorder.finish legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=publishes a recorded page into the page index or abandons it: checks the body length, the Set-Cookie trailer veto and stillCurrent; writes the scope's opt-in mark (MarkOptInFor, a file in the agent's $CARLOS_DATA_DIR/page-cache) only while the recording's epoch is current; commits the page through the asset store with the stored header; the route Host sites are its log lines and stillCurrent registry:Host@1141,registry:Host@1247,registry:Host@641,registry:Host@756,whole:Route@1147,whole:Route@1253,whole:Route@647,whole:Route@762 9a35604dc5049091a17538941863f309986475f3fefed57c861af3a80e38d1c1
internal/edge/purge.go ListenPurge legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=signature only: takes the route (rt registry.Route) instead of its host and passes it to ListenControl; the +whole:Route site is that parameter whole:Route@129 f7a179808f792b3e4cc4c3bfa0d2460fc889fe20dd1d27a2d8bdb048816f2ce5
-internal/edge/purge_header.go Edge.applyPurgeTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects whole:Route@1841,whole:Route@1934,whole:Route@252 9f8ad87b4f539fa5806a69ef2a3c1e59ab3c3cd98ec485217a6e4a835a437d68
+internal/edge/purge_header.go Edge.applyPurgeTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=unit existed with no read; now takes the route snapshot and purgeHost owners: the LRU purges as before by host, plus page clears for each page host's owner (clearPages); the target "all" purges the LRU of every host the snapshot serves as each owner's instance (instanceHostsIn) and clears that instance's pages; in memory plus the asset store's page objects; final fix wave (ledger R10): every LRU purge (PurgeHost, PurgePath, PurgeURL, and the all expansion's own host) is of a host purgeOwns says its owner still owns in the same snapshot (the +whole:Route sites are the purgeOwns calls); page clears unchanged; in memory whole:Route@1994,whole:Route@2090,whole:Route@2183,whole:Route@252,whole:Route@466 e933dcefb7853f0e779938d98dd2d1c86e1e5637ed92423c4029d305d121dc2a
internal/edge/purge_header.go Edge.resolvePurgeOwnersIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=resolvePurgeHosts' former body, verbatim but for three things: it takes the snapshot (cur) from its caller, answers purgeHost{host, owner} pairs, and a host admitted by the path-routing exception (another app) is owned by the serving route rt (the +registry:App sites), so its page clear is of rt's own pages; the same caps, validation and ownership checks registry:Account@4904,registry:Account@4952,registry:App@4115,registry:App@4133,registry:App@4896,registry:App@4938,registry:App@5043,registry:App@5056,registry:Host@1095,registry:Host@1223,registry:Host@1429,registry:Host@1542,registry:Host@168,registry:Host@1821,registry:Host@2018,registry:Host@2441,registry:Host@4098,registry:Host@4248,registry:Host@4446,registry:Host@4608,registry:Host@479,registry:Host@4887,registry:Host@5668,registry:Host@5829,registry:Host@602,whole:Route@177,whole:Route@2701,whole:Route@4120,whole:Route@4173,whole:Route@4204,whole:Route@4559,whole:Route@4941,whole:Route@4955,whole:Route@5032,whole:Route@5196,whole:Route@5204,whole:Route@5251 101b4ea79f63e8ffa30a4fc5285f7f8955342a9c5960f569ac3b32ae032eb46f
internal/edge/purge_header.go pageHostsFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=with no Carlos-Purge-Host, the serving route's own host plus the asked host when the snapshot resolves it to the same instance (sameInstance); both owned by rt; port stripped with net.SplitHostPort; in memory registry:Host@109,registry:Host@233,whole:Route@118,whole:Route@316,whole:Route@323,whole:Route@381 6710bff0ba004394ecfc1d347db55e0901f14705f2daa0a6f36b9bf7ea6f44da
+internal/edge/purge_header.go purgeOwns legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=a pure predicate over a live-table snapshot (ledger R10): whether host resolves (lookupIn) to owner's instance (sameInstance), or path-routes to owner.Host (pathRoutesTo) while the snapshot's entry for owner.Host is owner's instance; in memory; it only narrows which LRU entries a purge may remove registry:Host@212,registry:Host@262,whole:Route@157,whole:Route@164,whole:Route@309,whole:Route@316 921b08c4d6da36a521451a7cae2d9649c8e56f10c5d46501124dedfaa36cb7b0
internal/host/pagearm.go armEdgePageCache legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=with CARLOS_PAGE_CACHE=1 and an open asset store, creates $CARLOS_DATA_DIR/page-cache (0700, as the agent user) and opens the page index over the store (pageindex.Open, the file:Open site, which reads the mark files there); hands it to the edge; unarmed or on any error, logs and does nothing; called only from runAgent's ready hook file:Open@450 8fed79bd25e53d46e25a84dbffa1206d47527dfd6b2c1cc549d8ed544404fee3
-internal/pageindex/index.go Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself file:Open@5 3574543354a9d2d91488785cfe74db5009b6a040537ee291ac6d491016f99324
+internal/pageindex/index.go Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=makes the index: drops every page object the asset store holds (Store.Retain on page keys) and loads the opt-in marks (loadMarks); the scanner's file:Open site is the function's own name; no file it opens itself; final fix wave: seeds the index's epoch counter once from random64 (x.epochs.Store), so scope epochs count up and never repeat within the process (a retired scope's ticket can never match a later state); no read added file:Open@5 93433b818a9179a3babaa8c9fa43be2a3b6b0f6671d53328d27a77de36ce7403
internal/pageindex/index.go random64 legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=crypto/rand.Read of 8 bytes (the scanner's file:Read site), for scope epochs and mark temporary names file:Read@41 2e20c178c65b44d4ddc876c0e6ca5ae5eff8c87cc078c972e61979d6fbc2f9f3
internal/pageindex/optin.go Index.loadMarks legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=creates the mark directory (0700) and reads it (os.ReadDir): removes crash temporaries, skips anything not a regular file (no symlink followed for the decision), and reads each regular file (os.ReadFile) as a JSON scope, kept only if its name is that scope's hash; the directory is $CARLOS_DATA_DIR/page-cache, written only by the agent file:ReadDir@166,file:ReadFile@553 425036c4b6cf4ff0126f7b4ebc3fbb98465d9dba15fe6ee0e1183209732a1419
internal/pageindex/optin.go syncDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=opens the mark directory (os.Open) to fsync it after a rename or removal file:Open@92 d39d227bd0d565399d71b2edf66ce7dd7dfde7b3d244dc9138f9949f7c643240
internal/pageindex/optin.go writeSynced legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=creates a new temporary mark file (os.OpenFile O_CREATE|O_EXCL, 0600) in the mark directory, writes and fsyncs it; the caller renames it into place file:OpenFile@62 44025a75750b5a06bbb122d1a97736131bdf79c901bf1930a057f3b65268e510
internal/registry/registry.go Registry.SetPages legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-page-cache-1;basis=new narrow writer: UPDATE routes SET pages_off = ? WHERE host = ? AND kind <> 'forward' (the file:Exec and registry:sql sites), noRoute on an unmatched host; with a remote registry, the same call over the remote client (registry:remote); a copy of SetAssets' shape; called by convergeOwned and the remote dispatch file:Exec@209,registry:remote@63,registry:remote@93,registry:sql@209,registry:sql@436,whole:remoteClient@65,whole:remoteClient@95 38ec8a72df4d940b7e5a8f24e969a6177fb0472a99381c1bdad66b25f5c15f3c
internal/activator/prepare.go ExecBackend.listenControl legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=passes the whole route to edge.ListenControl instead of rt.Host (the -registry:Host +whole:Route change); nothing else registry:Host@490,registry:Host@545,registry:Host@627,registry:Host@835,whole:Route@719 216a625e9bab7711678a28bb4a6f1d35799ef0f3acb57a3a9e041791eeb45b00
-internal/edge/demo_traffic.go Edge.serveDemoTraffic legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo_traffic.go:128-334 reads the resolved Route and passes it to existing admission, metering, rate and activator helpers. Resident serving checks precede the inert moved hook (:143), retirement and durable request debit (:302); output debits use the writer below compression. Forwarders do not count or transform again. Existing expiry/control cancellations and five-second write bounds apply; no request-path console or bucket read.;rev3=census-ruling-edge-page-cache-1;basis=attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else registry:App@2627,registry:DemoExpiresAt@1362,registry:Kind@6217,whole:Route@1061,whole:Route@1365,whole:Route@1504,whole:Route@1591,whole:Route@1714,whole:Route@223,whole:Route@2238,whole:Route@2554,whole:Route@2619,whole:Route@2630,whole:Route@2716,whole:Route@2812,whole:Route@2886,whole:Route@2933,whole:Route@2991,whole:Route@3020,whole:Route@3239,whole:Route@3270,whole:Route@3302,whole:Route@3675,whole:Route@375,whole:Route@4339,whole:Route@4389,whole:Route@4441,whole:Route@454,whole:Route@4680,whole:Route@5445,whole:Route@5988,whole:Route@6220,whole:Route@6607 afd123392d1c9c1b1faed7f394bf2f0f280e8ba8774aaffe00a73898f5d60066
-internal/edge/purge.go ListenControl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-page-cache-1;basis=takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query file:Query@1234,file:Query@1708,file:Query@1832,file:Query@824,registry:Host@136,whole:Route@1532,whole:Route@750 78ead77778fd68c38b53b11f1628c49bfbd1966341633b84150f9683a89de085
+internal/edge/demo_traffic.go Edge.serveDemoTraffic legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo_traffic.go:128-334 reads the resolved Route and passes it to existing admission, metering, rate and activator helpers. Resident serving checks precede the inert moved hook (:143), retirement and durable request debit (:302); output debits use the writer below compression. Forwarders do not count or transform again. Existing expiry/control cancellations and five-second write bounds apply; no request-path console or bucket read.;rev3=census-ruling-edge-page-cache-1;basis=attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else; final fix wave: also wraps the app's writer in the page diagnostics writer (pageDiagnostics(r, host, up).wrap(appWriter)), which sets Carlos-Cache: bypass on a marked response and records nothing; in memory, no read added registry:App@2627,registry:DemoExpiresAt@1362,registry:Kind@6495,whole:Route@1061,whole:Route@1365,whole:Route@1504,whole:Route@1591,whole:Route@1714,whole:Route@223,whole:Route@2238,whole:Route@2554,whole:Route@2619,whole:Route@2630,whole:Route@2716,whole:Route@2812,whole:Route@2886,whole:Route@2933,whole:Route@2991,whole:Route@3020,whole:Route@3239,whole:Route@3270,whole:Route@3302,whole:Route@3675,whole:Route@375,whole:Route@4339,whole:Route@4389,whole:Route@4441,whole:Route@454,whole:Route@4680,whole:Route@5445,whole:Route@5988,whole:Route@6498,whole:Route@6946 0bf14e3f377fe657b3a95be545c7dcb6aa2746e26ea40ff77c26143ba60c84e3
+internal/edge/purge.go ListenControl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-page-cache-1;basis=takes the instance's route (rt) from the caller instead of a host (host := rt.Host); every POST /purge also clears the page index for rt's own scope through the cache's purge bridge (nil when no edge armed it); the new body {"path":"all"} purges the LRU of the listener's host and every host the live table serves as rt's instance, and clears rt's pages; the +file:Query sites are the JSON body's Query field, not a database query; final fix wave (ledger R10): the LRU purge of the listener's host ("*" and an exact URL) runs only while the bridge says rt still owns that host in the live table (bridge.ownsHost), and "all" purges exactly the hosts the bridge's instanceHosts returns from one snapshot, which include the listener's host only while rt owns it (the +whole:Route site); with no bridge, the LRU as before; nothing more is read from the request than path and query file:Query@1190,file:Query@1624,file:Query@2176,file:Query@2306,registry:Host@136,whole:Route@1128,whole:Route@2012,whole:Route@750 71f2bbe779aff736fa22b281d23d4ec1d69ebb493e1352d961e1ee124269dfb6
internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-agent-start-demo-1;basis=Compares existing route descriptor to record descriptor before any ordinary convergence; refuses identity loss or change.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: clear a legacy owned set row when the local incarnation is no greater than the record counter, even when CreatedAt changed its replica hash. Same exact-row ClearReplicaAssignment CAS and member/hold/projection refusals; no new read. A pair installed earlier in a pass invalidates the observed-row CAS and is retried next pass. merge of origin/main 6be08467: Check main demo identity before any set mutation; additionally refuse mixed demo/set state. Retain branch legacy successor clearing and set convergence.;rev3=census-ruling-edge-page-cache-1;basis=converges the route's pages_off from the record in both directions (existing.PagesOff against !rec.PagesOn(), the three +registry:PagesOff sites) through reg.SetPages, logging in dry-run, as the assets switch above it does registry:Account@610,registry:Addr@3897,registry:Addr@4119,registry:Addr@4546,registry:Addrs@3924,registry:Addrs@4140,registry:Addrs@4567,registry:App@645,registry:AssetGen@5404,registry:AssetGen@5590,registry:AssetGen@5981,registry:AssetsOff@5374,registry:AssetsOff@5564,registry:AssetsOff@5955,registry:Assigned@9256,registry:Assigned@9460,registry:Assigned@9909,registry:Channel@1632,registry:Channel@1762,registry:Channel@2093,registry:Copies@1069,registry:Copies@1088,registry:DemoExpiresAt@429,registry:DemoHost@345,registry:DemoID@311,registry:DemoLifetime@383,registry:EgressAllow@11175,registry:EgressAllow@11431,registry:EgressAllow@11853,registry:Environment@2135,registry:Environment@2277,registry:Environment@2636,registry:FleetBoxes@1027,registry:FleetBoxes@1050,registry:FleetBoxes@263,registry:FleetBoxes@552,registry:HA@8633,registry:Health@3951,registry:Health@4163,registry:Health@4590,registry:Host@672,registry:Incarnation@701,registry:Moved@9295,registry:Moved@9479,registry:Moved@9928,registry:PagesOff@6114,registry:PagesOff@6244,registry:PagesOff@6558,registry:PolicyExpiresAt@11256,registry:Provisioned@586,registry:Replica@7992,registry:Replica@8120,registry:Replica@8452,registry:ReplicaIncarnation@1155,registry:ReplicaIncarnation@1186,registry:ReplicaIncarnation@1276,registry:ReplicaIncarnation@1359,registry:ReplicaIncarnation@1467,registry:ReplicaRevision@1103,registry:ReplicaRevision@1131,registry:Replicas@7123,registry:Replicas@7248,registry:Replicas@7570,registry:Size@11217,registry:Size@11469,registry:Size@11891,registry:Stateless@1214,registry:StatusNamed@2712,registry:StatusNamed@2856,registry:StatusNamed@3220,registry:Steering@4626,registry:Steering@4759,registry:Steering@5097,registry:UpdateSettings@10233,registry:UpdateSettings@10373,registry:UpdateSettings@10733,whole:Route@1349,whole:Route@870 f7c596cc87c437f038c0d23f616d29ea0d38ec88a2e47cc6e4ede5414aba0ed6
internal/registry/forward.go Route.InertForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 2: true only when every one of the 50 forbidden columns of §4.2 is zero (one +registry:<field> site each, nothing else). Pure.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): two more forbidden fields must be zero on a forward row, Assigned == "" and !Moved (fleet_assigned, fleet_moved in ForwardForbidden). Stricter, never looser.;rev3=census-ruling-stateless-replicas-2;basis=Pure validation additionally refuses malformed set projections; all unrelated forbidden fields still must be zero.;rev3=census-ruling-edge-page-cache-1;basis=a forward row must also have PagesOff false to be inert (the +registry:PagesOff site); PagesOff is forbidden on a forward row (forwardShape, ForwardForbidden) registry:Addr@114,registry:Addrs@132,registry:Args@836,registry:AssetGen@304,registry:AssetsOff@287,registry:Assigned@1189,registry:Backing@762,registry:BuildState@1026,registry:Canary@683,registry:Caps@596,registry:ClaimIncarnation@1088,registry:ClaimOwner@1141,registry:ClaimRowID@1165,registry:ClaimStamp@1118,registry:DBPath@366,registry:EgressAllow@954,registry:Environment@551,registry:Gate@664,registry:GoodDemand@481,registry:GoodDigest@457,registry:GoodVersion@432,registry:HA@633,registry:Health@151,registry:Hibernate@615,registry:HoldOp@171,registry:IdleSeconds@854,registry:ImportGate@262,registry:Incarnation@191,registry:LastError@343,registry:MaxRunSeconds@878,registry:Moved@1212,registry:NextDue@722,registry:PagesOff@327,registry:Platform@802,registry:PolicyExpiresAt@997,registry:Pool@533,registry:PrevVersion@407,registry:Replica@1073,registry:Replicas@1050,registry:Replication@697,registry:Runtime@643,registry:Seed@818,registry:SeedSource@238,registry:ServingSeq@215,registry:ServingVersion@505,registry:Size@979,registry:Socket@94,registry:StatusNamed@743,registry:Steering@904,registry:Tunnel@576,registry:Unit@783,registry:UpdateSettings@926,registry:Version@386 5bdea6c74f6b3a6615657d23053f0a9ac699f47c82d27dddb803e8edf6fd08cd
internal/registry/registry.go routeArgs authority E3 rev3=census-ruling-seeded-instances;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), wherever a route is inserted: Upsert, the cold handover restore and the import journal's inserts: the bind list from Registry.Upsert's body (and RestoreClaimRows'), with seed_source and import_gate added; E3, the same family as Registry.Upsert, whose body it came from;rev3=census-ruling-design-edge-rate-limit-358;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), wherever a route is inserted: the bind list gains t.RateLimit for the new rate_limit column (routeCols and Upsert's conflict clause gain it too); the new kind is registry:RateLimit, one site; it binds the value and decides nothing; E3, as before;rev3=census-ruling-rootfs-apps-2;identity=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user);basis=the bind list gains t.Runtime for the new runtime column (routeCols, routeColCount 57 with main's rate_limit, and Upsert's conflict clause gain it too); the new kind is registry:Runtime, one site; it binds the value and decides nothing; E3, as before; re-digested at the merge of origin/main 3c33f2eb: main's assets_off and asset_gen (edge asset cache plan 1) bound beside runtime and rate_limit; routeColCount 59; re-digested again at the merge of origin/main 953b9fda: main's incarnation and serving_seq (self-serve moves plan 1) bound after asset_gen; routeColCount 61;rev3=census-ruling-instance-egress-sizes-328-329;identity=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user);basis=#328/#329 plan 1 Task 4: the bind list gains t.EgressAllow, t.Size and t.PolicyExpiresAt for the three new columns (routeCols, routeColCount 64, and Upsert's conflict clause gain them too); the new kinds are registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each; it binds the values and decides nothing; E3, as before;rev3=census-ruling-region-ha-p1a;basis=binds one more column, ha, as an integer from Route.HA (+registry:HA); keeps authority E3;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): binds three more columns, t.Assigned, b2iDB(t.Moved) and t.FleetLabel (routeColCount 65 to 68).;rev3=census-ruling-stateless-replicas-1;basis=Encode the additive Stateless flag in the shared SQL insert argument list; no launch authority.;rev3=census-ruling-agent-start-demo-1;basis=Reads the four additive demo fields for the existing route INSERT binding.;rev3=census-ruling-stateless-replicas-2;basis=Supplied Route contributes four additive declarative SQL values; no external read or new executable path. merge of origin/main 6be08467: Union main demo and branch replica values in the shared 77-column SQL serialization; merge-only source change.;rev3=census-ruling-edge-page-cache-1;basis=binds b2iDB(t.PagesOff) in the new pages_off position of routeCols (78 columns) registry:Account@355,registry:Addr@83,registry:Addrs@451,registry:App@152,registry:Args@505,registry:AssetGen@818,registry:AssetsOff@804,registry:Assigned@935,registry:Backing@253,registry:BuildState@730,registry:Canary@216,registry:Caps@381,registry:CertExpiresAt@338,registry:Channel@177,registry:ClaimIncarnation@577,registry:ClaimOwner@611,registry:ClaimRowID@625,registry:ClaimStamp@597,registry:Copies@1011,registry:CreatedAt@492,registry:DBPath@116,registry:DNSCheckedAt@320,registry:DNSStatus@307,registry:DemoExpiresAt@1100,registry:DemoHost@1072,registry:DemoID@1062,registry:DemoLifetime@1084,registry:EgressAllow@880,registry:Environment@366,registry:FleetBox@439,registry:FleetBoxes@997,registry:FleetLabel@963,registry:Gate@484,registry:GoodDemand@680,registry:GoodDigest@666,registry:GoodVersion@651,registry:HA@928,registry:Health@460,registry:Hibernate@196,registry:HoldOp@639,registry:Host@49,registry:IdleSeconds@513,registry:ImportGate@760,registry:Incarnation@849,registry:Kind@65,registry:LastError@101,registry:MaxRunSeconds@528,registry:Moved@953,registry:NextDue@242,registry:PagesOff@836,registry:Platform@294,registry:PolicyExpiresAt@903,registry:Pool@159,registry:PrevVersion@137,registry:Provisioned@407,registry:RateLimit@785,registry:Region@167,registry:Replica@565,registry:ReplicaIncarnation@1040,registry:ReplicaRevision@1021,registry:Replicas@547,registry:Replication@227,registry:Runtime@774,registry:Seed@423,registry:SeedSource@746,registry:ServingSeq@864,registry:ServingVersion@694,registry:Size@895,registry:Slug@57,registry:Socket@73,registry:Stateless@983,registry:Status@91,registry:StatusNamed@272,registry:Steering@472,registry:Tunnel@389,registry:Unit@431,registry:UpdateSettings@712,registry:Version@126 6e456ad21c3d411eeae3a04a8581cc0506d1ddc5583c17cf3c695d6ba361efed
@@ -129,11 +135,11 @@ internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3
internal/edge/purge_header.go Edge.applyPurgeHeader legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=takes the asked Host, takes one route table snapshot (e.current()) for the whole declaration, resolves owners through resolvePurgeOwnersIn and, with no Carlos-Purge-Host, the page hosts through pageHostsFor (the +whole:Route site); then applyPurgeTargets; in-memory only registry:Host@1448,whole:Route@1303,whole:Route@1408 7edbfc8b501f83fc667bca48743a2d309d457dae00ee1dedbee8166412ba2c42
internal/edge/purge_header.go Edge.resolvePurgeHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=now a wrapper: resolvePurgeOwnersIn(e.current(), rt, declared) and the hosts of its answer; its read sites moved verbatim into resolvePurgeOwnersIn, so they show as removed here; no read added whole:Route@140 d8bbc036cf3b5959e4af7ff4f38de9d30f3f32c6f0dd29ba10bc515ba177c2ab
@coverage . ef6acb79e68293c6388cffbacbfda3a3a0f14aa5e2507a56db1f36983bb93820
-@coverage internal/activator d2142e996fae354fa88e0a56427fdf7ba5a3a5daa026f1a6b0787f3b78054d2a
+@coverage internal/activator 306c9930c6a3375d7eb77ac802d42396bffaea83991a90e0ef19b3ba7bad307a
@coverage internal/assetcache 961aebe547eac250194e91f8bd1d819977b7f6163ccb8a31725d93573f2a6c54
-@coverage internal/edge 38bf41ebf642708317658758dea8da4cd5b6da2232aa4e8d2aa03d64067f0a9c
-@coverage internal/host 87a60b80b344fc534277a2191cbc993aef260f12af7db2f196964dd3e3cea4ef
-@coverage internal/pageindex 600f8fcde6c340e0e34bd8809e2406a77d363b20ae5a6bd9168df4392d603976
+@coverage internal/edge 6597b91a8043ecfe78e1caecbc68ef641460030e69049f0ded2191b104e97a7e
+@coverage internal/host 01d9470e3c63db06a0f46fa211accb4f39463ecd75a4c5ff34b08b1a07c5926a
+@coverage internal/pageindex 0ff735597b972a3ac836f43e132b660ebe9ff965c3d0d44e1f73eb4a92128edd
@coverage internal/provision 74198a90fb4e2a511e92e10faf144e98f3f32c9153eff3f805808043afae1d4d
@coverage internal/registry 77408f929aabc19c7077011b5a3a9cb50bb9f92c1017f798da5d7959597544fe
@fields ?,A,Account,Accounts,AcquiredGeneration,AddedAt,Addr,Addrs,Adoption,Alias,Aliases,Alive,AllowAbsent,App,Archives,Args,AssetGen,AssetsOff,Assigned,Assignment,At,Attempts,B,Backing,Basis,Binding,Blocked,Body,Bucket,BuildState,By,Callback,CallbackError,CallbackFailed,Canary,Caps,CertExpiresAt,Changed,Channel,CheckedAt,Claim,ClaimIncarnation,ClaimOwner,ClaimOwnership,ClaimRowID,ClaimStamp,Class,Code,Column,Contents,Copies,Count,CreatedAt,Cursor,DBPath,DNSCheckedAt,DNSStatus,Deadline,Default,DeleteUncertain,Demand,DemoExpiresAt,DemoHost,DemoID,DemoLifetime,Departure,DepartureIID,DepartureRef,Departures,Digest,DoneBefore,DrainingSince,Due,DueAt,Duty,EdgesETag,EgressAllow,EnrolledAt,Env,EnvBefore,Environment,Error,ErrorKind,ExcludeHosts,ExpectGood,ExpectOp,ExpectPair,Expected,ExpectedPair,F,Failed,FenceGen,Field,FillLegacyRegistration,Fleet,FleetBox,FleetBoxes,FleetLabel,Fleets,Found,From,FromDB,FromOp,FromSock,Gate,Generation,GoodDemand,GoodDigest,GoodVersion,HA,HAJournal,Hash,Health,Held,Hibernate,Hint,Hints,HoldOp,HolderEpoch,HolderIID,HolderRef,Host,Hosts,ID,IID,Id,IdValue,Identity,Idle,IdleSeconds,Import,ImportGate,Inbox,Incarnation,InventoryGeneration,Journal,Keep,Key,KeyFP,Keys,Kind,Label,LabelledAt,LastAt,LastBlocked,LastError,LastMs,LastPage,LastStatus,Lifetime,Limit,LockETag,LockGeneration,Managed,MaxRun,MaxRunSeconds,MessageID,Method,Moved,Ms,Name,Next,NextAt,NextAttempt,NextDue,NextGood,NextValue,NotBefore,Now,Number,Number64,Observation,Observed,ObservedValue,Offset,Old,Oldest,On,OnConflict,Op,Original,Owner,Ownership,P,Page,PagesOff,Pair,Path,Paths,PermissionAlerted,Phase,Platform,PolicyExpiresAt,Pool,Prefix,Prev,PrevVersion,ProofDigest,ProofKey,Provisioned,Pub,RDs,RateLimit,Raw,Receipt,ReceivedAt,RecordDigest,RecordKey,Ref,Region,Regional,Registration,Replica,ReplicaIncarnation,ReplicaLife,ReplicaRevision,Replicas,Replication,Rescan,Result,Retirement,RetryCount,Revision,Route,Routes,Row,Rows,Runtime,Scan,SecretsKeyFP,SecretsKeySetAt,SecretsKeySetBy,SecretsPub,Seed,SeedID,SeedSource,Sequence,ServingSeq,ServingVersion,Size,Slug,Socket,Spec,Sqid,StartedAt,State,Stateless,Status,StatusNamed,Steering,StringMap,Summary,T,TValue,Tags,Target,Targets,Text,Timer,Timers,Times,To,ToDB,ToOp,ToSock,TokenHash,Tunnel,Type,Unit,Unresolved,UpdateSettings,Ver,Version,ViewKey,Visited,W,Waiting,Wake,WakeDigest,WakeIncarnation,Walk,Wildcards,closed,conn,connect,ctx,d,dec,done,enc,full,input,mu,output,path,readOnly,remote,sql,wait