census: edge-asset-cache-3 approvals, decisions and record-write layer; test weights (asset cache plan 3 Task 10)
The #369 process. make census-propose NAME=edge-asset-cache-3 wrote the approvals overlay (four body changes, assetPolicy.decide's +registry:Host, envelopes . internal/console internal/edge internal/edgesfile internal/host) and the card docs/superpowers/notes/census-proposal-edge-asset-cache-3.md. The decisions are hand-written in plan14-root-reads-edge-asset-cache-3-decisions, chained before it: seven new units (the edge's asset catch, fill and answer, and the agent's arming) and runAgent re-frozen with file:Statfs. They are for the census owner on #280 and are not approved. The record-write census re-pins Server.handleAPIAssetsStatus in place (key-site, lit:instances). Weights for the plan's new tests of a quarter second or more in the split packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+110
−1
.amadan/test-weights.tsv+4 −0docs/superpowers/notes/census-proposal-edge-asset-cache-3.md+27 −0internal/provision/edge_asset_cache_3_census_test.go+41 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+3 −0internal/provision/testdata/plan14-root-reads-edge-asset-cache-3-decisions.tsv+19 −0internal/provision/testdata/plan14-root-reads-edge-asset-cache-3.tsv+15 −0
CI passed — run details
diff --git a/.amadan/test-weights.tsv b/.amadan/test-weights.tsv| index 6005af5ae..4a2021233 100644 |
| --- a/.amadan/test-weights.tsv |
| +++ b/.amadan/test-weights.tsv |
| @@ -92,6 +92,7 @@ github.com/carlosframework/platform/internal/console TestSystemDoorsRefuseAPreLa |
| github.com/carlosframework/platform/internal/console TestSystemStatusAndRollback 2.2 |
| github.com/carlosframework/platform/internal/console TestTodaysFleetWithNoLayoutFieldKeepsRollbackAndUpdate 2.2 |
| github.com/carlosframework/platform/internal/console TestPublishSurvivesDatabasesThatHangOrPanicTheParser 2.1 |
| +github.com/carlosframework/platform/internal/console TestStatusShowsUnknownWhenTheEdgesFileCannotBeRead 2.0 |
| github.com/carlosframework/platform/internal/console TestDBReadStreamsAQueryEndToEnd 1.9 |
| github.com/carlosframework/platform/internal/console TestInstanceCreateMintsAssetGenForSeed 1.8 |
| github.com/carlosframework/platform/internal/console TestDBReadSetsBothReadDeadlines 1.7 |
| @@ -111,6 +112,8 @@ github.com/carlosframework/platform/internal/console TestAnIncompletePlacementRe |
| github.com/carlosframework/platform/internal/console TestClaimLossPagesScanProgressSurvivesRestartAndWraps 1.0 |
| github.com/carlosframework/platform/internal/console TestCreateDoorsRefuseWithNoRoomBeforeRegistering 1.0 |
| github.com/carlosframework/platform/internal/console TestDBReadRequestBoundClampsAForgedDeadline 1.0 |
| +github.com/carlosframework/platform/internal/console TestAssetsStatusIsUnknownWhereEdgesWouldDisagree 0.6 |
| +github.com/carlosframework/platform/internal/console TestAssetsStatusSkipsAHomeNoEdgeCanDial 0.5 |
| github.com/carlosframework/platform/internal/host TestClaimAckRefreshProductionClient 20.09 |
| github.com/carlosframework/platform/internal/host TestStalledIndexGetKeepsReconcileWalking 5.03 |
| github.com/carlosframework/platform/internal/host TestPlan14Fix5MainEquivalence 4.37 |
| @@ -149,6 +152,7 @@ github.com/carlosframework/platform/internal/host TestPublishRecordRefusesWhatEn |
| github.com/carlosframework/platform/internal/host TestPlan14RootMigrationTimerAdoption 0.51 |
| github.com/carlosframework/platform/internal/host TestPlan14SwapFailureSurvivesLegacyTampering 0.51 |
| github.com/carlosframework/platform/internal/host TestConsoleDigestRefusesOversized 0.50 |
| +github.com/carlosframework/platform/internal/host TestAssetCacheArmingReadsTheEnv 0.51 |
| github.com/carlosframework/platform/internal/host TestHomeTargetFreshStateShowsOnlyTheHomeToken 0.49 |
| github.com/carlosframework/platform/internal/host TestPlan14RecoveryRebindAuthority 0.49 |
| github.com/carlosframework/platform/internal/host TestFilesSeedCombinedRecoveryAllowsUpdate 0.45 |
diff --git a/docs/superpowers/notes/census-proposal-edge-asset-cache-3.md b/docs/superpowers/notes/census-proposal-edge-asset-cache-3.md| new file mode 100644 |
| index 000000000..385125d59 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-edge-asset-cache-3.md |
| @@ -0,0 +1,27 @@ |
| +# Census approval: edge-asset-cache-3 |
| + |
| +Ruling `census-ruling-edge-asset-cache-3`. Every change below keeps the disposition it already has, so it needs an approval, not a decision. |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/edge/cookiescope.go` `Edge.responseModifier` | body | unchanged (2) | the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added | |
| +| `internal/edge/edge.go` `Edge.ServeHTTP` | body | unchanged (25) | the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added | |
| +| `internal/host/edgesfile.go` `edgesFileLoop` | body | unchanged (1) | takes the box's one asset policy from runAgent (drift D12) instead of building it from the serving-build hook, binds this loop's manifest cache to it before the first pass (bindManifests), and each tick works with assets.active(), nil until the ready hook has opened the asset store, for the change key, the rewrite-due check and the edgesFileWriteClaims pass; the lifetimes switch is handed on as before; read site unchanged (1); no read added | |
| +| `internal/host/edgesfile.go` `edgesFileWriteClaims` | body | unchanged (44) | starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added | |
| +| `internal/host/assetpolicy.go` `assetPolicy.decide` | sites | +registry:Host | the decision now carries Primary: r.Host, the host of the row it was decided for (the host itself, or an alias's target), which the edges file publishes as the block's primary and the edge compares with its own route row (assetUpstreamMatches, drift D4); one more read of the Host field of a row it already reads (+registry:Host); no new kind of read | |
| + |
| +Envelopes re-pinned: `.`, `internal/console`, `internal/edge`, `internal/edgesfile`, `internal/host`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Escalate if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. An escalation goes to the census owner as a decision. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/edge/cookiescope.go` `Edge.responseModifier`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route |
| +- `internal/edge/edge.go` `Edge.ServeHTTP`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read |
| +- `internal/host/edgesfile.go` `edgesFileLoop`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body, which also takes the box's lifetimes switch (runAgent's boxJudge != nil) and hands it to every edgesFileWriteClaims pass; read site unchanged, offset moved; a report, not a decision; self-serve moves 1 Task 8 |
| +- `internal/host/edgesfile.go` `edgesFileWriteClaims`: authority, task F,J1. Basis: rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8 |
| +- `internal/host/assetpolicy.go` `assetPolicy.decide`: authority, task F,J1. Basis: root-route;kept=F;scope=protected-decision-only;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): the asset publication rule for one hostname over rows already read: the row's status, assets_off, asset_gen, gate, import_gate, pool, version and host, the path rows, the owner (servedOwners) and the authority clock, then each build's asset folders from its release manifest in the deployment bucket (assetManifestCache.paths, release.GetManifest, which checks the manifest's content and that it names the app and version its key claims; it verifies no signature); the answer is an assets block in the edges file, which far edges (agents, as carlos) read to cache static files, and the home edge's own catch; it only withholds when any input is missing; no root pass calls it; no root decision |
| + |
| +Seal: `50792c393d15678025ea7955eafb45fe5e7211499027b0ce2d22328cf83a6dc2` → `7ca1cf36a78a91a75f35376a4723cc2243d521edd8c4e615e49c3da52e1c47c5`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-edge-asset-cache-3.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/edge_asset_cache_3_census_test.go b/internal/provision/edge_asset_cache_3_census_test.go| new file mode 100644 |
| index 000000000..34de67ffc |
| --- /dev/null |
| +++ b/internal/provision/edge_asset_cache_3_census_test.go |
| @@ -0,0 +1,41 @@ |
| +package provision |
| + |
| +// edgeAssetCache3WriteCensusInventory is the record-write inventory for |
| +// edge-asset-cache-3 (plan 3 of the edge asset cache: serve, and the status |
| +// election of Task 12, #396), layered on claimsCleanupR2WriteCensusInventory |
| +// (main's newest at the merge of origin/main a912a342). Reviewed by the |
| +// branch author; the census owner rules with the root-read card |
| +// docs/superpowers/notes/census-proposal-edge-asset-cache-3.md |
| +// (census-ruling-edge-asset-cache-3). |
| +// |
| +// - Server.handleAPIAssetsStatus (apiassets.go) is re-pinned in place, |
| +// key-site, kinds unchanged (lit:instances). Its record read is the same |
| +// judged listRecordsComplete of the app's records. What changed is how it |
| +// reads the edges files: s.homeAssets reads a snapshot |
| +// (readEdgesSnapshot) and elects through |
| +// edgesfile.ElectHomesForEveryReader, and a host the readers disagree on, |
| +// or a snapshot that is not complete or does not decode, is answered |
| +// PublishedUnknown. It writes no record, and no write site is added. |
| +func edgeAssetCache3WriteCensusInventory() []censusEntry { |
| + repinned := []censusEntry{ |
| + {"internal/console/apiassets.go", "Server.handleAPIAssetsStatus", "key-site", "lit:instances", "3a9f6444442b21813b6cffe44789c5eef4a27dc29d2807f953cfed1d86ca486b"}, |
| + } |
| + entries := append([]censusEntry(nil), claimsCleanupR2WriteCensusInventory()...) |
| + for _, r := range repinned { |
| + found := false |
| + for i, entry := range entries { |
| + if entry.File == r.File && entry.Unit == r.Unit { |
| + if entry.Class != r.Class || entry.Kinds != r.Kinds { |
| + panic("edge asset cache 3 re-pin changes the class or kinds of " + r.File + ":" + r.Unit) |
| + } |
| + entries[i] = r |
| + found = true |
| + break |
| + } |
| + } |
| + if !found { |
| + panic("edge asset cache 3 re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 7275e8551..559438935 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) { |
| if len(got) < 100 { |
| t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root) |
| } |
| - inventory := claimsCleanupR2WriteCensusInventory() |
| + inventory := edgeAssetCache3WriteCensusInventory() |
| problems := append(censusDiff(inventory, got), censusPolicy(inventory)...) |
| if len(problems) > 0 { |
| t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n ")) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 00311d81b..46d9a7d42 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -45,3 +45,6 @@ plan14-root-reads-edge-protection-2.tsv a864cf31b6bf2c30b5aa8c2647835efdc456f34f |
| plan14-root-reads-offline-move-trim-t1.tsv a864cf31b6bf2c30b5aa8c2647835efdc456f34f4945eea12751daab2457728e |
| plan14-root-reads-claims-cleanup-r1.tsv 9cef5e93a1e3520e02efe66455bf70c1170d380b6d6a72ede02036ce3dd41924 |
| plan14-root-reads-claims-cleanup-r2.tsv 9cef5e93a1e3520e02efe66455bf70c1170d380b6d6a72ede02036ce3dd41924 |
| +# edge-asset-cache-3-decisions (edge asset cache plan 3): hand-written decisions (seven new units, runAgent re-frozen with file:Statfs), ruled by the census owner on #280; census-propose's edge-asset-cache-3 overlay follows it, last. |
| +plan14-root-reads-edge-asset-cache-3-decisions.tsv 50792c393d15678025ea7955eafb45fe5e7211499027b0ce2d22328cf83a6dc2 |
| +plan14-root-reads-edge-asset-cache-3.tsv 7ca1cf36a78a91a75f35376a4723cc2243d521edd8c4e615e49c3da52e1c47c5 |
diff --git a/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3-decisions.tsv b/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3-decisions.tsv| new file mode 100644 |
| index 000000000..d92622649 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3-decisions.tsv |
| @@ -0,0 +1,19 @@ |
| +# Census overlay edge-asset-cache-3-decisions, written BY HAND (AGENTS.md, The census: census-propose refuses decisions). The decisions of census-ruling-edge-asset-cache-3 (branch edge-asset-cache-3, plan 3 of docs/superpowers/specs/2026-10-24-edge-asset-cache-design.md: serve declared asset paths from the disk store on the home box and on far edges; plan docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md): seven new units and one unit re-frozen with a new kind of read. Loaded from the chain manifest after claims-cleanup-r2 (main's last at the merge of origin/main a912a342) and before plan14-root-reads-edge-asset-cache-3.tsv, which census-propose wrote for the approvals. Asked of the census owner on #280 with the card docs/superpowers/notes/census-proposal-edge-asset-cache-3.md; rows carry the ruling from the start (#369). |
| +# No root read is added. Every new unit runs in the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): six in its edge, which reads only the route row it already resolved, a synthetic row built from the home's published owner, and its own asset store under $CARLOS_DATA_DIR/asset-cache through internal/assetcache (accepted legacy at census-ruling-edge-asset-cache-2); one in its ready hook, which opens that store. Seven frozen declarations are added, so the seal moves. |
| +# NEW: the edge's asset catch, fill and answer (internal/edge assetcatch.go, assetserve.go) and the agent's arming (internal/host assetarm.go). Accepted legacy, the class of Edge.ServeHTTP and of the asset store's own units. |
| +@legacy 5cf2772dbc71e6ad920994db7f2654c5edddbe7e834e6547f9334863c89fbfb1 internal/edge/assetcatch.go Edge.assetForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): the asset cache's uncached fallback. It forwards the request as the ordinary path does, through rateAdmit (drift D7), and for a hibernating route hands the route row the edge already resolved (up.route) to the activator, as ServeHTTP's own hibernating branch does; the response is marked Carlos-Cache: bypass. Its one site is that pass of the resolved row; no file, store or other row read; serving only; no root decision; the class of Edge.ServeHTTP (accepted legacy) whole:Route@444 4f7e2875878cd838bc5870d2d7852df05de82d9c201deb4bb36badbb11fa9802 |
| +internal/edge/assetcatch.go Edge.assetForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): the asset cache's uncached fallback. It forwards the request as the ordinary path does, through rateAdmit (drift D7), and for a hibernating route hands the route row the edge already resolved (up.route) to the activator, as ServeHTTP's own hibernating branch does; the response is marked Carlos-Cache: bypass. Its one site is that pass of the resolved row; no file, store or other row read; serving only; no root decision; the class of Edge.ServeHTTP (accepted legacy) whole:Route@444 4f7e2875878cd838bc5870d2d7852df05de82d9c201deb4bb36badbb11fa9802 |
| +@legacy 7b9f0d5e67a7add5bdcfa050963a57def7fea7e527d8a9af64fec92ffdf87322 internal/edge/assetcatch.go Edge.fillFromApp legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): fills one entry of this box's asset store from the app. It sends the allow-listed request (Host, User-Agent, Accept, Accept-Encoding: identity; GET even for a HEAD; no cookie, credentials or visitor geo) through the activator for a hibernating route (passing up.route) or the route's proxy, and judges the response with assetAdmit against the box policy's Declared answer for the request host, the path and the build that answered: the row's Version, or on a generation-managed route the response's X-Carlos-Version, so an app can only name a build of its own host; up.route.Host names the route in a commit failure's log line. Reads only the route row the edge already resolved; the body goes into the store through internal/assetcache (accepted legacy, census-ruling-edge-asset-cache-2); no root decision registry:Host@707,registry:Version@315,whole:Route@318,whole:Route@605,whole:Route@710 a1eeed45439e27581143da66f5e9e31dccbbd1008e561a57c7c706183f32b017 |
| +internal/edge/assetcatch.go Edge.fillFromApp legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): fills one entry of this box's asset store from the app. It sends the allow-listed request (Host, User-Agent, Accept, Accept-Encoding: identity; GET even for a HEAD; no cookie, credentials or visitor geo) through the activator for a hibernating route (passing up.route) or the route's proxy, and judges the response with assetAdmit against the box policy's Declared answer for the request host, the path and the build that answered: the row's Version, or on a generation-managed route the response's X-Carlos-Version, so an app can only name a build of its own host; up.route.Host names the route in a commit failure's log line. Reads only the route row the edge already resolved; the body goes into the store through internal/assetcache (accepted legacy, census-ruling-edge-asset-cache-2); no root decision registry:Host@707,registry:Version@315,whole:Route@318,whole:Route@605,whole:Route@710 a1eeed45439e27581143da66f5e9e31dccbbd1008e561a57c7c706183f32b017 |
| +@legacy 75759405ddabb7cdd1c27bb9fa9be97cc92c0556aa85a1ff792cce7a7aecc398 internal/edge/assetcatch.go Edge.localAssetCatch legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): the local catch decision on a box with a route row for the host. It catches only when armed, for GET or HEAD, on a row of the edge's own route snapshot that is not the status host and has no password gate and no import gate (the row's Kind, Gate and ImportGate), and for a path under a prefix the box's asset policy holds for the host (LocalAssets.For, the edges file writer's settled snapshot, no registry read per call). It only narrows: a gated or import-gated row is never caught, so a stored body is never served past a gate; no root decision registry:Gate@500,registry:ImportGate@523,registry:Kind@471,whole:Route@474,whole:Route@503,whole:Route@526 28239bf9ac0b258105fc3a2e0f83317de0f7a7e0d8d20c6d10ba7f221a33f186 |
| +internal/edge/assetcatch.go Edge.localAssetCatch legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5): the local catch decision on a box with a route row for the host. It catches only when armed, for GET or HEAD, on a row of the edge's own route snapshot that is not the status host and has no password gate and no import gate (the row's Kind, Gate and ImportGate), and for a path under a prefix the box's asset policy holds for the host (LocalAssets.For, the edges file writer's settled snapshot, no registry read per call). It only narrows: a gated or import-gated row is never caught, so a stored body is never served past a gate; no root decision registry:Gate@500,registry:ImportGate@523,registry:Kind@471,whole:Route@474,whole:Route@503,whole:Route@526 28239bf9ac0b258105fc3a2e0f83317de0f7a7e0d8d20c6d10ba7f221a33f186 |
| +@legacy 55814f51643679b533a90fd96a907bba5cc26070db71c11100f2fb9cce5b0622 internal/edge/assetcatch.go Edge.serveAssetFar legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 6): the far catch on a box with no route row for the host. It answers from this box's asset store, or fills over the backhaul from the home box under a signed fill assertion (carlos-asset-fill-v1) and stores only an acknowledged response. Its three sites are one synthetic row, registry.Route{Host, Account, App, Kind: instance}, built from the request host and the owner the home box's edges file publishes, passed to the usage meter and to the account throttle (planThrottleAdmit), so a far delivery is metered and throttled under the published owner (drift D8). No registry row is read; nothing local is dialled; no root decision whole:Route@606,whole:Route@773,whole:Route@780 7738feabf89c4011f68b81bf9c0911966f6ae5dd6d2fb576225fd4b8fb64b49c |
| +internal/edge/assetcatch.go Edge.serveAssetFar legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 6): the far catch on a box with no route row for the host. It answers from this box's asset store, or fills over the backhaul from the home box under a signed fill assertion (carlos-asset-fill-v1) and stores only an acknowledged response. Its three sites are one synthetic row, registry.Route{Host, Account, App, Kind: instance}, built from the request host and the owner the home box's edges file publishes, passed to the usage meter and to the account throttle (planThrottleAdmit), so a far delivery is metered and throttled under the published owner (drift D8). No registry row is read; nothing local is dialled; no root decision whole:Route@606,whole:Route@773,whole:Route@780 7738feabf89c4011f68b81bf9c0911966f6ae5dd6d2fb576225fd4b8fb64b49c |
| +@legacy 1bcd359efae7855c83eccbd930d1fa9499f59b834e5a8dfc069e6aca3813a324 internal/edge/assetcatch.go assetUpstreamMatches legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5, drift D4): a pure comparison. The policy's decision for a host must name the same primary host, account (release.RouteAccount of the row), app and asset generation as the route row the edge serves it with; otherwise the request is answered uncached and a far fill gets no acknowledgement. Reads only the row already resolved; only refuses; no root decision registry:App@175,registry:AssetGen@217,registry:Host@100,whole:Route@103,whole:Route@156,whole:Route@178,whole:Route@220 5393231e6d325105ce34e5312f7e2fb5eafdd578d097f1e67a7ecf4347073a15 |
| +internal/edge/assetcatch.go assetUpstreamMatches legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 5, drift D4): a pure comparison. The policy's decision for a host must name the same primary host, account (release.RouteAccount of the row), app and asset generation as the route row the edge serves it with; otherwise the request is answered uncached and a far fill gets no acknowledgement. Reads only the row already resolved; only refuses; no root decision registry:App@175,registry:AssetGen@217,registry:Host@100,whole:Route@103,whole:Route@156,whole:Route@178,whole:Route@220 5393231e6d325105ce34e5312f7e2fb5eafdd578d097f1e67a7ecf4347073a15 |
| +@legacy fefb2f4b6c58ad1d1ecbed6efdab50728da425d93e57e78833fa7cedf8978dd0 internal/edge/assetserve.go serveAssetEntry legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 4): answers a request from a stored entry with http.ServeContent semantics (304, one range, the gzip copy when asked for). Its one site is Entry.Open (internal/assetcache, accepted legacy, census-ruling-edge-asset-cache-2), which opens the entry's body or gzip copy under $CARLOS_DATA_DIR/asset-cache by a name the store derives from its own entry id, never from the request. Read only; no root decision file:Open@259 11e93878d98058bb65a9eda26cfed12f1beec6bc05d6e1fdda77db6240eb4a42 |
| +internal/edge/assetserve.go serveAssetEntry legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 4): answers a request from a stored entry with http.ServeContent semantics (304, one range, the gzip copy when asked for). Its one site is Entry.Open (internal/assetcache, accepted legacy, census-ruling-edge-asset-cache-2), which opens the entry's body or gzip copy under $CARLOS_DATA_DIR/asset-cache by a name the store derives from its own entry id, never from the request. Read only; no root decision file:Open@259 11e93878d98058bb65a9eda26cfed12f1beec6bc05d6e1fdda77db6240eb4a42 |
| +@legacy 65dbc8c21a7c5a7d47d4eefc70a885c74803b7dee4c775bce045e63f4c02ac99 internal/host/assetarm.go armEdgeAssetCache legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 7): the agent's ready hook arming, only with CARLOS_ASSET_CACHE=1 and a policy. It measures the data filesystem through the FS it is handed (fs.Space(dataDir); assetcache.Statfs in production) for the budget (CARLOS_ASSET_CACHE_MAX, else the smaller of 4 GiB and a tenth of the filesystem), opens the store at $CARLOS_DATA_DIR/asset-cache, a fixed name under the agent's own data dir (assetcache.Open, accepted legacy, census-ruling-edge-asset-cache-2), hands the store and the policy to the edge (EnableAssetCache), and only then opens the policy's publication gate. Any error is logged and leaves the box unarmed, publishing nothing; no root decision file:Open@488 86963e0b56f51bf38de003a093075da21eb978eeaf81ea3a2a1a48b6d771e78e |
| +internal/host/assetarm.go armEdgeAssetCache legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (asset cache plan 3 Task 7): the agent's ready hook arming, only with CARLOS_ASSET_CACHE=1 and a policy. It measures the data filesystem through the FS it is handed (fs.Space(dataDir); assetcache.Statfs in production) for the budget (CARLOS_ASSET_CACHE_MAX, else the smaller of 4 GiB and a tenth of the filesystem), opens the store at $CARLOS_DATA_DIR/asset-cache, a fixed name under the agent's own data dir (assetcache.Open, accepted legacy, census-ruling-edge-asset-cache-2), hands the store and the policy to the edge (EnableAssetCache), and only then opens the policy's publication gate. Any error is logged and leaves the box unarmed, publishing nothing; no root decision file:Open@488 86963e0b56f51bf38de003a093075da21eb978eeaf81ea3a2a1a48b6d771e78e |
| +# RE-FROZEN with a new kind of read, file:Statfs: runAgent keeps its authority (B,C,D,F). The new site is the function value assetcache.Statfs passed to armEdgeAssetCache as the store's filesystem, not a call in runAgent; armEdgeAssetCache measures $CARLOS_DATA_DIR through it (assetcache's var Statfs and statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). |
| +internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-edge-asset-cache-3;basis=main's body as of the merge of origin/main a912a342 plus the edge asset cache's wiring (plan 3 Task 7, drift D12): builds the box's one asset policy before either goroutine starts (armAssetPolicy, nil unless CARLOS_ASSET_CACHE=1, with no manifest cache yet: the edges file loop binds its own) and hands it with the lifetimes switch to edgesFileLoop, and in the edge's ready hook calls armEdgeAssetCache(os.Getenv, dataDir(), assetcache.Statfs, the policy, e.EnableAssetCache); the one new site, file:Statfs, is that function value passed as the store's filesystem, not a call here: armEdgeAssetCache measures $CARLOS_DATA_DIR through it for the store's budget; other read sites unchanged, offsets moved; B,C,D,F authority retained; no record, release or claim read added file:Exec@14991,file:Open@1150,file:Statfs@39921,registry:App@10484,whole:Route@10476,whole:Route@24926 b00fcd0d178635dfc760dbef4044620710ff6a5433f9cedb5770e21decc5d82f |
diff --git a/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3.tsv b/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3.tsv| new file mode 100644 |
| index 000000000..d183956ce |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-edge-asset-cache-3.tsv |
| @@ -0,0 +1,15 @@ |
| +# Census overlay edge-asset-cache-3, written by census-propose (#369). census-ruling-edge-asset-cache-3, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-edge-asset-cache-3.md. |
| +# 4 body, 1 sites, 5 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@legacy 3ec2939ac0000492d6d392a6998d66453b3ac92b3c572c2fe4a9b44dcc1ba155 internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added whole:Route@106,whole:Route@293 c518c13f4d87362d61940a54b51542aeccc9913c16e086efdf55088595ae1f33 |
| +@legacy 30b23ea2c27b7cd3265fb69acff01718a42f0f0ca5e6358d2e39145b4fad46eb internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added registry:Gate@17527,registry:Gate@17587,registry:Gate@17645,registry:Host@17630,registry:ImportGate@22425,registry:Kind@13190,registry:Kind@15660,registry:Kind@22396,whole:Route@10998,whole:Route@11210,whole:Route@11402,whole:Route@13193,whole:Route@14496,whole:Route@14591,whole:Route@14667,whole:Route@14711,whole:Route@15663,whole:Route@17530,whole:Route@17590,whole:Route@17633,whole:Route@17648,whole:Route@19281,whole:Route@22399,whole:Route@22428,whole:Route@24260 c8fd474cba1834352e2cc8ed33565b8ec0a6c327fcd98af58f0be03df728204e |
| +@legacy 0cd4f3b910d1cec8aba707a265850a315e19608e909422b373306493761dc2e0 internal/host/edgesfile.go edgesFileLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body, which also takes the box's lifetimes switch (runAgent's boxJudge != nil) and hands it to every edgesFileWriteClaims pass; read site unchanged, offset moved; a report, not a decision; self-serve moves 1 Task 8;rev3=census-ruling-edge-asset-cache-3;basis=takes the box's one asset policy from runAgent (drift D12) instead of building it from the serving-build hook, binds this loop's manifest cache to it before the first pass (bindManifests), and each tick works with assets.active(), nil until the ready hook has opened the asset store, for the change key, the rewrite-due check and the edgesFileWriteClaims pass; the lifetimes switch is handed on as before; read site unchanged (1); no read added file:Read@3085 7b728dc9dfea9a81c46046bd0b26e8be6260185fc118019ce7cc7dd549c110ec |
| +internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added whole:Route@106,whole:Route@293 c518c13f4d87362d61940a54b51542aeccc9913c16e086efdf55088595ae1f33 |
| +internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added registry:Gate@17527,registry:Gate@17587,registry:Gate@17645,registry:Host@17630,registry:ImportGate@22425,registry:Kind@13190,registry:Kind@15660,registry:Kind@22396,whole:Route@10998,whole:Route@11210,whole:Route@11402,whole:Route@13193,whole:Route@14496,whole:Route@14591,whole:Route@14667,whole:Route@14711,whole:Route@15663,whole:Route@17530,whole:Route@17590,whole:Route@17633,whole:Route@17648,whole:Route@19281,whole:Route@22399,whole:Route@22428,whole:Route@24260 c8fd474cba1834352e2cc8ed33565b8ec0a6c327fcd98af58f0be03df728204e |
| +internal/host/edgesfile.go edgesFileLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body, which also takes the box's lifetimes switch (runAgent's boxJudge != nil) and hands it to every edgesFileWriteClaims pass; read site unchanged, offset moved; a report, not a decision; self-serve moves 1 Task 8;rev3=census-ruling-edge-asset-cache-3;basis=takes the box's one asset policy from runAgent (drift D12) instead of building it from the serving-build hook, binds this loop's manifest cache to it before the first pass (bindManifests), and each tick works with assets.active(), nil until the ready hook has opened the asset store, for the change key, the rewrite-due check and the edgesFileWriteClaims pass; the lifetimes switch is handed on as before; read site unchanged (1); no read added file:Read@3085 7b728dc9dfea9a81c46046bd0b26e8be6260185fc118019ce7cc7dd549c110ec |
| +internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added registry:Account@12023,registry:Alias@5971,registry:Alias@6006,registry:Alias@6428,registry:Alias@6585,registry:Alias@6655,registry:Alias@6687,registry:Alias@7360,registry:Alias@9715,registry:App@12035,registry:DNSStatus@6103,registry:DNSStatus@6594,registry:Host@11453,registry:Host@3555,registry:Host@6063,registry:Host@6908,registry:Host@7344,registry:Host@7517,registry:Host@9762,registry:Host@9809,registry:Host@9859,registry:Host@9894,registry:Host@9943,registry:Incarnation@3515,registry:Platform@3294,registry:Provisioned@3308,registry:Replica@3332,registry:ServingSeq@3530,registry:Status@1261,whole:Route@13146,whole:Route@13572,whole:Route@13747,whole:Route@3809,whole:Route@4179,whole:Route@707,whole:Route@735,whole:RouteAlias@13168,whole:RouteAlias@13762,whole:RouteAlias@5956,whole:RouteAlias@9668,whole:RoutePath@13161,whole:RoutePath@13755,whole:RoutePath@4194,whole:WildcardDomain@9848 59474c6ca4f61d797958af47a3afa5513167edc5bf8d4b8b82b9b0dbc4d6727c |
| +internal/host/assetpolicy.go assetPolicy.decide authority F,J1 root-route;kept=F;scope=protected-decision-only;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): the asset publication rule for one hostname over rows already read: the row's status, assets_off, asset_gen, gate, import_gate, pool, version and host, the path rows, the owner (servedOwners) and the authority clock, then each build's asset folders from its release manifest in the deployment bucket (assetManifestCache.paths, release.GetManifest, which checks the manifest's content and that it names the app and version its key claims; it verifies no signature); the answer is an assets block in the edges file, which far edges (agents, as carlos) read to cache static files, and the home edge's own catch; it only withholds when any input is missing; no root pass calls it; no root decision;rev3=census-ruling-edge-asset-cache-3;basis=the decision now carries Primary: r.Host, the host of the row it was decided for (the host itself, or an alias's target), which the edges file publishes as the block's primary and the edge compares with its own route row (assetUpstreamMatches, drift D4); one more read of the Host field of a row it already reads (+registry:Host); no new kind of read registry:AssetGen@1927,registry:AssetGen@586,registry:AssetsOff@571,registry:Gate@606,registry:Host@1235,registry:Host@1956,registry:Host@884,registry:Host@947,registry:ImportGate@622,registry:Pool@1794,registry:Status@277,registry:Version@1201 ab16959cc30ec8e2ccdbb9dee349c8571c28677af866e4fd41e0118b18283fdc |
| +@coverage . 896af807bbeb8721a892fa40e05bc8157a8a283c008249624f395083e4d874b7 |
| +@coverage internal/console 2e57b2fd4ae5de63ae1bc8e7b36c0624b5d235c2c3a4bd94fdcd9a723445acdc |
| +@coverage internal/edge ae2282331a508d378f6cba94c36cd63165a5b568ff099c4e4ef2933e43c01157 |
| +@coverage internal/edgesfile ea0152ad8b89404f12f3bae5c45d0f4c3b3bfeec8fcd989be2b1982601d58b79 |
| +@coverage internal/host 7db7099bc34af5002105b34d04e29635653a5e16b0b7fe2948b669769ae048d4 |