test: post-commit hyphen BM25 regression coverage - #820
Open
danieljsmythe26 wants to merge 1 commit into
Open
Conversation
Documents the v1.0.0 failure mode where sanitizeFTS5Term stripped hyphens (post-commit → postcommit) while FTS5 unicode61 indexes the body as adjacent post + commit tokens, zeroing strict-AND multi-term queries.
|
Dear tobi/qmd,
We would like to acknowledge that we have received your request and a ticket has been created.
A support representative will be reviewing your request and will send you a personal response.(usually within 24-48 hours).
Thank you for your patience.
…On Thu, Aug 06 2026, at 01:38 PM, tobi/qmd ***@***.***> wrote:
Summary
Adds regression tests for hyphenated git-hook terms like post-commit in BM25 search.
v1.0.0 stripped hyphens in sanitizeFTS5Term ( post-commit → postcommit) while FTS5 unicode61 indexes body text as adjacent post + commit tokens. Strict-AND multi-term queries then returned zero hits even when vsearch found the doc.
The lexer fix landed in 2.5+ ( isHyphenatedToken / sanitizeHyphenatedTerm); these tests lock the behaviour so it does not regress.
Test plan bun test test/structured-search.test.ts -t post-commit bun test test/store.test.ts -t post-commit
Made with Cursor (https://cursor.com) You can view, comment on, or merge this pull request online at: #820 (#820) Commit Summary d17da6d test: add post-commit hyphen BM25 regression coverage (d17da6d) File Changes
( 2 files) (https://github.com/tobi/qmd/pull/820/files) M test/store.test.ts
(29) (https://github.com/tobi/qmd/pull/820/files#diff-ecc9e7b9a74de1ebac3cd3038ffc91cd42684ca2890738d3b93139c723c36407) M test/structured-search.test.ts
(10) (https://github.com/tobi/qmd/pull/820/files#diff-8b092164bebd5b67b3ee6cfa446874cfbd042ab694d8b35155dc7058a561a490) Patch Links: https://github.com/tobi/qmd/pull/820.patch (https://github.com/tobi/qmd/pull/820.patch) https://github.com/tobi/qmd/pull/820.diff (https://github.com/tobi/qmd/pull/820.diff)
—
Reply to this email directly, view it on GitHub, or (#820?email_source=notifications&email_token=BRF3HG3QH7B7DSOF46MXDF35ISC3RA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DEMRRGM2DQOJWHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW) unsubscribe. (https://github.com/notifications/unsubscribe-auth/BRF3HGZLB3CZNXWDM4YFGBT5ISC3RAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMJSGM3DKMZQGE5US43TOVSTWNJQHAYTOMJVGMYTNILWAI)
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and (https://github.com/notifications/mobile/ios/BRF3HGYZENBBRM2R4NTF5GD5ISC3RA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DEMRRGM2DQOJWHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM) Android. Download it today! (https://github.com/notifications/mobile/android/BRF3HG4SPQAGBAO7BJ2VP3D5ISC3RA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DEMRRGM2DQOJWHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE)
You are receiving this because you are subscribed to this thread. Message ID: <tobi/qmd/pull/820 @ github . com> [
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#820?email_source=notifications\u0026email_token=BRF3HG6TSTEH72NBF52CPCT5ISC3RA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DEMRRGM2DQOJWHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVNTW2YLJNRPWG3DJMNVQ",
"url": "#820?email_source=notifications\u0026email_token=BRF3HG6TSTEH72NBF52CPCT5ISC3RA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DEMRRGM2DQOJWHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVNTW2YLJNRPWG3DJMNVQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
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.
Summary
Adds regression tests for hyphenated git-hook terms like
post-commitin BM25 search.v1.0.0 stripped hyphens in
sanitizeFTS5Term(post-commit→postcommit) while FTS5unicode61indexes body text as adjacentpost+committokens. Strict-AND multi-term queries then returned zero hits even when vsearch found the doc.The lexer fix landed in 2.5+ (
isHyphenatedToken/sanitizeHyphenatedTerm); these tests lock the behaviour so it does not regress.Test plan
bun test test/structured-search.test.ts -t post-commitbun test test/store.test.ts -t post-commitMade with Cursor