Repository navigation
Conversation
OwnedMenu_RendersItsPinnedItems_OnEveryLexiconRowThatBindsOne failed intermittently on main (nightly and push runs): the two LexEntryReferences rows, "***" and "Antonym", came out swapped. DetailComposer lists an entry's relations in the order liblcm's LexEntryReferences yields them. That comes from a hash-keyed bag of incoming references whose hashes follow each relation's GUID, and the fixture creates its relations with fresh GUIDs on every run. Order the entry-relation rows by label before rendering, so the pinned outline no longer depends on GUIDs. The pin itself is unchanged, since "***" sorts before "Antonym". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment on WithEntryRelationsByLabel explained liblcm's hash ordering. Per the commenting standard it now gives only the reason: the relations' order varies between runs and the pin needs a fixed one. 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 @@
## main #1260 +/- ##
==========================================
- Coverage 40.41% 40.41% -0.01%
==========================================
Files 1597 1597
Lines 360490 360490
Branches 42176 42176
==========================================
- Hits 145696 145695 -1
Misses 185105 185105
- Partials 29689 29690 +1 🚀 New features to boost your workflow:
|
mark-sil
approved these changes
Nov 24, 2026
mark-sil
left a comment
Contributor
There was a problem hiding this comment.
Thank you for fixing this flaky test that I added!
thejambi
commented
Nov 24, 2026
thejambi
left a comment
Contributor
Author
There was a problem hiding this comment.
@thejambi reviewed 1 file and all commit messages.
Reviewable status: 0 of 1 files reviewed, all discussions resolved.
Contributor
Author
|
Already fixed in #1196 |
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.
LexiconMenuAuthorityTests.OwnedMenu_RendersItsPinnedItems_OnEveryLexiconRowThatBindsOnehas been failing intermittently on main: the nightly run on fae5de023 and the push run for #1255 both failed only this test, with the same mismatch. The test's two Lexical Relations rows,***andAntonym, came out swapped against the pinned outline. This change makes the test put those rows in a fixed order. It is test-only, with no product change.Reviewer notes
Root cause.
DetailComposer.GetLexicalRelationslists an entry's relations in the order liblcm'sLexEntryReferencesyields them. liblcm reads that from the entry'sm_incomingRefs, aSimpleBagbacked by aConcurrentDictionary, so the order is hash order. Each entry's hash is built from the relation object's hash, which follows its GUID. The fixture creates its relations with fresh GUIDs on every run, so their order is effectively random. In a real project the GUIDs persist, so the order is stable, if arbitrary.Deliberate rules.
OwnedMenuRows), not inDetailComposer. The WinFormsLexReferenceMultiSlicedoes not sort these rows either, and sorting them in the product would be a behaviour change outside this fix.LexEntryReferencesrows are reordered, and they stay in the positions they already hold; every other row keeps its composed order. They are ordered by label with an ordinal comparison, and***sorts beforeAntonym, soPinnedLexiconMenusis unchanged.Tests. All 27 tests in
LexiconMenuAuthorityTestspass, with comment and token hygiene clean. The fixed test passed 5 further runs against the same build.Manual tests. None; there is no user-visible change.
Out of scope. Other tests that read
LexEntryReferencesorder from fixture-created relations could flake the same way. I found none in this fixture; the other relation tests look rows up by hvo.🤖 Generated with Claude Code
This change is