Repository navigation
Conversation
… as an absence
Origin::size had one answer, Ok(None), for two different facts: the
origin does not hold the object, and the origin holds it but cannot
state a byte size (a stored-compressed object with Content-Encoding, or
a 200 without Content-Length). The probe path reads that answer as
authoritative absence: the memo caches Absent, the origin-only serve
gate declines the node's own content, and the republish walk drops the
hash.
size() now answers a tri-state OriginSize { Known, Unsized, Absent }. A
present-but-unsized object memoises PresentUnsized under the positive
TTL and is admitted at the serve gate; it stays out of the announce set
and the rescan index because origin-sourced probe coverage needs a size
to sign. A genuine 404 still reads as Absent, and the chain walk
prefers a sibling origin's size over an unsized answer. The whole-blob
pull fallback (origin_size) is unchanged.
Closes #2827
Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 9 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
…escans Review follow-ups on the OriginSize tri-state: - probe_origin_chain keeps its findings outside the walk future, so a timeout that fires after an origin confirmed an unsized hold answers PresentUnsized, not Fault — the serve gate no longer refuses a known-present object because a slow sibling overran the ceiling. The sibling's fault (or the overrun) rides along as the probe cause and logs at warn without changing the memoised presence. - resolve_candidates carries a previously-sized index entry forward when the origin's answer degrades to unsized: presence is confirmed and a hash's length cannot change, so the carried size signs the same coverage. Hashes no pass ever sized are counted and warned about (servable but not announced) instead of dropping silently. - The memo stores OriginPresence directly; the isomorphic Presence enum, its From impl and the dead Presence::size() are gone. - Doc reconciliation: the fetch-only trait default's consequences under the origin-only gate, the announce walk's two skip kinds, and stale Ok(None) wording. - New tests: walk continues past Unsized to a sized sibling, timeout keeps the hold, rescan carry-forward, holder_snapshot skips unsized without a fault, the origin-only gate serves an unsized backend hash end to end, S3 HeadObject without Content-Length is Unsized. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Review pass (five-agent: code, comments, tests, errors, types) landed in 86e1186:
2509 cache+node tests, clippy |
ReviewThe sized / unsized / absent split is a real improvement, and the pull path already serves a blob without a known size. Eight findings below; the first two are bugs. Bugs1. Origin-only node denies and leaves unannounced blobs it holds ( 2. Unsized hold plus a sibling fault is memoised under the positive TTL ( Smaller issues3. Rescan sizes an unsized hold only from the previous index ( 4. The unsized-drop warning repeats on every rescan ( 5. The PR description does not match the rescan code, and the probe disagrees with the index ( Cleanups6. The 7. Comment narrates history ( Open question8. The serve gate admits what the probe and announce deny ( 🤖 Generated with Claude Code |
…nes sooner Review follow-ups on the Origin::size tri-state (#2827), closing #2869: - the origin-only probe branch consults the rescan index, then the live presence probe, and sizes a PresentUnsized answer from the complete local blob (serve_audit), so announce, probe and serve agree - holder_snapshot announces a store-complete unsized hold; the rescan sizes one from the previous index, else the store, before counting a drop — a restart no longer drops warm unsized holds - a PresentUnsized established during a degraded walk (sibling fault or overrun) memoises under the fault TTL so a blipped sized sibling is re-probed promptly instead of being shadowed for the positive TTL - the unsized-drop warn fires on a count change and logs debug while steady, so a compressed origin does not warn every rescan interval - probe_origin_chain gathers in the walk and classifies once after the timeout, so the presence precedence lives in one match Co-Authored-By: Claude Fable 5 <[email protected]>
|
All eight findings addressed in 3b458a1; 1/3/8 fold issue #2869 into this PR (the description now carries
🤖 Generated with Claude Code |
…gin-size-tristate # Conflicts: # crates/cache/src/lib.rs
…s from the store Second review pass on the Origin::size tri-state (#2827): - http/s3 size() resolve Content-Encoding exactly as fetch does: identity keeps the length (Known), a decodable encoding is Unsized, and one fetch rejects (br, or any non-identity under Strict, or a malformed header) is a permanent fault, so the origin-only gate no longer admits a hash whose pull always fails - the relay probe's live-origin fallback sizes a PresentUnsized hold from a complete local blob, sharing one helper with the origin-only branch - holder_snapshot counts a failed store audit of an unsized hold as an ownership probe fault instead of skipping it silently Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Second review addressed in abf115e (on top of a merge of current main; the only conflict was the Warning 1 — encoding-aware Warning 2 — relay probe fallback: fixed. The relay live-origin fallback now sizes a Suggestion — Local: 2518 cache+node tests pass with 🤖 Generated with Claude Code |
|
Closed: #2885 makes a {H}.sizeproof the origin's only statement of a blob size, and a node never serves or advertises an origin object it cannot prove the size of. A present-but-unsized object is therefore not served, so the unsized tri-state has no use. |
Origin::sizehad one answer,Ok(None), for two different facts: the origin does not hold the object, and the origin holds it but cannot state a byte size (a stored-compressed object withContent-Encoding, or a 200 withoutContent-Length). The probe path reads that answer as authoritative absence: the memo cachesAbsent, the origin-only serve gate declines the node's own content, and the republish walk drops the hash — so a compressed remote origin silently reads as absent everywhere, while the engine docs claimedOk(None)was reserved for a genuine 404.size()now answers a tri-stateOriginSize { Known, Unsized, Absent }. A present-but-unsized object memoisesPresentUnsizedand is admitted at the serve gate (the pull path already serves it through the whole-blob fallback, unchanged). A genuine 404 still reads asAbsent, and the chain walk prefers a sibling origin's size over an unsized answer.Probe coverage needs a size to sign, and a blob's length is immutable under its BLAKE3 hash — so an unsized hold is announced and probe-answered whenever anything else states the length: a size the previous rescan index holds, or the blob a pull landed complete in the local store (
serve_audit). Only a hold nothing ever sized stays unannounced (counted and logged); the serve gate still admits it.Caller-by-caller:
dispatch.rs):PresentUnsizedadmits — refusing the node's own content is the defect being fixed; the pull path serves it whole-blob.PresentUnsizedanswer takes the store's size for a complete local hold, else answershas_blob: false.holder_snapshot): announces aPresentUnsizedhash when the store holds the blob complete; skips it otherwise — uncounted, nothing is degraded.resolve_candidates): sizes aPresentUnsizedcandidate from the previous index, else from the complete stored blob; a never-sized hold drops out, counted inunsized_drops, which warns on change and logs debug while steady.PresentUnsizedstands for the positive TTL; one established while a sibling origin faulted (or the walk overran) stands only for the fault TTL, so the sibling that may state the size is re-probed promptly.origin_probe_size: stays the size-only collapse (PresentUnsized/Absent/Fault→None); size-aware callers useorigin_probe_presenceplusserve_audit.origin_size(range-pull scoping):Knownreturns the size;Unsized/Absentadvance the chain — signature unchanged (Option<u64>out), the whole-blob fallback stays silent.AbsentsoNodeOriginand custom origins never read as holding content they cannot confirm.Out of scope (noted, not done): making
size()answerErr(Permanent)forDecompressMode::Strict/unsupported encodings — fetch already fails there; aligning size is a separate nicety.Closes #2827
Closes #2869
🤖 Generated with Claude Code