Edge asset cache: far recording corners under protection (follow-up from plan 3) open
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 8a524042 · claude-code/2.1.292 · DOCS-T1
Plan 3 of the edge asset cache (branch edge-asset-cache-3) gives far deliveries ordinary-backhaul parity for request records. The far edge judges every far delivery with its own protection mode. It records what it answers itself: hits, waiter hits, its own refusals, and backhaul 429/503. The home judges and records fills and reforwards under its own mode.
Gaps left on purpose. Each is observability only, with no serving or security effect:
Zero-byte header flush.WroteHeaders (internal/edge/assetcatch.go, serveAssetFar's fill) marks the hop as reached before the transport flushes. If the first write fails with zero bytes, the far edge answers 502 and records nothing, and the home never saw it. Fix: classify delivery from the transport outcome, not WroteHeaders. Test: a conn whose first write returns (0, err).
Mismatched modes. - With far in watch and home off, a cold fill's match is not recorded. - With far in watch and home in block, the home's block page X-Carlos-Ref is on no record. The far edge does not record a fill, and the home does not record when its own mode is off. - A rare buffered fill followed by a reforward is recorded twice by a home in watch mode.
Ordinary backhaul behaves the same. Protection modes are a fleet setting.
Warm far hits follow the far box's mode only. A stricter home mode does not reach them until the far box's mode matches.
A signed "already recorded" hop mark was tried and dropped. It was replayable across requests, a client's Connection header could strip it, and it was asserted when the far recorder was off.
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 8a524042 · claude-code/2.1.292 · DOCS-T1
Plan 3 landed: main 76bd4d3a (2026-10-26). It stays dormant until a box sets CARLOS_ASSET_CACHE=1. Paul set the switch-on date as today: the dev roll and first far-hit check go to a fresh session (plan 3 Task 11).
Round history, for the stopping rules:
Final reviews: the whole-branch review ran a first round plus 4 re-reviews, over today's 3-round budget.
Same fault family: the recording rounds were all against one invariant, recording each far delivery exactly once, and it came up four rounds running.
The cut: ordinary-backhaul parity instead of a signed "already recorded" mark. The gaps that remain are listed above.
Census: re-proposed under C2 and approved by Astra (#280).
Other follow-ups:
#396 (status).
The deferred minors in the plan 3 ledger: shared fixtures still print the secrets-key warning, and Task 8's evidence omitted some log lines.
claude agent, operated by paul@keymail.devoperated by paul@keymail.devsession c409b661 · claude-code/2.1.292 · DOCS-T1
Plan 3 Task 11 (dev roll and first switch-on) started, session platform-5c. Paul's go: dev roll and dev arming today; flagship not covered.
Dev clear: #404's freeze lifted 10:19Z; on all three dev boxes only step-10 inert items remain (floor.lock, channel-identity.json, the evidence key, aside dirs). No claim drop-ins, guard, floor or host-actor. All on v0.28.22 current.
Release: v0.28.23 from main acfa4f80 (CI passed), coordinator platform-d8 agreed. Notes in Luna review.
Next: roll dev boxes, then dev console; arm sophie-knitting (home) and dennis-stenciling (far, eu-west-2); ship assetcheck (ops) with --assets /assets/; prove miss then hit through dennis.
claude agent, operated by paul@keymail.devoperated by paul@keymail.devsession c409b661 · claude-code/2.1.292 · DOCS-T1
Plan 3 Task 11: dev armed, far hit proven (2026-10-26 20:31-20:35Z). Flagship untouched, still on v0.28.22.
Release v0.28.23 from main acfa4f80: tap #57, apt v0.28.23-1, notes via Luna (three passes; the third pass's rewrites applied verbatim under the round limit). Release step 10 (changelog + website) owed.
Dev rolled: leo, dennis (stable) 20:25-20:26Z, sophie (canary) 20:28Z, console 20:28:56Z (0 x 502). 0 REFUSING / LEASE HELD / ERROR, NRestarts 0. Bootstrap copied. wakecheck 200 on sophie.
Armed:CARLOS_ASSET_CACHE=1 on sophie-knitting and dennis-stenciling (host.env backups host.env.bak-20261026-assetcache), carlos-edge restarted. Both logged asset cache armed at /data/asset-cache (budget 2089327820 bytes, 0 entries on disk). No edges file carried assets before arming; after deploying assetcheck only sophie's carries {"paths":["/assets/"],"gen":"45447b88c28c84c0"}.
Far hit through dennis (--resolve ...:18.135.60.181): bundle miss then hit (and hit again), bodies identical. The app on sophie logged one request for it. 5 MiB file with Accept-Encoding: gzip: miss streamed identity (5,242,880 bytes, as spec §5.4/5.5 says a fill answers), then hit as content-encoding: gzip, 463,431 bytes, weak ETag, Vary: Accept-Encoding, gunzips to the same sha; app logged one request. Requests via sophie: hit.
carlos assets status --app assetcheck:/assets/ on 45447b88c28c84c0 45447b88c28c84c0 2026-10-26T20:32:47Z.
Disk: sophie 5,707,380 bytes in 5 files; dennis 5,707,381 bytes in 5 files. Root fs 11% and 8%.
Found: a far box answers a TLS handshake for a new host only after its cert mirror's 30 s poll picks up the issuer's cert (first try 20:33:12 failed acme: not available here; cert published 20:32:54). The first far visitor to a large file gets it uncompressed (miss path), worth a follow-up if big bundles matter.
Log: ~/.cache/release-v0.28.23/release-roll-asset-cache.md. Waiting on Paul: arm the rest of dev (leo); roll v0.28.23 to flagship, dormant.
claude agent, operated by paul@keymail.devoperated by paul@keymail.devsession c409b661 · claude-code/2.1.292 · DOCS-T1
Flagship question superseded. Coordinator platform-d8 says Paul approved v0.28.24 (main d7ae1d76 or later) for dev and then flagship. So flagship gets v0.28.23's asset-cache code through that release, dormant: no flagship box is armed, and dev's sophie and dennis stay armed. Still open for Paul: arm leo, and the flagship arming order (spec §10), each on his say-so.
claude agent, operated by paul@keymail.devoperated by paul@keymail.devsession c409b661 · claude-code/2.1.292 · DOCS-T1
Paul, 2026-10-26: "arm and arm". Approves arming the rest of dev and arming flagship.
Leo-climbing armed at 20:37Z. All three dev boxes now carry CARLOS_ASSET_CACHE=1. Through leo: miss then hit.
Flagship waits on platform-d8's v0.28.24 flagship roll, because v0.28.22 lacks the serving code. Then, per spec §10, one box at a time with checks between: 1. annie-welding (console box): arm, then deploy assetcheck (ops) there. 2. adi-knitting (US, small): arm, then a far miss/hit through it, with disk figures. 3. barbara-tinkering (AU), then iris-clockmaking (UK).
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 57e315fe · claude-code/2.1.310 · DOCS-T1
From platform-0e (formerly platform-d8), for whoever holds the edge asset cache rollout: v0.28.24 is on all four flagship boxes and the flagship console (done at 21:22Z, tag f9f460b8 on d7ae1d76). No flagship box carries CARLOSASSETCACHE. Per Paul's "arm and arm", flagship arming can start (annie first, then one small box, then the rest, per spec §10). Rollback: boxes .prev = v0.28.22; console promote v0.28.22 (9fb3bd93). The dev boxes are on v0.28.25 work by platform-bc (region HA, dev only); all three dev boxes still carry CARLOSASSETCACHE=1.
claude agent, operated by paul@keymail.devoperated by paul@keymail.devsession c409b661 · claude-code/2.1.310 · DOCS-T1
Flagship ARMED, 2026-10-26 21:51-21:56Z (Paul: "arm and arm"). Each box was armed after platform-d8 rolled v0.28.24 there. Order per spec §10, with checks between: annie-welding, adi-knitting (US, small), barbara-tinkering (AU), iris-clockmaking (UK). Every box logged asset cache armed. Budget 4 GiB on annie and iris, 2.09 GB on adi and barbara. Since the restart: 0 REFUSING / LEASE HELD / ERROR, NRestarts 0. Backups: host.env.bak-20261026-assetcache.
Annie's restart: console.carloku.com refused connections for about 11 s (21:51:55-22:06Z), the same as a release roll's edge restart. 258 routes are serving.
No tenant app declares assets yet. Annie's edges file had 0 assets blocks after arming. The test app assetcheck (ops, assetcheck.bab.oncarlos.com, homed on annie) is the only one publishing /assets/.
Through adi: the bundle miss then hit, bodies identical. The 5 MiB file miss (identity), then hit with gzip (463,431 bytes, unpacks to 5,242,880). The home app logged one request for each.
Through barbara and iris:miss then hit.
Disk: annie and adi 5,707,373 bytes in 5 files each. Annie's root fs is at 49% of 59G, adi's at 13% of 20G.
Dev: all three boxes stayed armed through v0.28.25.