Skip to content

Route both sequence comparators through the hybrid index - #77

Merged
drametwally merged 1 commit into
mainfrom
cover-the-hybrid-with-both-sequence-comparators
Sep 21, 2026
Merged

drametwally merged 1 commit into
mainfrom
cover-the-hybrid-with-both-sequence-comparators

Conversation

@drametwally

Copy link
Copy Markdown
Collaborator

Found while re-deriving the search-test coverage matrix from the tree.

The hybrid structure was searched with ngld alone, so gld reached it only through
IndexPairingMatrixTest. That test asserts a row is found by its own record and that whatever
comes back carries the scan's similarity, but not that a merely similar row is found. The
hybrid prunes on the minimum similarity when it routes between its two halves, which is
exactly where the two sequence comparators differ, so ngld alone did not cover it.

theHybridStructureRoutesSequencesByTermCount now runs both comparators.

Parameterising it failed immediately on gld, which is the point: gld is not normalised, so
the fixed 0.8 minimum similarity that suited ngld admitted nothing at all. The threshold is
now taken from the brute-force scan, as the third highest similarity it finds, which is
comparator-agnostic and keeps the minimum-similarity routing path under test.

662 tests pass.

The hybrid was searched with ngld alone, so gld reached it only through the pairing matrix,
which asserts self-retrieval rather than recall. The test now runs both.

The minimum similarity it searches at is taken from the scan rather than fixed, since gld is
not normalized and one fixed number admits every row for one comparator and none for the
other.
@drametwally
drametwally merged commit b6f9ec0 into main Sep 21, 2026
3 checks passed
@drametwally
drametwally deleted the cover-the-hybrid-with-both-sequence-comparators branch September 21, 2026 01:11
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.

1 participant