You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(node,cache,bao-range): local store faults scored as upstream Unreachable; RangedStoreError repeats its cause; OriginPullError doc in changelog voice #2286
area:nodedecdn-node daemon: runtime, handlers, admin RPC, serve pathkind:bugSomething does not behave as documentedkind:choreCleanup, dependencies, tooling or release work; no user-visible changeprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Found while reviewing #2276. All three predate that PR.
1. A local store fault is scored against the upstream as Unreachable
crates/node/src/node_origin/mod.rspull_verdict (~2780) only downcasts client sentinels. A drive error whose cause is this node's own CacheError (a store fault, or a full disk under CacheError::Store) falls through to PullVerdict::Unreachable, and the honest holder is scored for it (~3175). This path is reached from pull_leg.rsdrive_run → classify_pull_failure (~1516) and from the buffered path (~2316).
After #2276, decdn_client::classify sees the disk io::Error through CacheError::source(), so ends_the_assembly stops the pull after the first holder. That first holder is still scored Unreachable.
Suggested fix: in pull_verdict, before the catch-all, treat a chain that holds CacheError::Store / CacheError::Internal (or that classify calls Fatal(Command)) as OurLocalFault. Add a test with CacheError::Store(iroh_blobs::api::Error::io(StorageFull, ..)).
2. RangedStoreError repeats its cause in chain renders
crates/bao-range/src/ranged_store.rs: Backend is #[error("backend: {0}")] with #[source], and Alignment is #[error("range alignment: {0}")] with #[from]. The cause appears both in Display and through source(), so {:#} / {:?} / decdn_cache::ErrorChain print it twice, e.g. backend: store error: store error: ctx: root.
The fix is a short Display (cause through source() only, the rule CacheError follows after #2276). But bao-range is shared with the client's .partial store, so every plain-Display site of a RangedStoreError in client / cli / node must switch to a chain renderer in the same change, or those logs go terse. Related: crates/node/src/handlers/client/serve_encoder.rs flattens EncodeError (Debug-based Display) with anyhow!("coherent range encode failed: {e}") (~408). It could use .context() instead.
3. OriginPullError doc uses changelog voice
crates/cache/src/error.rs (OriginPullError doc, ~233-235) says "…so external observers see no change in the error surface". That breaks the CLAUDE.md present-tense rule. Restate it as current behaviour.
area:nodedecdn-node daemon: runtime, handlers, admin RPC, serve pathkind:bugSomething does not behave as documentedkind:choreCleanup, dependencies, tooling or release work; no user-visible changeprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity