Skip to content

docs(cache): correct ADR 040 on segment re-observation and deny-listed eviction candidates - #2275

Merged
yigitdot merged 2 commits into
mainfrom
fix/2267-adr040-deny-segment-docs
Oct 1, 2026
Merged

yigitdot merged 2 commits into
mainfrom
fix/2267-adr040-deny-segment-docs

Conversation

@yigitdot

@yigitdot yigitdot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • ADR 040 Known limitations said a restart-reset blob regains a segment "until traffic re-observes it". set_segment runs only on fill admission (engine.rs pull-through fill and admit_bao_stream) and on a plan's Probation → Main promotion, so a blob cached before a restart stays Main until evicted; only the frequency estimator rebuilds from traffic. The bullet now says so.
  • ADR 040 boundary rule 1, acceptance criterion 7, and the policy module docs (EvictionContext::candidates, EvictionPolicy::plan) said eviction candidates are filtered of deny-listed hashes and that the deny set is never evicted. eviction_candidates deliberately keeps deny-listed hashes, even pinned ones, and release_for_eviction releases them (deny wins over pin). The docs now describe that, including that a probe-held hash stays excluded even when deny-listed.
  • Acceptance criterion 7 carries the probe-hold caveat: a deny-listed hash is always evictable, but a probe-hold keeps it out of cache-pressure eviction until the hold expires, and CacheEngine::evict reclaims it regardless. This keeps the criterion consistent with boundary rule 1 and the eviction_candidates docs.
  • The EvictionCandidates / eviction_candidates docs in engine.rs gain the same deny carve-out.
  • Docs only; no behaviour change.
  • The issue's third bullet (macOS node_origin_pull flakes) is tracked by flaky(test): node_origin_pull::node_origin_not_found_refusal_does_not_tar_upstream fails ~50% since #2248 #2268.

Test plan

  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items
  • cargo fmt -- --check, cargo clippy -p decdn-cache --all-targets -- -D warnings

Closes #2267

🤖 Generated with Claude Code

…d eviction candidates

Only fill admission and a plan's Probation -> Main promotion set a
segment, so a blob that a restart reset stays Main until it is evicted.
Eviction candidates drop pinned and probe-held hashes but keep
deny-listed ones, even pinned (deny wins over pin). Align ADR 040, the
policy module docs, and the engine's EvictionCandidates docs.

Closes #2267

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-code-quality

github-code-quality Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

The overall line coverage in commit fad5fa9 in the fix/2267-adr040-deny... branch remains at 87%, unchanged from commit 5539cd0 in the main branch.

Show a line coverage summary of the most impacted files.
File main 5539cd0 fix/2267-adr040-deny... fad5fa9 +/-
crates/client/src/streamer.rs 92% 91% -1%
crates/node/src/dht/publish.rs 92% 92% 0%
crates/client/s...c/connection.rs 97% 97% 0%

Updated October 01, 2026 22:09 UTC

…on 7

A deny-listed hash is always evictable, but a probe-hold keeps it out of
cache-pressure eviction until the hold expires; CacheEngine::evict
reclaims it regardless. Spell this out in criterion 7 so it agrees with
boundary rule 1 and the eviction_candidates docs.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@yigitdot
yigitdot requested a review from alpergundogdu October 1, 2026 22:10
@yigitdot
yigitdot merged commit e8a4a77 into main Oct 1, 2026
30 checks passed
@yigitdot
yigitdot deleted the fix/2267-adr040-deny-segment-docs branch October 1, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(cache): ADR 040 and policy docs misstate segment re-observation and deny filtering

2 participants