Repository navigation
fix(node,cache): capability intake/expiry visibility and fs origin fault visibility - #2815
Merged
thiras merged 4 commits intoNov 3, 2026
Merged
Conversation
…ty intake drops (#2631) An admission refusal for a capability inside the expiry margin, or for a registered signer at or past its on-chain expiry, now records the node-local ServeRejectReason::CapabilityExpired: span reason capability_expired and decdn_serve_stream_rejected_capability_expired_total. It still signs Unfunded, so the wire is unchanged. A cap shortfall on a live registration stays signer_cap_exhausted. Each capability intake drop counts on decdn_capability_intake_dropped_total{reason}, with one label per drop arm (expiry_zero, not_eoa_signature, malformed_signature, wrong_owner, invalid_signature). Log levels are unchanged. A loopback test sends a bound request with a capability signed by a non-owner through dispatch with a pool view wired, and checks the wire NotFound, the empty lane store and the wrong_owner count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A dangling symlink, as a leaf or as a shard directory, is a permanent fault from the filesystem origin, not an authoritative absence that size() memoises and the rescan drops with no log. - size() opens the data object once and fstats it, so an unreadable file is a fault rather than a size that every serve fails on at open. - ESTALE (StaleNetworkFileHandle) is transient in the fs classifier and in the retry classifier. - An outboard over its cap warns with the path or key, the length and the cap before it degrades to Unsupported, in the fs, http and s3 origins. - The origin probe fault warn names the walk's last per-origin error, so a permanent fault shows at the default log level. - The fs cap docs name BlobTooLargeMarker and CacheError::BlobTooLarge, and the unused path_for_log leaves the cap stream state. tracing-subscriber joins the cache dev-dependencies for a log-capture test. Co-Authored-By: Claude Opus 5.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 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
…bility-and-fs-origin-visibility-d75468 # Conflicts: # crates/node/src/handlers/client/mod.rs
…lity and doc fixes From the PR #2815 review: - probe_origin_chain keeps the first non-transient per-origin cause, so a later origin's transient fault cannot shadow the operator-actionable one in the memoise warn; a unit test pins the cause threading, the transient-only cause and the walk-ceiling cause. - dangling_link logs its own probe errors at debug instead of silently keeping the absent answer. - A test pins that a dangling .obao4 symlink is a permanent fault from fetch_outboard, never a silent Unsupported degrade. - The size() comment no longer claims the open cannot block: the resolve rules out a FIFO already in place, and a swap after the stat is #2802. - OriginPullError docs list StaleNetworkFileHandle as transient and the dangling symlink as permanent. - The capability_expired docs (enum, counter, ADR row) say the split lives in the counter and the serve_stream span reason, not 'only' the counter; the intake-drop label doc calls itself the aggregate view, since each drop site also logs; the probe_hold_unavailable field doc edit shrinks to the one needed correction. - ADR registry: capability_expired row sits in alphabetical order, the intake-drop row moves out of the serve_stream_rejected block, and 'Thus' becomes 'So'. Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Nov 1, 2026
Open
Closed
thiras
approved these changes
Nov 3, 2026
thiras
deleted the
claude/2631-2801-capability-and-fs-origin-visibility-d75468
branch
November 3, 2026 16:52
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.
#2631: capability observability (node)
ServeRejectReason::CapabilityExpiredcovers two admission refusals. The first is a lane whose capability is inside the expiry margin (dispatch.rs). The second is aRegisteredsigner withnow >= expiry(signer_refusal). It records the span reasoncapability_expiredanddecdn_serve_stream_rejected_capability_expired_total, which is also inINBOUND_FAILURE_REASONS. It still signsStreamError::Unfunded, so the wire does not change. A cap shortfall on a live registration stayssigner_cap_exhausted. The docs give each refusal its own remedy: for an expired capability, the owner delegates a fresh capability.decdn_capability_intake_dropped_total{reason}is a labelledFamily, with every child exported at zero from startup. Each drop arm inintake_capabilityincrements its own label:expiry_zero,not_eoa_signature,malformed_signature,wrong_ownerorinvalid_signature. Log levels do not change.adr/appendix-observability.mdgets rows for both counters, a note on therefusedoutcome, and a line on why the intake split is labelled.signer_refusal_testsand in the outcome-label and metrics tests. One unit test per intake label. The loopback testsclient_expired_capability_is_refused_unfunded,client_zero_expiry_lane_is_refused_unfundedandclient_capability_inside_the_expiry_margin_is_refused_unfundednow assert thecapability_expiredcounter. A new loopback test,client_capability_signed_by_a_non_owner_registers_no_lane, sends a bound request with a pool view wired and a capability signed by a non-owner. It asserts the wireNotFound, the unknown-lane counter, no row in the lane store, and thewrong_ownercount.Note:
INBOUND_FAILURE_REASONSgainsdecdn_serve_stream_rejected_capability_expired_total. The "Unattributed stream failures" panels in decdn/devops subtract that list by hand, so they need the same addition.#2801: fs origin visibility gaps (cache)
resolve_regularreturnsPermanent, notOk(None), when the leaf or the shard directory is a symlink whose target is missing. A valid symlinked shard directory with no leaf under it still reads as absent. This also covers the.obao4outboard sibling, which shares the resolve: a dangling outboard symlink is a permanent fault (pinned by a test), the range probe latches it and warns, and the serve still lands through the buffered whole-blob path.tracing::warn!with the path or key, the length and the cap now comes before each oversizeUnsupported: three sites infs.rs, two inhttp.rs(at the caller ofcollect_capped) and two ins3.rs.probe_origin_chainreturns aChainProbethat carries the walk's last per-origin error. The "origin probe faulted; memoising the fault" warn logs it, so a permanent fault such as a symlink escape shows at the default log level.probe_origin_chain_classifiedmerges intoprobe_origin_chain, and both callers, the rescan andorigin_probe_presence, are updated.size()opens and fstats the data object once. An open error goes throughclassify_io_error, so a file the process cannot read is a fault, not a size.ESTALE.StaleNetworkFileHandleis Transient in the fsclassify_io_errorand inretry::classify_by_kind.fetchandcap_at_max_bytesdocs now say an overrun is aBlobTooLargeMarkerthat the engine turns intoCacheError::BlobTooLarge. The unusedpath_for_logis gone from theunfoldstate.A follow-up commit from the PR review threads the first non-transient per-origin cause through
ChainProbe(a later transient fault cannot shadow it), logsdangling_link's own probe errors at debug, and fixes the docs the review flagged; review follow-up issues: #2823, #2824, #2825, #2826, #2827.Tests in
fs/tests.rs: a dangling leaf symlink and a dangling shard-directory symlink (#[cfg(unix)]), plus a valid shard symlink with no leaf that stays absent; achmod 000file whosesize()returns Permanent (the test returns early under root);classify_io_errorforESTALE; and a log-capture test, which addstracing-subscriberas a cache dev-dependency, asserting that the fs oversize warn names the path and the cap.retry/tests.rsgets anESTALEcase.Verification
cargo build && cargo clippy --workspace --all-targets -- -D warnings: passcargo fmt -- --check: passCARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-items: passcargo nextest run -p decdn-node -p decdn-cache --no-fail-fast: 2423 passed.dht_loopback pooled_client::an_aborted_call_unpins_its_connectionwas flaky and passed on retry; this PR does not touch it.cargo deny check: bans, licenses and sources pass. advisories fails on RUSTSEC-2026-0387 (crypto-bigint 0.5.5, which comes in through k256). The failure is already on main: the ignore PR chore(deps): ignore RUSTSEC-2026-0387 until alloy moves to k256 0.14 #2797 was closed without merging. This PR's lockfile change adds onlytracing-subscriberto the decdn-cache dev-dependencies.git diff --stat origin/main -- contracts/: emptyCloses #2631
Closes #2801
🤖 Generated with Claude Code