Repository navigation
fix(client,cli): lane faults at WARN; typed RPC errors keep their failure class - #2370
Merged
Merged
Conversation
A source fault or a fatal one is what an operator watches for, so its lane-fault line (source_set `a lane faulted` / `a source faulted`, scheduler `an extra stream of a lane faulted` with bytes landed) is at warn. A deposit wait (Unaffordable) or chain-side retry (Transient) stays at info; a refused extra stream with nothing landed stays at debug. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es (#2277) sanitize_rpc_display prints only the top Display, so an alloy or reqwest error lost its failure class (timeout, refused, DNS, TLS) once the URL was stripped. Typed errors now go through sanitize_error_sources and the anyhow build_provider error through sanitize_err_chain. The three pool.rs sites that flattened a ContractError via anyhow!("{e}") before sanitize_err_chain had the same loss and take the typed walker too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit c29918e in the Show a line coverage summary of the most impacted files.
Updated |
Lane-fault lines logged the raw error chain. A top-up fault wraps the
alloy transport error, whose reqwest layer names the RPC URL, so a key
in rpc_url reached the log. Those fields now go through
sanitize_err_chain.
An extra stream's fault is at debug only when it is a refusal before any
verified byte. A stall or dropped stream before the first byte follows
its class, so it reaches warn.
Typed alloy errors that were flattened with anyhow!("…: {e}") keep
their source() chain as anyhow::Error::new(e).context(…), so the
transport class survives to the sanitized print in main. This covers
the pool, fetch, bundle pull and incentive getPools reads.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The logging and error-chain changes are consistent, appropriately sanitized, and covered by targeted tests.
0 open findings
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
An extra stream that faults before any verified byte logs at debug again, whatever the error. Its error field stays sanitized. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
requested changes
Oct 9, 2026
thiras
left a comment
Contributor
There was a problem hiding this comment.
Update for the latest merge
…els-error-chains # Conflicts: # crates/client/src/fault/tests.rs # crates/client/src/scheduler/tests.rs
thiras
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#2331: lane faults at WARN. These lines logged at INFO. So a log monitor that filters on WARN and ERROR missed every provider refusal, stall and dropped stream. The level now follows the fault class (
Fault::warns):SourceandFatallog at WARN. This coversa lane faulted…anda source faulted(source_set::record_fault), andan extra stream of a lane faulted…when bytes landed (scheduler::log_extra_fault).Unaffordable(a deposit wait) andTransient(a chain-side retry) log at INFO. Neither means a provider is failing.warn_or_info!macro infault.rslets both levels share one field list.Lane-fault lines no longer leak the RPC URL. These lines logged the raw
{err:#}. A lane-build or top-up fault (LaneBuildFault,EscrowUntracked) wraps the alloy transport error, and its reqwest layer printsfor url (<rpc_url>). That URL can carry an API key. The error fields now go throughsanitize_err_chain, which the lane-build line already uses.#2277: typed errors keep their failure class.
sanitize_rpc_display→sanitize_error_sources(&e)for typed errors: thepool.rsgetPoolreads, thedoctor/origin.rsreqwest HEAD, and thediscovery.rsregistry retry. Theanyhowbuild_providererror usessanitize_err_chain(&e).anyhow!("…: {e}")orbail!beforemainsanitized it. They now keep the source asanyhow::Error::new(e).context(…). The sites are inpool.rs,fetch.rs,bundle_pull.rsandincentive/payment_pool.rs. Threepool.rssweep sites now callsanitize_error_sources(&e)directly.Example: an RPC that refuses the connection printed
getPool failed: error sending request. It now prints the connect failure,… Connection refused. URLs are still stripped from every layer.Test plan
cargo clippy --workspace --all-targets -- -D warningscargo fmt -- --checkRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-itemscargo nextest run -p decdn-client -p decdn-cli -p decdn-common -p decdn-incentive: 2337 passed, after mergingmain(feat!: scope node refusals to three classes and recover funding once per fetch #2354)scheduler::tests::extra_stream_fault_level_follows_landed_and_classandfault::tests::only_source_and_fatal_faults_warn.source_set::tests::the_lane_fault_line_names_the_holder_recordnow asserts the levels, and asserts that aLaneBuildFaultnaminghttps://rpc.example/v3/secretleaves no URL in eitherrecord_faultline. Reverting the sanitize call fails it.pool_lifecycle::reclaim_pool_reads_chain_before_store_or_keystoreasserts thatconnection refusedsurvives.Follow-up: #2371 (needs a review to decide whether it is still needed).
Closes #2331
Closes #2277
🤖 Generated with Claude Code