Repository navigation
refactor(client): splice bundle donors into an assembly file, not the store - #2945
Merged
Merged
Conversation
… store A dedup entry splices its donor bytes into `<hex>.assembly` beside its staging file. The ranged store's `.partial` holds only bao-verified bytes from paid legs. Before the whole-file BLAKE3, the store's present ranges are copied over the splices, so a verified byte always wins over a spliced one at the same offset. On a match the assembly is promoted and the store removed. This is step 1 of moving the client store onto iroh-blobs (#2881): an iroh-blobs store only takes bytes with a bao proof, and a donor has none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 5 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This was referenced Nov 23, 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.
Step 1 of moving the client store onto iroh-blobs (#2881). An iroh-blobs store only takes bytes that come with a bao proof, and a bundle donor has none. This change makes the ranged store hold only bao-verified bytes, on today's store, before the swap.
What changes
<hex>.assemblybeside its staging file instead of into the store's.partial..partial+.partial.ranges) is removed. On a mismatch the self-heal re-drive is unchanged.remove_stagingand the CLI's leftover scan know the new name.ensure_partialgoes away: with no splices in the store, a later drive can no longer truncate spliced bytes.Behavior difference
A donor whose own chunk verifies but whose placement in this entry is wrong, over a range the store already holds, no longer triggers a whole-blob re-drive. The store's bytes overwrite it and the hash matches.
Tests
spliced_bytes_never_enter_the_store(an interrupted entry leaves no donor byte in.partial) andverified_store_bytes_win_over_a_spliced_byte(no self-heal re-drive; assembly promoted; store removed).RecordingDrivernow admits real bao into the store, so the record names driven ranges present, as a real drive does.cargo nextest run -p decdn-client -p decdn-cli: 2566 passed. Workspace clippy (--all-features) and workspacecargo docclean.🤖 Generated with Claude Code