Repository navigation
Add characterization tests for StopWordList fold, order and RDB round trip - #10912
Merged
Merged
Conversation
…nd trip `StopWordList` has observable behaviour that no test pinned: case folding truncates a term at an embedded NUL and mangles invalid UTF-8 rather than rejecting it, the `INFO` field renders in lexicographic rather than insertion order, and an RDB save/load pair is expected to be an identity on both the stored key bytes and their order. The two folding tests assert that the add path and the lookup path transform a term identically, rather than asserting a predicted output, so they pin the property callers depend on without hard-coding the decoder's arbitrary mapping for invalid input. `testStopWordListRdbLoadTruncated` covers the load failure that happens after the list already holds an entry, which the existing `testStopWordListRdbLoadExceedsLimit` does not reach because it bails before allocating anything. Co-Authored-By: Claude Opus 5 <[email protected]>
`codespell` reads the two-byte prefix `"fo"` as a misspelling of `of`/`for`, failing the spellcheck job. Any proper prefix of the stored key demonstrates the same thing, and suppressing the word repo-wide would cost more than it buys. Co-Authored-By: Claude Opus 5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10912 +/- ##
==========================================
- Coverage 83.19% 82.21% -0.98%
==========================================
Files 608 632 +24
Lines 81025 82134 +1109
Branches 36273 37382 +1109
==========================================
+ Hits 67405 67528 +123
- Misses 13274 14260 +986
Partials 346 346
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
daxhuiberts
approved these changes
Aug 14, 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.

Describe the changes in the pull request
StopWordListbehaviours that callers rely on have no test pinning them. Case folding truncates a term at an embedded NUL and mangles invalid UTF-8 instead of rejecting it; thestop_wordsINFOfield renders in lexicographic rather than insertion order; and an RDB save/load pair is assumed to be an identity on both the stored key bytes and their order. Each of these could change silently today without a test failing.INFOordering, and two the RDB paths — a full round trip plus a truncated payload.Which additional issues this PR fixes
N/A
Main objects this PR modified
StopWordListcase folding — add path and lookup path asserted to transform a term identically, rather than against a predicted output.AddStopWordsListToInfo— first test to insert terms out of order, so the rendered order is now constrained.StopWordList_RdbSave/StopWordList_RdbLoad— round trip pinned on key bytes and order; a truncated payload covers the load failure that happens after the list already holds an entry.Mark if applicable
Release Notes