Repository navigation
fix(node): log every serve-miss refusal once at info, naming its path - #2314
Merged
Merged
Conversation
…#2282) A node refused paid requests with NotFound through five miss exits, but only the coverage gate logged at info. The others ticked decdn_serve_stream_rejected_cache_miss_total and nothing else, so an operator could not see which hash or range was refused, or why. Each terminal miss now goes through respond_miss, which logs "serve-miss: refusing the request" with hash, byte_offset, byte_len, reason and path (coverage_gate, pull_leg_miss, pull_leg_timeout, buffered_miss, no_pull_through), then sends the same refusal as before. The coverage gate's detail line moves to debug so each refusal logs once. The wire answer and the reject counters do not change. Closes #2282 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new log can report a refusal even when response signing or writing fails and the stream is recorded as a node fault.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds consistent INFO-level logging for all serve-miss refusal paths without changing wire responses or metrics.
Changes:
- Adds stable miss-path classification and centralized refusal logging.
- Routes windowed and buffered misses through
respond_miss. - Adds logging tests and updates documentation.
| File | Description |
|---|---|
CHANGELOG.md |
Documents serve-miss logging. |
crates/node/src/handlers/client/dispatch.rs |
Classifies buffered and unavailable pull-through misses. |
crates/node/src/handlers/client/mod.rs |
Defines miss paths and refusal metadata. |
crates/node/src/handlers/client/outcome.rs |
Exposes refusal reason formatting internally. |
crates/node/src/handlers/client/window.rs |
Classifies windowed miss exits and lowers detail logging to DEBUG. |
crates/node/src/handlers/client/wire.rs |
Adds centralized INFO logging and tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A signing, encoding or node-side write fault returns Err from respond_error, and the dispatch sink counts it as a node fault. Logging before the send claimed a NotFound answer the node never gave. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit cbca7b8 in the Show a line coverage summary of the most impacted files.
Updated |
Review follow-ups on the serve-miss refusal line: - A request with no binding or no lane here ran no fill tier and logged an unthrottled info line as no_pull_through, so any peer could write one line per stream. It now refuses on its own no_lane path, logged through a one-per-minute throttle with a suppressed count. no_pull_through now means only that node-to-node pull-through is off. - The coverage-gate line carries pull_offset, pull_len, candidates and first_uncovered_chunk, so the detail stays at info and the separate debug line is gone. - A pull_leg_miss line carries the PullMiss as cause (clean_miss, below_margin, local_fault), so a buy-ceiling decline reads apart from an absent blob. - A refusal that fails to send names its path in the error context. - The test SpanCapture records decdn_node INFO+ events; the loopback fault matrix and the #2195 no-covering-candidate cases assert the one refusal line and its path, plus a new unbound-miss no_lane test. - MissPath docs and the CHANGELOG entry say what each path covers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
A node refuses paid requests with wire
NotFound(orInternalError) through several serve-miss exits. Only the coverage gate logged at info, so in the 2026-10-01 testnet pulls hel1 counted +34decdn_serve_stream_rejected_cache_miss_totaland Loki had no line for any of the client's 18 refusals.Every cache-miss refusal now goes through
respond_miss(wire.rs). Once the refusal is sent, it logs one info line,serve-miss: refusing the request, with these fields:hash,byte_offset,byte_lenreason: the same value theserve_streamspan recordspath: one of the values belowpathcoverage_gatepull_offset,pull_len,candidates,first_uncovered_chunkpull_leg_misscause:clean_miss,below_marginorlocal_faultpull_leg_timeoutbuffered_missno_pull_throughno_lanesuppressed; throttled to one line per minute, because any peer can reach this pathOther details:
Closes #2282
Test plan
wire.rs):InternalErroris chosen only when a tier faulted;no_laneline.pathandreason:no_pull_through,pull_leg_miss(cause=clean_miss) andbuffered_miss, in the loopback fault matrix;coverage_gate, in the node: a DHT answer with only partial holders skips the origin-directory fallback, so the ranged miss fails #2195 no-covering-candidate cases;no_lane, in a new unbound-miss test (two misses, one throttled line).buffered_miss/no_pull_throughlabels fails both affected tests.cargo nextest run -p decdn-node: 1582 passedcargo clippy --workspace --all-targets --all-features -- -D warnings,cargo doc -D warnings,cargo fmt --check, pre-commit hooks🤖 Generated with Claude Code