Skip to content

LT-22672: Cover the relevance rule with the most rows riding on it - #1145

Merged
thejambi merged 4 commits into
mainfrom
LT-22672-followup-relevance-tests
Sep 26, 2026
Merged

thejambi merged 4 commits into
mainfrom
LT-22672-followup-relevance-tests

Conversation

@thejambi

@thejambi thejambi commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds the one composer test that was missing for the field-relevance gate, raised by
@jasonleenaylor after #1135 merged.

MoStemMsa.IsFieldRelevant withholds Attaches to Categories (FromPartsOfSpeech)
unless the owning entry has a proclitic or enclitic allomorph. Morphology.fwlayout
declares that part visibility="always", so before the relevance gate landed the row
composed on every stem MSA. That makes it the gate's most visible consequence, and it
was the only one of its rules with no test.

The test bites

It is Jason's test, run and falsified rather than taken on trust:

Gate suppressed negative half fails, Expected: False, But was: True
Gate restored passes, and the positive control passes throughout

The positive control adds a proclitic allomorph and changes nothing else, so the same
row on the same object is shown to appear as well as to vanish.

Also

Two comments claimed more than the code does, and are corrected:

  • IsIrrelevantForObject described itself as the whole of SliceFilter.IncludeSlice.
    It implements one of that method's two gates.
  • That summary sat on _propsToMonitor, a field declared between it and the method it
    describes -- and which already carries its own comment where it is used. Moved onto
    IsIrrelevantForObject.
  • It also stated that the id/filter-list gate was not implemented. That reads as
    true only until LT-22802: Apply a tool's slice filter list in the Avalonia detail view #1146 lands it, and LT-22802: Apply a tool's slice filter list in the Avalonia detail view #1146 branched from a base without this comment,
    so it would not have corrected the claim. Saying which gate this one is leaves
    nothing to fall out of date, and the two can merge in either order. LT-22802 is
    still named: a Jira id is the pointer that keeps working.
  • The test fixture said it covered the remainder of the IsFieldRelevant overrides,
    which was untrue while this test was missing. It now names the one limb still
    uncovered: the InflectionClass case that withholds the row from a compound rule's
    left or right MSA.

Verification

No behaviour change -- one test and the comments around it.

Merged with main (8 commits) and re-verified, since a clean merge is not necessarily
a compiling one.

  • Full suite: 6220 run, 6157 passed, 62 skipped (TestCategory!=DesktopRequired)
  • build.ps1 -CommentHygiene -TokenHygiene clean
  • The one failure, AddAllomorphToEntryTest, passes on its own: the SLDR
    writing-system repository intermittently cannot write its cache directory during
    BackendProvider.EnsureWritingSystemsExist. Seen twice this week on unrelated
    tests, including a CI run that went green on a re-run.

The LexiconFirstSliceEditContextEdgeCaseTests teardown error in that run is
pre-existing and unrelated: Validate_WhitespaceOnlyLexeme_IsAnError stages an edit and
never commits or cancels it, so the unit-of-work write lock is still held when the cache
is disposed. git blame puts it in LT-22625 (#964). Nothing here touches that file.

🤖 Generated with Claude Code


This change is Reviewable

Raised by Jason on #1135, after the merge. MoStemMsa.IsFieldRelevant withholds
FromPartsOfSpeech ("Attaches to Categories") unless the owning entry has a
proclitic or enclitic, and Morphology.fwlayout:39 declares that part
visibility="always" -- so before the relevance gate the row composed on every
stem MSA, and now it disappears for every entry without a clitic. That is the
gate's most visible consequence and nothing pinned it.

The test is Jason's, run and confirmed to bite: suppressing the gate fails its
negative half with "Expected: False, But was: True", while the positive control
-- add a proclitic allomorph, change nothing else -- keeps passing.

Also corrects two comments that claimed more than the code does. The composer
implements the SECOND of SliceFilter.IncludeSlice's two gates; the first looks
the slice id up in the tool's filter list, and the id never reaches the
composer, so that half is LT-22802. The fixture summary said it covered the
remainder of the overrides, which was untrue while this test was missing, and
still excludes the InflectionClass limb that withholds the row from a compound
rule's left/right MSA.

xWorksTests filter Avalonia 1642 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   12m 47s ⏱️ + 4m 16s
6 267 tests +1  6 182 ✅ +1  85 💤 ±0  0 ❌ ±0 
6 276 runs  +1  6 191 ✅ +1  85 💤 ±0  0 ❌ ±0 

Results for commit 80bde0b. ± Comparison against base commit 9607242.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.99%. Comparing base (9607242) to head (80bde0b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1145   +/-   ##
=======================================
  Coverage   38.99%   38.99%           
=======================================
  Files        1520     1520           
  Lines      352711   352711           
  Branches    40681    40681           
=======================================
  Hits       137532   137532           
  Misses     185883   185883           
  Partials    29296    29296           
Files with missing lines Coverage Δ
Src/xWorks/Avalonia/Composer/DetailComposer.cs 70.24% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Zachary Burnham and others added 2 commits September 24, 2026 16:50
The summary described IsIrrelevantForObject but sat on _propsToMonitor,
a field declared between it and the method, which already carries its own
comment where it is used.

It also asserted that the other gate was absent and named it as tracked
elsewhere. That reads as true only until the other gate lands, and the
change that lands it branched from a base without this comment, so it
would not have corrected the claim. Saying which gate this one IS leaves
nothing to fall out of date; LT-22802 is still named, since a Jira id is
the pointer that keeps working.

Two uses of the banned word went with it, in this file and in the test
fixture's summary, along with the "legacy resolves no flid either" aside,
which describes this code's own behaviour perfectly well without it.

Comments only. DetailFieldRelevanceTests 4 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@thejambi
thejambi marked this pull request as ready for review September 24, 2026 22:21

@mark-sil mark-sil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mark-sil reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on thejambi).

@thejambi
thejambi merged commit 30564cc into main Sep 26, 2026
9 checks passed
@thejambi
thejambi deleted the LT-22672-followup-relevance-tests branch September 26, 2026 16:32
thejambi pushed a commit that referenced this pull request Sep 28, 2026
…-lists

Main now has #1145, which this branch also carried as its first commit.
Squash-merging gave it a different identity, so both files it touched
conflicted with that commit's own later edits there.

Resolved toward main, whose comments had been corrected, with one
change: the relevance doc named LT-22802 as covering the other gate.
This branch is that gate, so the doc now points at IsFilteredOutByTool,
in the same class. The fixture summary keeps its pointer to
DetailSliceFilterTests, where that gate is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants