Skip to content

test: post-commit hyphen BM25 regression coverage - #820

Open
danieljsmythe26 wants to merge 1 commit into
tobi:mainfrom
danieljsmythe26:test/fts-post-commit-regression
Open

test: post-commit hyphen BM25 regression coverage#820
danieljsmythe26 wants to merge 1 commit into
tobi:mainfrom
danieljsmythe26:test/fts-post-commit-regression

Conversation

@danieljsmythe26

Copy link
Copy Markdown

Summary

Adds regression tests for hyphenated git-hook terms like post-commit in BM25 search.

v1.0.0 stripped hyphens in sanitizeFTS5Term (post-commitpostcommit) 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

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.
@PowderAddicts

PowderAddicts commented Aug 6, 2026 via email

Copy link
Copy Markdown

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