fix(types/address): correct sort comparator in Compose to satisfy strict weak ordering#25944
Merged
aljo242 merged 11 commits intocosmos:mainfrom Apr 27, 2026
Merged
fix(types/address): correct sort comparator in Compose to satisfy strict weak ordering#25944aljo242 merged 11 commits intocosmos:mainfrom
aljo242 merged 11 commits intocosmos:mainfrom
Conversation
…ict weak ordering
Contributor
|
@songgaoye is there a test we can include to validate this behavior and can we add a changelog entry? |
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25944 +/- ##
==========================================
- Coverage 64.86% 64.83% -0.03%
==========================================
Files 890 874 -16
Lines 58581 57601 -980
==========================================
- Hits 37997 37346 -651
+ Misses 20584 20255 -329
🚀 New features to boost your workflow:
|
aljo242
requested changes
Mar 24, 2026
Contributor
aljo242
left a comment
There was a problem hiding this comment.
Could we add tests for the Compose function itself?
aljo242
approved these changes
Apr 27, 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.
Description
The Compose function used
<= 0in its sort comparator, which violates thestrict weak ordering requirement of sort.Interface. When comparing equal
elements, both less(i,j) and less(j,i) would return true, violating the
antisymmetry property.
Closes: #XXXX