Repository navigation
ChunkerParams: reject buzhash params that do not fit the chunker buffer - #10597
Merged
ThomasWaldmann merged 1 commit intoNov 5, 2026
Merged
ThomasWaldmann merged 1 commit into
ThomasWaldmann merged 1 commit into
Conversation
Params like 10,12,11,4095 passed argument validation, but then crashed the buzhash Chunker with "AssertionError: too small max_size". Apply the same window_size + 2^chunk_min + 1 <= 2^chunk_max check that buzhash64 already has, so this is a normal argument error now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10597 +/- ##
==========================================
+ Coverage 89.35% 89.37% +0.01%
==========================================
Files 104 105 +1
Lines 20091 20335 +244
Branches 3154 3192 +38
==========================================
+ Hits 17953 18175 +222
- Misses 1481 1501 +20
- Partials 657 659 +2 ☔ View full report in Codecov by Harness. |
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.
Invalid buzhash chunker params, for example
10,12,11,4095, passed argument validation. They then crashed the buzhashChunkerwithAssertionError: too small max_size(see the assertion inchunkers/buzhash.pyx).The buzhash64 params branch already rejects such params, using
window_size + 2^chunk_min + 1 <= 2^chunk_max. This PR applies the same check to the plainbuzhashbranch, including the old-style 4-number compat form. Such params now give a normal argument error (rc 2):These params always crashed, so no working setup gets rejected. Tests cover two rejected cases and the exact boundary
10,13,11,4095, which is still accepted.1.4-maint backport: #10596
🤖 Generated with Claude Code