Migrate sortedset - #96
Open
OutSquareCapital wants to merge 71 commits into
Open
OutSquareCapital wants to merge 71 commits into
OutSquareCapital wants to merge 71 commits into
Conversation
fix false positives
already available
OutSquareCapital
force-pushed
the
migrate-sortedset
branch
from
September 14, 2026 20:20
9718da7 to
52a32f9
Compare
and add note regarding current blocker
factorized the `ptr_eq` usage
file instead of bloating traits
- fixed incorrect handling of bisect methods for `SortedKeySet` - since `__reduce__` is not tested ATM, might as well delete it in the meantime, to simplify current work.
architecture: repr, bisect, etc...
all the traits to their respective, pertinent files
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.
Greptile Summary
The PR migrates sorted collections to shared Rust implementations and subsequently refines comparison, indexing, conversion, representation, and public API behavior.
sorted_rscrate.Confidence Score: 4/5
The PR is not yet safe to merge because self-referential sorted-set bulk updates can still deadlock.
The previous blocking finding remains unresolved:
updateanddifference_updateacquire the receiver mutex beforeIntoUpdate::into_setconsumes their arguments, while a sorted-set argument is converted into an iterator backed by the same mutex. Consequently, calls such assorted_set.update(sorted_set)andsorted_set.difference_update(sorted_set)can wait indefinitely on the non-reentrant lock.Files Needing Attention: src/collections/sorted/traits.rs, crates/sorted_rs/src/set.rs
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Python[Python sorted collection API] --> Traits[src/collections/sorted traits] Traits --> Lock[Shared Arc Mutex state] Lock --> SortedRS[crates/sorted_rs algorithms] SortedRS --> Storage[Chunked sorted values and indexes] SortedRS --> Builtins[Python set or dict backing storage]Reviews (2): Last reviewed commit: "refactor: inline more bisect logic in `b..." | Re-trigger Greptile