plan 3: clarify drift correction D5 (the acknowledged expiry is the header-time verdict)
1 file changed,
+1
−1
docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md+1 −1
diff --git a/docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md b/docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md| index 9cefddcc6..fb5617686 100644 |
| --- a/docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md |
| +++ b/docs/superpowers/plans/2026-10-24-edge-asset-cache-plan-3-serve.md |
| @@ -43,7 +43,7 @@ Plans 1 and 2 changed in review after this plan was accepted. Astra's drift revi |
| - **D2 (freshness).** `homeMap.AssetsFor` enforces `-5m <= now-At <= 1h` and the first-read rule; consume it as is and test the future bound at the far edge. `assetPolicy.For` checks only the upper bound; do not add the future bound there. |
| - **D3 (policy snapshot).** `LocalAssets.For` and `Declared` answer from the writer's last settled snapshot and never read the registry per call; they answer false until the first snapshot. The race to guard is policy snapshot against the edge's route snapshot (`Edge.Reload`). Tests advance the policy through a settled writer pass while withholding `Edge.Reload`. |
| - **D4 (primary).** `HostAssets` gains `Primary string` (the primary route host the decision was made for; equal to the host for a primary, the alias's target for an alias), filled by the policy's snapshot and the edges-file block (additive `omitempty` wire field `primary`, written by the home box's publisher and parsed by `AssetsFor`; update the golden). The upstream rule compares it with `up.route.Host`. |
| -- **D5 (commit errors).** A `Commit` error does not always mean nothing was stored: a failed directory sync after the meta rename returns an error with the entry published. Treat any `Commit` error as "this fill cannot be acknowledged as stored by me" (serve the response, no ack expiry beyond what `Get` then shows), never as rollback. |
| +- **D5 (commit errors).** A `Commit` error does not always mean nothing was stored: a failed directory sync after the meta rename returns an error with the entry published. Treat any `Commit` error as "this fill cannot be acknowledged as stored by me" (serve the response, no ack expiry beyond what `Get` then shows), never as rollback. (Clarified 2026-10-25 during Task 5's review: the home's acknowledged `X-Carlos-Asset-Expires` is the header-time storability verdict, signed before its own commit; a home commit failure affects only the home's cache, and the far edge stores under its own checks.) |
| - **D6 (abort accounting).** `Abort` keeps reserved bytes for temporaries it cannot delete; zero-reservation assertions apply only when cleanup succeeds. `Stats.Retired` includes failed unlinks and bodies kept after an uncertain meta rename. |
| - **D7 (rate limit).** Every upstream fill and every uncached fallback goes through the existing per-instance rate admission (`rateAdmit` and its first-final-response slot release); hits stay exempt. |
| - **D8 (account throttle).** Caught deliveries, hits included, pass `planThrottleAdmit` and its refusal metering exactly as uncached deliveries do: the local catch hook runs after it. A far hit is throttled by the owner's account with a synthetic `registry.Route{Host, Account, App, Kind: "instance"}`; if the throttle needs more than that, the far edge forwards instead of serving from disk while the account is throttled. |