Skip to content

Comments

Fix stable GAF sorting#4835

Merged
jltsiren merged 2 commits intomasterfrom
fix-stable-gaf-sorting
Feb 20, 2026
Merged

Fix stable GAF sorting#4835
jltsiren merged 2 commits intomasterfrom
fix-stable-gaf-sorting

Conversation

@jltsiren
Copy link
Contributor

Changelog Entry

To be copied to the draft changelog by merger:

  • Stable GAF sorting is actually stable.

Description

While trying to get Claude convert the GAF sorting code to Rust, I discovered that the merges are not stable. Records from the input files are inserted into a max heap by (flipped key, source index), which should be (flipped key, flipped source index) to maintain the existing order. This PR fixes the issue and adds some tests for stable sorting.

@jltsiren jltsiren merged commit 53471e6 into master Feb 20, 2026
2 checks passed
@jltsiren jltsiren deleted the fix-stable-gaf-sorting branch February 20, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants