Skip to content

fix(cli): measure bundle pull -v entry lines on downloaded bytes, not spliced ones - #2192

Merged
thiras merged 5 commits into
mainfrom
fix/2189-range-dedup-progress-reporting
Sep 28, 2026
Merged

thiras merged 5 commits into
mainfrom
fix/2189-range-dedup-progress-reporting

Conversation

@yigitdot

Copy link
Copy Markdown
Contributor

Closes #2189.

Problem

On a range-deduped entry, the two -v per-entry lines measured against the whole blob, so spliced bytes read as download:

  • drive_floor logged landed of <whole blob> and an ETA for whole - landed, although the drive never downloads the spliced ranges (36-minute ETA for a ~1 GiB download).
  • log_entry_done took its rate from the staging file length, spliced bytes included (60 MiB/s for a ~5 MiB/s link).

Fix

  • New decdn_client::range_set_reach(store, ranges): the position a range-set drive reaches once done (present content + the ranges' missing gaps), the same base + gaps drive_range_lanes reports progress against. drive_watched passes it to drive_floor as the line's denominator and ETA base (and to EntryStalled). The whole-blob multi-source path is unchanged.
  • pull_entry_untimed returns EntryBytes { paid, spliced }; the completion line takes its rate from paid and, on a dedup entry, reports the split:
    bundle pull: <hash>: 12.82 GiB in 217.5s (0.98 GiB downloaded at 4.6 MiB/s, 11.84 GiB spliced from disk)
    A plain entry's line has the same shape as before.

Reporting only. No billing or correctness effect.

Tests

  • range_set_reach_counts_present_plus_the_ranges_gaps (fresh / sub-range / overlapping / resumed prefix).
  • entry_done_line_*: plain rate, dedup split, zero-elapsed guard.
  • Public API snapshot updated.
  • cargo nextest run -p decdn-client -p decdn-cli: 1235 passed. Clippy --all-targets, fmt, and cargo doc -D warnings are clean.

🤖 Generated with Claude Code

… spliced ones (#2189)

The drive's -v progress line and ETA now measure against the position the
drive reaches (present + the range set's gaps, new
decdn_client::range_set_reach) instead of the whole blob, so a range-dedup
drive's ETA no longer counts the ranges it splices from disk.

The entry completion line takes its rate from the bytes the entry paid for
and reports spliced bytes separately.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 28, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…arget

Correct the range_set_reach doc (the drive still reports against
total_bytes), clarify the drive_floor target and entry-line docs, clamp
the logged position to the target so a re-delivered tail never reads
past 100%, name the hash in the target-sizing debug line, and pin
range_set_reach to the concurrent drive's final reported position.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-code-quality

github-code-quality Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

The overall line coverage in commit 3a1000b in the fix/2189-range-dedup... branch remains at 86%, unchanged from commit 8d27ddf in the main branch.

Show a line coverage summary of the most impacted files.
File main 8d27ddf fix/2189-range-dedup... 3a1000b +/-
crates/cli/src/.../bundle_pull.rs 77% 77% 0%
crates/cli/src/...mmands/fetch.rs 52% 52% 0%
crates/client/src/driver.rs 97% 97% 0%
crates/cache/src/engine.rs 94% 94% 0%
crates/incentiv...eth_identity.rs 98% 99% +1%

Updated September 28, 2026 01:37 UTC

@yigitdot
yigitdot requested review from thiras and removed request for thiras September 28, 2026 01:32
@thiras
thiras merged commit 02d5151 into main Sep 28, 2026
30 checks passed
@thiras
thiras deleted the fix/2189-range-dedup-progress-reporting branch September 28, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bundle pull -v: per-entry progress and completion lines count range-dedup spliced bytes as downloaded

3 participants