Repository navigation
fix(cli,client): batch fix bundle-pull lane, watchdog and dedup bugs - #2212
Merged
Merged
Conversation
spawn_harvest discarded every upsert_identity, record_sample and prune_and_cap error. Probe samples are the only input to the latency ranking, so a store that refuses writes froze the ranking with no log. Each refused write now logs at debug with its peer, and a probe round whose every record write fails logs once at warn. ADR 039 said the client persists no per-lane outcome. A drive or stripe lane that fails through a fault of the peer sets the failure stamp; the ADR now says so. Closes #2203 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2193) A failed donor's re-fetch spans whole chunk groups, so it can cover part of a neighbour that spliced cleanly, and the drive then writes and pays for those bytes. The neighbour's whole dst still counted as spliced, so the run summary under-reported paid bytes. reassemble_dedup now keeps one SpliceLedger per entry: the dst spans that spliced and the spans every re-fetch or fallback drive covered, across the first splice and every tail pass. spliced_bytes is the spliced union less the driven union. Closes #2193 Co-Authored-By: Claude Opus 5.5 <[email protected]>
bundle pull read the registry once and kept one SELECT_K sample for the whole run, so with 7 registered nodes two were invisible to every entry, even when they were the only nearby holders. The run now keeps the whole registry read and each entry draws its own sample before it probes. Each entry already probes its candidates, so the fresh sample costs no extra probe. Closes #2204 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts (#2209) The multi-source unit watchdog sampled the store's missing-byte count, which moves only when a 4 MiB ingest checkpoint lands. A proxy warming a cold miss draws ~1 MB every ~2.5 s, so it landed no checkpoint within the 10 s default deadline and the watchdog killed it, failing the fan-out over to single-source. Each unit now keeps a verified-byte counter that fill_gap's reporter advances on every bao-verified leaf, before the checkpoint is durable. The watchdog trips only when a whole window passes with no verified byte and the range still has bytes missing. Closes #2209 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2211) Diagnostics for proxies that stall stripe legs for 30 s with no node-side fault. At debug: - each paid leg's open, with peer, hash, byte_offset and byte_len, so a stalled leg can be matched to the node's serve_stream of that range; - each throughput-floor trip, with the range, cumulative against expected wire bytes, the bytes across the window, and the gap since the previous floor sample (a long gap means the reader was not polled); - each ingest wait of 1 s or more on a checkpoint slot. No behaviour change. #2211 stays open for the testnet rerun. Refs #2211 Co-Authored-By: Claude Opus 5.5 <[email protected]>
) bundle pull held --max-lane-streams permits for a whole entry: the range path took one on every candidate, reserve and proxies included, across every sub-drive and the waits on siblings; the multi-source path held one per admitted provider for the whole fan-out, even after a lane died. A proxy lane that needed width stayed at width 1. Range path: the entry-wide permit set is gone. SessionWalk reserves one permit per session it drives, in one sorted batch before it opens new sessions, and hands them to the drive. Each lane's LaneGrant starts on that base permit and grows as before. A new driver hook, LaneRelease, fires as each gap worker stops, and the grant gives one permit back, so a lane that faults or runs out of gaps frees its provider at once. Multi-source path: each admitted provider's permit rides on its StreamCandidate as a LaneLease, which the scheduler drops when that lane's worker stops. Closes #2208 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical lane-permit assignment and cancellation-release bugs remain unresolved.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR fixes bundle-pull discovery, deduplication, watchdog progress tracking, diagnostics, and lane-permit handling across the client and CLI.
Changes:
- Adds per-entry candidate sampling and corrected splice accounting.
- Tracks verified-byte progress and expands operational diagnostics.
- Introduces lane lease/release APIs and updates related consumers, tests, and documentation.
| File | Description |
|---|---|
crates/common/src/cli/fetch.rs |
Updates watchdog option documentation. |
crates/client/tests/snapshots/public_api__public_api.snap |
Regenerates the public API snapshot. |
crates/client/src/streamer.rs |
Threads lane leases into sources. |
crates/client/src/source.rs |
Adds paid-leg diagnostics. |
crates/client/src/scheduler.rs |
Adds leases and verified-progress watchdog logic; contains an unresolved cancellation-path lease-release issue. |
crates/client/src/ranged_store.rs |
Logs long checkpoint waits. |
crates/client/src/progress.rs |
Exposes throughput-floor diagnostics. |
crates/client/src/lib.rs |
Extends pull state and public exports. |
crates/client/src/driver.rs |
Adds per-worker release hooks; contains an unresolved permit-assignment race during worker growth. |
crates/client/src/downloader.rs |
Updates lane construction. |
crates/client/examples/common/mod.rs |
Updates example lane construction. |
crates/cli/src/commands/fetch.rs |
Adds harvest logging and lease plumbing. |
crates/cli/src/commands/bundle_pull.rs |
Fixes sampling, deduplication, and permit handling. |
CHANGELOG.md |
Documents user-visible changes. |
adr/appendix-bundles.md |
Documents bundle lane semantics. |
adr/039-multi-source-parallel-fetch.md |
Clarifies persisted failure-stamp behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit c4d67a2 in the Show a line coverage summary of the most impacted files.
Updated |
…n stop (#2208) Review follow-ups for the lane-permit change: - A gap worker with no gap left sat in `notified.await` until the whole drive drained, so a lane that ran out of gaps kept every permit while another lane finished its last gap. A lane with a release hook now keeps one idle worker, for gaps a faulted lane puts back, and lets the others stop and give their permits back. The check runs under the gap queue lock, so two idle workers of one lane cannot both leave. - A fetch that its `stop` future ended dropped each worker future unfinished, which skipped the lease release after `.await`. The lease now rides in a drop guard moved into the worker future. Refs #2208 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2208, #2209) Review follow-ups: - A lane shrinks its idle workers only when it has a growth hook too, so a release-only lane cannot drop to one worker for good. - LaneGrant takes its base permit as required and derives the lane width from the permits it holds, so width and permits cannot drift apart. - A lane-permit invariant break (no permit reserved for a session, or two sessions of one pass on one provider) is a typed LanePermitFault. It ends the walk and the entry instead of failing over and blaming each provider, and a duplicate provider no longer waits on its own permit. - New tests: the watchdog through fill_gap with no progress callback (it fails if run_worker passes no counter, or if the counter moves below the on_progress early return), a candidate's lease reaching its lane, and a walk ended by a lane-permit fault. - Doc accuracy: region-first sampling, one idle permit per drained lane, per-worker release on a fault, a stopped drive skipping the release hook, the watchdog's per-window sampling, and ADR 039's size-mismatch exclusion. A test doc line moves back to its own test. Refs #2208, #2209 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 28, 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.

What
Batch fix for the open
bug,cliissues, one commit per issue.spawn_harvestlogs each refused peer-store write atdebug, and once atwarnwhen every write of a round fails. ADR 039 now says a peer-caused drive or stripe-lane failure sets the failure stamp.SpliceLedgerper entry (spliced spans and driven spans, across the first splice and every tail pass).spliced_bytesis the spliced union less the driven union.bundle pullkeeps the whole registry read and samplesSELECT_Kcandidates per entry, so every registered holder can reach some entry.debuglogs for each paid-leg open (peer, hash,byte_offset,byte_len), each throughput-floor trip (range, cumulative vs expected, window bytes, gap since the last floor sample), and each checkpoint-slot wait of 1 s or more.permit_setis gone.SessionWalkreserves one permit per session it drives, in one sorted batch before new sessions open, so no primed first leg waits on a permit. A newLaneReleasedriver hook gives a permit back as each gap worker stops.StreamCandidateas aLaneLease, which the scheduler drops when that lane stops.Closes #2203, Closes #2193, Closes #2204, Closes #2209, Closes #2208
Refs #2211
Reviewer notes
SessionWalk::fillreserves the permit batch while holding none: the last drive gave its permits back, and a second batch in onefillonly follows a pass in which every open failed.Addressorder, aspermit_setdoes.decdn-clientAPI change, recorded under CHANGELOG Changed (BREAKING): new fieldsRangeLane::release,StreamCandidate::lease,SourceLane::lease, new typesLaneReleaseandLaneLease. The public-api snapshot is regenerated.LiveSessions::driveitself, which needs a livePullCtx.FakeSessionsasserts that each drive gets exactly one permit per open session and that a reserve never holds one early.LaneGrant, the driver hook and the scheduler lease each have a unit test.bundle pullstill ignores the region allowlist (select_candidates_filtered) thatdecdn fetchhonours.Verification
cargo fmt -- --checkcargo clippy --workspace --all-targets -- -D warnings, pluscargo check -p decdn-e2e --features anvil-e2e --all-targetscargo nextest run --workspace: 4207 passedRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-itemsdecdn-client)CHANGELOG.mdentry addedappendix-bundles.mdupdated🤖 Generated with Claude Code