Skip to content

fix(search): --discover joins only lettered hyphenated words, never a field value - #2972

Merged
leemour merged 1 commit into
mainfrom
fix/hyphen-join-letters
Nov 14, 2026
Merged

leemour merged 1 commit into
mainfrom
fix/hyphen-join-letters

Conversation

@leemour

@leemour leemour commented Nov 14, 2026

Copy link
Copy Markdown
Member

Task

Follow-up to #2959, found by tg-cli's search-adoption test while bumping tg to 0.664.0.

Why

joinedHyphens matched any hyphenated run of letters or digits, so date:2026-10-08 in a --discover question added the term 20261008. No message holds it, so the hit's coverage dropped from 1 to 0.8 and missingTerms named a word the owner never typed.

What

  • Only words with a letter on both sides of each hyphen are joined, and never right after a : (a field's value).
  • Test: a dated question keeps coverage 1 (fails without the fix).
  • Fragment changes/fix-hyphen-join-letters.md.

Testing

vitest run src/services src/search: 2,202 passed. Typecheck, biome. tg-cli's search-adoption test is the one that caught it; it passes on the bump once this is released.

🤖 Generated with Claude Code

… field value

0.664.0 (#2959) also joined date:2026-10-08 into the term 20261008, so a
dated question reported coverage 0.8 instead of 1; tg-cli's search
adoption test caught it on the bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 58590d0 into main Nov 14, 2026
43 checks passed
@leemour
leemour deleted the fix/hyphen-join-letters branch November 14, 2026 12:56
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