Repository navigation
docs(adr): add blob cache eviction policy as appendix - #444
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces ADR 030, which codifies the Blob Cache Eviction Policy using a Least-Recently-Used (LRU) approach. It details how eviction interacts with operator pinning, durable operator-initiated evictions, and probe-triggered holds, while also defining new observability metrics. Feedback focuses on maintaining the canonical nature of the documentation by removing historical narratives, implementation status, and GitHub issue references from the ADR and architecture files, as well as correcting several internal Markdown anchor links.
There was a problem hiding this comment.
Pull request overview
Adds a new normative ADR (ADR 030) to formalize the blob cache’s eviction behavior as LRU and to document how pinning, operator-initiated eviction, and probe-hold exemptions compose with that policy. Updates the architecture overview, protocol ADR, observability appendix, and ADR book build order to reference and incorporate ADR 030.
Changes:
- Add ADR 030 specifying LRU eviction semantics and interactions (pinning, operator-evict, probe-hold, and observability expectations).
- Update architecture/protocol ADRs to replace “LRU/LFU” ambiguity with ADR 030 references.
- Update the ADR reading-order book build and observability cache-metrics table to include ADR 030 and related metrics.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md |
Bumps “next ADR number” to 031 after adding ADR 030. |
adr/README.md |
Inserts ADR 030 into the reading-order pandoc build list. |
adr/architecture.md |
Adds ADR 030 to reading order and index; updates cache eviction description to point at ADR 030. |
adr/appendix-observability.md |
Updates cache metrics table to reference ADR 030 and adds cache-size-limit / pin / operator-evict metrics entries. |
adr/030-blob-cache-eviction-policy.md |
New ADR defining blob cache eviction policy contract and interactions. |
adr/005-protocol.md |
Updates probe-hold wording to reference LRU (via ADR 030) rather than “LRU/LFU”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code reviewFound 1 issue:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
New appendix codifying LRU eviction for the blob cache, the operator-pinning override, the durable operator-evict orthogonality, and the probe-hold composition above LRU. Closes #220. Per the cut-line in adr/README.md § ADRs vs appendices, ADRs codify cross-implementation interop contracts; local implementation policies that any compliant node may set independently belong in appendices. Blob cache eviction is a node-internal choice — two nodes running different eviction strategies (LRU, LFU, hybrid) still interoperate so long as they honour the probe-triggered hold in ADR 005. PR #448 applied the same logic to peer-table eviction; this PR mirrors that reclassification for the blob cache. Changes: - adr/appendix-blob-cache-eviction.md: new file. LRU keyed on the Instant of the last successful CacheEngine::get (refreshed on both the cache-hit path and the post-pull-through path); pinning, evict, and probe-hold compose above it; reputation does not factor in. Six-section structure (Eviction key / Pinning / Operator evict / Probe-hold / Reputation / Observability) plus rejected alternatives (LFU, size-weighted, hybrid LRU+LFU, no-eviction, reputation-priority, probe-refresh). - adr/architecture.md: add the new appendix to "Appendices — Reference Patterns" between peer-table eviction and L2 deployment; update § Caching eviction wording from "LRU or frequency-weighted (LFU)" to "LRU keyed on the timestamp of the last successful CacheEngine::get" pointing at the appendix. - adr/005-protocol.md: probe-hold paragraph narrowed from "LRU/LFU cache pressure" to "LRU cache pressure" pointing at the appendix. Aligns with the canonical decision to specify LRU. - adr/appendix-observability.md § 2.3 Cache Metrics: add three rows (decdn_cache_size_limit_bytes Tier R; decdn_cache_evicted_operator_total Tier R; decdn_cache_pinned_count Tier R) and tighten decdn_cache_evictions_total description from "LRU/LFU" to "LRU". decdn_cache_size_limit_bytes is filed at Tier R because the appendix's own M-tier definition (slash-risk + delivery-accountability) doesn't fit a static configuration-mirror gauge. - adr/README.md: pandoc reading-order book build adds appendix-blob-cache-eviction.md to the appendix block after appendix-peer-table-eviction.md. Closes #220, #447 part 2. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3508d9a to
342f42e
Compare
Summary
Add
appendix-blob-cache-eviction.mdcodifying the blob cache eviction policy: LRU keyed on the timestamp of the last successfulCacheEngine::get(refreshed on both the cache-hit path and the post-pull-through path), with operator pinning overriding LRU, durable operator-initiated evict orthogonal to LRU, and the probe-hold mechanism in ADR 005 composing above LRU. Reputation does not factor into eviction.Filed as an appendix per the cut-line in
adr/README.md§ ADRs vs appendices: blob cache eviction is a node-internal choice (two nodes running different eviction strategies still interoperate as long as they honour the probe-triggered hold), which puts it on the appendix side. Mirrors the same reclassification #448 applied to peer-table eviction.Closes #220, #447 part 2.
Changes
adr/appendix-blob-cache-eviction.md. Standard appendix preamble; sections for Eviction key, Pinning, Operator-evict, Probe-hold integration, Reputation, Observability; rejected-alternatives covers LFU, size-weighted, hybrid LRU+LFU, no-eviction, reputation-priority, and probe-refresh.adr/architecture.md: add to Appendices — Reference Patterns; § Caching eviction wording narrowed from "LRU or frequency-weighted (LFU)" to point at the appendix.adr/005-protocol.md: probe-hold paragraph narrowed from "LRU/LFU" to "LRU" pointing at the appendix.adr/appendix-observability.md§ 2.3 Cache Metrics: three new rows —decdn_cache_size_limit_bytes(Tier R),decdn_cache_evicted_operator_total(Tier R),decdn_cache_pinned_count(Tier R); tightendecdn_cache_evictions_totaldescription from "LRU/LFU" to "LRU".adr/README.md: pandoc reading-order book build adds the new appendix afterappendix-peer-table-eviction.md.🤖 Generated with Claude Code