plan: edge page cache slice 1 rev 4 after Astra plan round 3
Round 3 findings unedited; applies Astra's fixes: both env layers and launch-captured inputs, departure from the registry snapshot, exported wiring, shared scrub list everywhere, manifests publication, throttle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+227
−63
docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md+123 −63docs/superpowers/plans/CODEX-FINDINGS-PAGE-CACHE-PLAN1-R3.md+104 −0
CI passed — run details
diff --git a/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md b/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md| index 7d9892730..669c39d79 100644 |
| --- a/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md |
| +++ b/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md |
| @@ -17,7 +17,10 @@ Stopping rule 2 fired after round 2 in two families. Paul chose, on |
| scrub iterates one vocabulary list, and a guard test checks each |
| scrub against every entry. |
| -Round 3 is the last in the plan's budget. |
| +Round 3 (`CODEX-FINDINGS-PAGE-CACHE-PLAN1-R3.md`) found 4 P1s and 5 P2s, |
| +all concrete fit-with-code fixes. Rev 4 applies Astra's own fixes; marks |
| +like **(R3-n)** point at them. The plan's review budget is spent: building |
| +waits on Paul's go. |
| **Goal:** An app marks a response with `Carlos-Page-Cache: on`, and its |
| home box keeps the page on disk and serves it without waking the app, |
| @@ -115,6 +118,9 @@ repo root. |
| - **The route:** `Kind == "instance"`, not `IsForward()`, not `HA`, not |
| `IsSidecar()`, `Backing != registry.BackingUnit`, `Status == "ready"`, |
| `Gate == ""`, `ImportGate == ""`, `!PagesOff`. |
| +- **The account (R3-9):** no plan throttle is active for it. The edge's |
| + installed throttle hook says so (`e.planThrottle`, `planthrottle.go:22`), |
| + whether or not this request passed `planThrottleAdmit`. |
| - **No path rows (P1-6):** neither the requested hostname's own entry in |
| `e.current()` nor its primary has path rows. The request was not |
| dispatched by path to another instance. |
| @@ -481,7 +487,9 @@ func (x *Index) Scopes() []Scope |
| iterate it; |
| - `scrubBackhaulResponse` keeps only the entries its `assetFill` |
| argument names (the ack and expiry headers), by an explicit keep set |
| - rather than a list of its own. |
| + rather than a list of its own; |
| + - `stripAssetFillVocabulary` (:1349) iterates the list too, with an |
| + explicit keep set of `{assetCacheHeader}` (R3-5). |
| - Modify: |
| - `internal/edge/cookiescope.go:85`: in `responseModifier`, call |
| `takePageMark(resp)` before the scrub; |
| @@ -518,8 +526,9 @@ const pageCacheHeader = "Carlos-Page-Cache" |
| 1xx; |
| - run the scrub, and assert it's gone. `scrubBackhaulResponse` with |
| `assetFill=true` may keep only the ack and expiry headers. |
| - - **The table of scrub functions** is listed in the test. A comment |
| - says a new client-boundary scrub must be added to it. |
| + - **The table of scrub functions** is listed in the test, including |
| + `stripAssetFillVocabulary` (which may keep only `Carlos-Cache`). A |
| + comment says a new client-boundary scrub must be added to it. |
| - `TestPageMarkStrippedFinalHeader`: on an edge with no page index, |
| the visitor never sees the marker. |
| - `TestPageMarkStrippedThroughBackhaul` (R2-4): a mock older home |
| @@ -562,39 +571,62 @@ R2-2, R2-3). |
| **Interfaces:** |
| - Produces: |
| ```go |
| -// in internal/activator: |
| -func CurrentInputs(rt registry.Route, configFiles func(registry.Route) []string) (string, bool) |
| -// hex sha256 over rt.Version and each config file's path and bytes, in |
| -// a stable order; false when a file cannot be read. A missing file is |
| -// fingerprinted as absent, which is a valid state. |
| -func (b *ExecBackend) configFilesFor(rt registry.Route) []string |
| -// exactly the env files the spawn reads (readEnvFile at backend_exec.go:2421 |
| -// and the sidecar env at :3355), so both sides fingerprint the same set |
| -// in internal/edge: |
| -func (c *Cache) NoteProcessInputs(host, inputs string) // the current process's launch inputs |
| -func (c *Cache) ProcessInputs(host string) (string, bool) // false until noted in this agent process |
| -func (c *Cache) SetCurrentInputs(f func(registry.Route) (string, bool)) // the host wires CurrentInputs here |
| +// in internal/activator. One encoding, used by both sides (R3-2): |
| +func inputsFingerprint(build string, env map[string]string) string |
| +// hex sha256 over the build and env in sorted key order |
| +// |
| +// The current side, exported for the host wiring (R3-4). It reads the |
| +// instance's two web env layers exactly as a spawn does, |
| +// b.instanceEnvParts(rt) then mergeEnv: paths.configEnv (the delivered |
| +// <host>.config.env) and paths.envFile (R3-1). A missing file is a valid, |
| +// empty layer. An unreadable file means false. |
| +func (b *ExecBackend) CurrentInputs(rt registry.Route) (string, bool) |
| +// |
| +// The launch side, never a re-read: the fingerprint of the env map the |
| +// spawn actually hands to exec (the fileEnv from launchEnvLayer at |
| +// backend_exec.go:2392, before the platform's own CARLOS_* variables are |
| +// added) and the build actually executed. That is g.Build for a staged |
| +// generation (genbackend.go:274), else the version the spawn resolved. |
| +// The value is computed once at launch and carried, immutable, to the |
| +// point the process becomes current (R3-2). |
| +func launchInputs(build string, fileEnv map[string]string) string // = inputsFingerprint(build, fileEnv) |
| +// in internal/edge, all exported: |
| +func (c *Cache) NoteProcessInputs(host, inputs string) |
| +func (c *Cache) ProcessInputs(host string) (string, bool) |
| +func (c *Cache) SetCurrentInputs(f func(registry.Route) (string, bool)) |
| func (c *Cache) CurrentInputs(rt registry.Route) (string, bool) |
| ``` |
| **The rules:** |
| -- **The fingerprint cache:** `CurrentInputs` is called on every page |
| - lookup. It caches each file's fingerprint by (path, size, mtime, |
| - inode) and re-hashes only when those change. A lookup costs one |
| - `stat` per config file. |
| +- **The current side's cost:** `CurrentInputs` is called on every page |
| + lookup. It caches per route on the (path, size, mtime, inode) of both |
| + env files, and re-reads and re-merges only when one changes. The |
| + build is `rt.Version`. |
| +- **Mismatches are safe:** |
| + - a process running a build other than `rt.Version` publishes inputs |
| + that never equal the current ones, so it never stores; |
| + - so does a process launched from config bytes that have since |
| + changed. |
| - **Unit-backed routes** never reach these. `pageRouteEligible` refuses |
| them (Task 7). |
| -- **The two sides must agree:** the inputs a process launches from are |
| - computed by `CurrentInputs` over the same files, read at launch. |
| - [ ] **Step 1: Write failing tests** |
| - **The function:** |
| - `TestCurrentInputsStable`: the same version and files give the |
| same value, twice. |
| - - `TestCurrentInputsChanges`: a version change, a file edit, and a |
| - file removal each give a new value. |
| + - `TestCurrentInputsChanges`: a version change gives a new value. |
| + So does each of these, through the real config delivery |
| + (`appconfig.SyncExec` writing `paths.configEnv`, R3-1): an edit, a |
| + removal, and an edit to `paths.envFile`. |
| - `TestCurrentInputsStatCache`: an unchanged stat doesn't read the |
| file again (count reads with a seam). |
| + - `TestLaunchInputsUseCapturedEnv` (R3-2): replace the config file |
| + between the spawn's env capture and exec (a seam in the spawn). |
| + The published inputs are the captured bytes' fingerprint, so they |
| + differ from `CurrentInputs` afterwards. |
| + - `TestRetainedBuildNeverMatches` (R3-2): a generation whose |
| + `g.Build` differs from `rt.Version` publishes inputs that don't |
| + equal `CurrentInputs`. |
| - **Through the real exec backend:** |
| - `TestNonStagedSpawnPublishesInputs`: a fresh spawn publishes |
| inputs equal to `CurrentInputs` at launch. |
| @@ -654,6 +686,10 @@ func (p *assetPolicy) WantDeclarations(acct, app, build string) // queue a backg |
| - **On requests:** `DeclaresPrefix` reads only |
| `p.manifests.cached(acct, app, build)`, with `build = route.Version`, |
| whatever `AssetsOff` says. It never reads storage on a request. |
| +- **Publication (R3-6):** `p.manifests` becomes an |
| + `atomic.Pointer[assetManifestCache]`, stored by `bindManifests` |
| + (`assetpolicy.go:179`). `DeclaresPrefix` returns `known=false` while |
| + it is nil. |
| - **When the cache has no entry:** it returns `known=false` and calls |
| `WantDeclarations`. That queues a background `p.manifests.paths` read |
| on the policy's own schedule, deduplicated and bounded. |
| @@ -688,9 +724,10 @@ func (p *assetPolicy) WantDeclarations(acct, app, build string) // queue a backg |
| `inputs`; |
| - otherwise `MarkOptIn` (durable), then `Finish`. Its meta uses |
| `assetStoredHeader`, `Lifetime`, and `Expires = now + lifetime`. |
| -4. **The diagnostic writer (R2-6)** wraps every proxied response of a |
| - `Kind == "instance"` route on an armed box, independent of |
| - eligibility and inputs. At WriteHeader it sets `Carlos-Cache` when the |
| +4. **The diagnostic writer (R2-6, R3-7)** wraps every proxied response |
| + of a `Kind == "instance"` route on every box, armed or not, |
| + independent of eligibility and inputs. On an unarmed box only the |
| + marker can trigger it, and the value is always `bypass`. At WriteHeader it sets `Carlos-Cache` when the |
| instance is opted in or the holder says `Marked`: |
| - `miss` when step 3 recorded; |
| - `bypass` otherwise. |
| @@ -747,45 +784,34 @@ func (p *assetPolicy) WantDeclarations(acct, app, build string) // queue a backg |
| - a marked GET with unknown inputs → `bypass`; |
| - a HEAD miss → `bypass`; |
| - an opted-in instance made temporarily ineligible → `bypass`; |
| + - a marked GET and a marked POST on an unarmed box → `bypass` (R3-7); |
| - an unrelated app → no header. |
| + - **The account throttle:** `TestPageThrottledAccountBypasses` (R3-9). |
| + The throttle hook reports an active throttle and a token lets the |
| + request through `planThrottleAdmit`. The marked response is `bypass` |
| + and isn't stored, and an existing entry isn't served. |
| + - **Declarations under a race:** |
| + `TestDeclaresPrefixBeforeBindIsUnknown` (R3-6). Requests run |
| + concurrently with a delayed `bindManifests` under `-race`. Before the |
| + bind they get `known=false`, with no panic. |
| - **Ineligible routes:** `TestPageIneligibleRoutes`, the table from |
| rev 1 plus unit-backed. |
| - **Host side:** `TestDeclaresPrefixIgnoresAssetsOff`. |
| -- [ ] **Step 2: Write `TestEdgeSimulationNoPersonalLeak` (I2; |
| - R2-7).** |
| - - **The setup:** a fake app whose every body names the request's |
| - provenance (a request id, plus whether it carried `Cookie` or |
| - `Authorization`). |
| - - **The run:** 1000 random requests (200 under `-short`) over 2 |
| - instances and 4 paths, mixing: |
| - - anonymous requests, requests with ignorable cookies, requests with |
| - session cookies, and requests with `Authorization`; |
| - - marked and unmarked `s-maxage` responses; |
| - - LRU entries stored before opt-in; |
| - - opt-in transitions; |
| - - gate add and remove reloads; |
| - - clears. |
| - - **The assertion:** whenever a response comes from either cache (no |
| - app call for that request), its body's provenance is anonymous. The |
| - one exception is a request carrying only ignorable cookies, which |
| - may get an anonymous body. |
| - - **Seeding:** the seed is printed on failure. |
| -- [ ] **Step 3: Run them to see them fail:** `go test ./internal/edge |
| - -run 'TestPage|TestOptedIn|TestEdgeSimulation' -count=1` (with the |
| +- [ ] **Step 2: Run them to see them fail:** `go test ./internal/edge |
| + -run 'TestPage|TestOptedIn' -count=1` (with the |
| task-owned `TMPDIR`), and `go test ./internal/host -run DeclaresPrefix |
| -count=1`. |
| -- [ ] **Step 4: Implement as above.** |
| -- [ ] **Step 5: Watch each guard fail under its own mutation,** then |
| +- [ ] **Step 3: Implement as above.** |
| +- [ ] **Step 4: Watch each guard fail under its own mutation,** then |
| restore: |
| - - drop `maybeStore`'s marked refusal → the simulation or |
| - `TestMarkedResponseNeverEntersLRU` fails; |
| - - drop the opted-in LRU gate → the simulation or |
| - `TestOptedInInstanceSkipsLRU` fails; |
| + - drop `maybeStore`'s marked refusal → `TestMarkedResponseNeverEntersLRU` |
| + fails; |
| + - drop the opted-in LRU gate → `TestOptedInInstanceSkipsLRU` fails; |
| - drop the inputs check in Lookup → `TestPageSleepingNewBuildMisses` |
| fails. |
| -- [ ] **Step 6: Run them to see them pass,** then `-run |
| +- [ ] **Step 5: Run them to see them pass,** then `-run |
| 'Cache|Asset|Purge'` for the neighbours. |
| -- [ ] **Step 7: Commit:** `edge: home-box page cache at the LRU point`. |
| +- [ ] **Step 6: Commit:** `edge: home-box page cache at the LRU point`. |
| ### Task 8: Clears reach the index (header, socket and `all`) |
| @@ -845,9 +871,13 @@ pages. |
| `EnablePageCache` through `OnReload` (`edge.go:1479`). |
| - Test: `internal/edge/pagecache_reload_test.go`. |
| -**Behaviour (P1-5).** The hook compares `idx.Scopes()` with |
| -`e.current()`: |
| -- **The route is gone from this box:** `Reset` and `ClearOptIn`. |
| +**Behaviour (P1-5, R3-3).** The hook compares `idx.Scopes()` with the |
| +**complete registry route snapshot**: every row Reload read, before it |
| +filtered out sidecars and rows that aren't ready (`edge.go:956`). Reload |
| +keeps that snapshot for the hook. Absence from `e.current()` alone |
| +never counts as departure. |
| +- **The route is gone from this box** (no row for the instance host, or |
| + its account or app changed): `Reset` and `ClearOptIn`. |
| - **`PagesOff` is set:** `Reset` and `ClearOptIn`. |
| - **Ineligible for any other reason** (HA, forward, a gate, an import |
| gate, a sidecar, a status that isn't ready): `Reset` only. The mark |
| @@ -866,6 +896,34 @@ invariant covers them, checked on every lookup and store. |
| - remove the gate → same; |
| - pages miss after the reset. |
| - `TestHAFlipKeepsMark`: the same, with `HA` set and then cleared. |
| + - `TestNotReadyAndBackKeepsMark` (R3-3): seed a personalised LRU entry |
| + before opt-in, then opt in. Change the route's status from ready to |
| + something else and back, reloading each time. The mark survives, and |
| + the seeded URL still reaches the app. |
| +- [ ] **Step 1b: Write `TestEdgeSimulationNoPersonalLeak` (I2; R2-7, |
| + R3-8).** It lives here, because it needs the reload behaviour above. |
| + - **The setup:** a fake app whose every body names the request's |
| + provenance (a request id, plus whether it carried `Cookie` or |
| + `Authorization`). |
| + - **The run:** 1000 random requests (200 under `-short`) over 2 |
| + instances and 4 paths, mixing: |
| + - anonymous requests, requests with ignorable cookies, requests with |
| + session cookies, and requests with `Authorization`; |
| + - marked and unmarked `s-maxage` responses; |
| + - personalised LRU entries stored before opt-in (adversarial |
| + fixtures); |
| + - opt-in transitions; |
| + - gate, status and HA reloads; |
| + - clears. |
| + - **The oracle** tracks each instance's opt-in state. It asserts: |
| + - every page-cache hit has anonymous provenance (an |
| + ignorable-cookie request may get an anonymous body); |
| + - while an instance is opted in, no response comes from the LRU at |
| + all; |
| + - before opt-in, LRU behaviour is today's, and the oracle doesn't |
| + judge it. |
| + - **Seeding:** the seed is printed on failure. |
| + - **Mutation:** dropping the opted-in LRU gate makes it fail. |
| - [ ] **Step 2: Run them to see them fail.** |
| - [ ] **Step 3: Implement as above.** |
| - [ ] **Step 4: Run them to see them pass.** |
| @@ -893,10 +951,12 @@ func armEdgePageCache(getenv func(string) string, dataDir string, store *assetca |
| - **Declarations:** the asset policy's `DeclaresPrefix` reaches the edge |
| through the same `LocalAssets` value already passed to |
| `EnableAssetCache`. |
| -- **Current inputs:** the host wires `e.cache.SetCurrentInputs` to |
| - `activator.CurrentInputs` with the exec backend's `configFilesFor`, at |
| - the point the activator and the cache are both built |
| - (`agent.go:334`). |
| +- **Current inputs (R3-4):** the host calls |
| + `cache.SetCurrentInputs(execBackend.CurrentInputs)`. `cache` is the |
| + host-local `*edge.Cache` built at `agent.go:334` and shared with the |
| + activator. `execBackend` is the `*activator.ExecBackend` the agent |
| + builds beside it, and its exported method matches `func(registry.Route) |
| + (string, bool)`. |
| - **The sweep:** `EnablePageCache` registers `idx.Sweep` on the asset |
| sweep's tick (`assetSweepEvery`). |
diff --git a/docs/superpowers/plans/CODEX-FINDINGS-PAGE-CACHE-PLAN1-R3.md b/docs/superpowers/plans/CODEX-FINDINGS-PAGE-CACHE-PLAN1-R3.md| new file mode 100644 |
| index 000000000..f4b844654 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/CODEX-FINDINGS-PAGE-CACHE-PLAN1-R3.md |
| @@ -0,0 +1,104 @@ |
| +- **R2-1 — Partly resolved:** lookup-time inputs cover sleeping releases, but the prescribed file list misses delivered config. |
| +- **R2-2 — Partly resolved:** publication moves to the switch, but launch fingerprints can still describe inputs the process never consumed. |
| +- **R2-3 — Resolved:** unit-backed instances are explicitly refused. |
| +- **R2-4 — Resolved:** final backhaul stripping now includes the marker. |
| +- **R2-5 — Resolved:** declaration loading is independent of asset eligibility and runs in the background. |
| +- **R2-6 — Partly resolved:** diagnostics cover more requests, but still omit unarmed boxes. |
| +- **R2-7 — Partly resolved:** randomized I2 coverage is specified, but its assertion also rejects intentionally unchanged pre-opt-in behavior. |
| +- **R2-8 — Resolved:** index records are reconciled against store eviction. |
| + |
| +Reviewed `design-edge-page-cache` at `4c5c988fca7e8a2b1c672894ba9901c1325facdb`. No files changed, subagents spawned, or tests run. |
| + |
| +1. **P1 — Task 6: The prescribed config-file list omits the delivered configuration.** |
| + |
| + **Evidence:** [Plan:570](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:570) identifies `backend_exec.go:2421` and `:3355` as the spawn’s environment reads. Those read the admin-token file and sidecar environment. The web process consumes both `paths.configEnv` and `paths.envFile` through [instanceEnvParts:3064](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/activator/backend_exec.go:3064). |
| + |
| + **Failure:** Following the named file list leaves `<host>.config.env` outside the fingerprint. Editing or removing delivered configuration while the instance sleeps leaves cached pages reachable. |
| + |
| + **Fix:** Explicitly name both web environment layers, resolved through `pathsFor`. Test real config delivery and removal against an already-cached URL, rather than only editing a synthetic file supplied by the test. |
| + |
| + **Boundary:** Current-inputs invariant; carries forward R2-1. |
| + |
| +2. **P1 — Task 6: Calling `CurrentInputs` at launch does not identify the inputs actually consumed.** |
| + |
| + **Evidence:** [Plan:566](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:566) hashes `rt.Version` and rereads files. The spawn captures its environment earlier at [backend_exec.go:2392](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/activator/backend_exec.go:2392), then supplies that captured environment at [2545](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/activator/backend_exec.go:2545). Staged processes execute `g.StagedPath`, independently of the route’s installed version, at [genbackend.go:274](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/activator/genbackend.go:274). |
| + |
| + **Failure:** Config A is captured for execution; delivery writes B before the fingerprint read. The process runs A but publishes B’s fingerprint. Both store checks then accept A’s response under B. Likewise, a retained or staged build can differ from `rt.Version`. |
| + |
| + **Fix:** Derive launch inputs from the exact captured config bytes and actual executable identity. Carry that immutable value to `noteCurrent`. Share the fingerprint encoding with current-input computation, rather than independently rereading launch files. Test config replacement between capture and exec, plus `g.Build != rt.Version`. |
| + |
| + **Boundary:** The answering process must have consumed the inputs attached to its page; carries forward R2-2. |
| + |
| +3. **P1 — Task 9: The serving map cannot distinguish departure from temporary ineligibility.** |
| + |
| + **Evidence:** [Plan:848](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:848) decides whether to clear marks using `e.current()`. Reload excludes sidecars and non-ready rows entirely at [edge.go:956](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/edge/edge.go:956). Their absence therefore looks identical to deletion. |
| + |
| + **Failure:** Seed a personalized LRU entry, opt the instance in, then change its status away from ready and back. The first reload incorrectly clears its mark. On return, the old LRU entry is reachable before any wake or new opt-in response. |
| + |
| + **Fix:** Determine departure from the complete registry route snapshot, including ownership, rather than absence from the serving map. Preserve marks for existing but ineligible rows. Add a ready → non-ready → ready test with a pre-opt-in personalized LRU entry. |
| + |
| + **Boundary:** I2 and durable opt-in lifetime; the R1-5 mechanism remains incomplete. |
| + |
| +4. **P1 — Tasks 6 and 10: The specified host wiring cannot compile.** |
| + |
| + **Evidence:** [Plan:896](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:896) calls `e.cache.SetCurrentInputs` from package `host` and supplies `ExecBackend.configFilesFor`. `Edge.cache` is unexported at [edge.go:284](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/edge/edge.go:284), and the proposed method is also unexported at [plan:570](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:570). |
| + |
| + **Failure:** Package `host` cannot access either member. |
| + |
| + **Fix:** Use the existing host-local `cache` variable and expose an exported backend method or callback that computes current inputs. State the callable interface explicitly. |
| + |
| + **Boundary:** Cross-package API and buildability. |
| + |
| +5. **P2 — Task 5: One client-boundary scrub still retains its private vocabulary.** |
| + |
| + **Evidence:** The scrub inventory at [plan:475](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:475) omits [stripAssetFillVocabulary:1349](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/edge/assetcatch.go:1349), which explicitly deletes three headers before client delivery. |
| + |
| + **Failure:** The proposed guard passes while an existing client-boundary scrub still uses its own list. Upstream backhaul stripping closes the reported marker leak, but the chosen “one list, every scrub” mechanism is not fully enforced. |
| + |
| + **Fix:** Make this scrub iterate the shared vocabulary with an explicit keep exception for the edge’s `Carlos-Cache`, and include it in the guard. |
| + |
| + **Boundary:** Paul’s fixed marker-stripping mechanism. |
| + |
| +6. **P2 — Task 7: Direct manifest-cache access needs a publication contract.** |
| + |
| + **Evidence:** [Plan:654](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:654) reads `p.manifests` on requests. That pointer starts nil at [agent.go:926](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/host/agent.go:926) and is assigned without synchronization by [bindManifests:179](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/host/assetpolicy.go:179). Its existing contract explicitly relies on request handlers never touching it. |
| + |
| + **Failure:** Request-time reads can race initialization; calling `cached` before initialization dereferences nil. |
| + |
| + **Fix:** Specify synchronized publication and an unknown result before initialization, or expose declaration data through an immutable published snapshot. Test requests concurrent with delayed manifest binding under `-race`. |
| + |
| + **Boundary:** Declaration-source initialization and concurrency. |
| + |
| +7. **P2 — Task 7: Diagnostics still omit unarmed boxes.** |
| + |
| + **Evidence:** [Plan:148](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:148) requires diagnostics on every marked response, but [plan:691](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:691) installs the diagnostic writer only on armed boxes. |
| + |
| + **Failure:** An unarmed home receives a marked GET or POST, strips the marker, and returns no `Carlos-Cache`. |
| + |
| + **Fix:** Install marker-based diagnostics independently of page-cache arming; these responses report `bypass`. Add unarmed GET and POST cases. |
| + |
| + **Boundary:** Promised visibility; carries forward R2-6. |
| + |
| +8. **P2 — Task 7: The simulation asserts I2 before I2 applies.** |
| + |
| + **Evidence:** [Plan:759](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:759) mixes pre-opt-in LRU traffic, while [plan:768](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:768) requires anonymous provenance for every cache hit. The approved [spec:155](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/specs/2026-11-08-edge-page-cache-design.md:155) deliberately preserves the LRU’s existing cookie behavior for instances that never opt in. |
| + |
| + **Failure:** Before opt-in, a cookie-bearing unmarked response enters the ordinary LRU and is replayed. The prescribed assertion rejects behavior this slice intentionally preserves. |
| + |
| + **Fix:** Track opt-in state in the oracle. Require anonymous provenance for page hits always and LRU exclusion while opted in. Retain personalized pre-opt-in entries as adversarial fixtures. Run reload-dependent simulation cases after Task 9, when that behavior exists. |
| + |
| + **Boundary:** Correct I2 verification and task ordering; carries forward R2-7. |
| + |
| +9. **P2 — Task 7: Page eligibility omits the account-throttle refusal.** |
| + |
| + **Evidence:** The predicate at [plan:114](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/docs/superpowers/plans/2026-11-08-edge-page-cache-plan-1-home.md:114) has no throttle condition. The required asset-policy predicate refuses throttled accounts at [assetpolicy.go:311](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/host/assetpolicy.go:311). Passing `planThrottleAdmit` is different: it allows requests when a token is available at [planthrottle.go:75](/home/paulca/amadan.net/carlos/platform-design-edge-page-cache/internal/edge/planthrottle.go:75). |
| + |
| + **Failure:** A throttled account’s admitted request can still serve or populate the page cache, contrary to spec §5.1. |
| + |
| + **Fix:** Add the explicit account-throttle predicate and test a throttled request that successfully passes admission but bypasses page caching. |
| + |
| + **Boundary:** Approved host-eligibility policy. |
| + |
| +No P3 findings. Round 3 exhausts the review budget; a fourth requires Paul’s approval. |
| + |
| +**NOT READY** |
| \ No newline at end of file |