Files
Hermes_rocket.chat_Plugin/plugin/archivar
Bernd (Hermes) cbe68efe58 fix(B-1): keyword_matcher Strategy 3 requires ALL keyword words to match
Strategy 3 (Fuzzy/Levenshtein) previously returned True if ANY single
keyword word matched ANY text word. For multi-word keywords like
'hermes-gateway', this caused false 100% matches when only 'hermes'
appeared in text like 'hermes deployment pipeline'.

Fix: ALL keyword words must find a fuzzy match in the text. Single-word
keywords still work (one word must match). Words shorter than
MIN_FUZZY_LEN that reach Strategy 3 cause the keyword to NOT match
(they were already checked by Strategy 1/2).

Added 5 unit tests:
- test_strategy3_multiword_all_words_match
- test_strategy3_multiword_only_one_word_matches (the B-1 scenario)
- test_strategy3_multiword_no_words_match
- test_strategy3_single_word_still_works (regression)
- test_strategy3_multiword_fuzzy_typo

Applied to both match_keyword() and match_keyword_with_stems().

Ref: Rainer's review .hermes/reviews/rainer/test-anpassung-2026-07-29.md
2026-07-29 11:02:16 +02:00
..