Skip to content

bundle pull: a resumed .partial prefix counts as downloaded/paid in entry lines and the summary #2236

Closed

Description

@yigitdot

Follow-up to #2189 / #2192. The #2192 fix (02d5151) split each entry's completion line into downloaded vs spliced and corrected the -v progress target, but it deliberately left one input in the paid tally — its own doc says so: the paid count "is not an exact on-wire measurement: bao proof overhead is not in it, and a .partial prefix resumed from an earlier run counts again." (Raised in #2189 (comment), which landed after the issue closed.)

Where the prefix leaks in (per the #2192 diff)

  • Range-dedup path: EntryBytes { paid: total.saturating_sub(outcome.spliced_bytes), .. } — the resumed prefix sits inside total − spliced, so it lands in paid.
  • Whole-blob path: paid is metadata(staging).len() — the file size, prefix included.
  • The run summary's downloaded aggregates the same values, while the PullReport doc defines it as "content bytes paid for" — the prefix was paid by the earlier run, not this one.

What #2192 DID fix for resume: the -v progress position/ETA. The prefix lands in the "present" side of range_set_reach, so mid-run lines are correct; only the completion line's downloaded figure/rate and the summary tallies overstate.

Measured example

Testnet, 2026-09-28: re-pull of metal/model.bin (baa10b83…) resumed a 1.46 GB .partial from an interrupted earlier run. Summary reported downloaded 9.7 GB; the actual new transfer was ~8.3 GB.

Suggested shape

paid = bytes fetched this run only, with the resumed prefix reported separately, exactly as spliced_bytes already is: … (7.7 GiB downloaded at R, 1.4 GiB resumed, 3.7 GiB spliced from disk), plus a resumed field in PullReport — and drop the "counts again" carve-out from the doc.

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    rust
    area:cli
    prio:low
    on Sep 29, 2026
  2. self-assigned this
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bugprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions