Two new test files lock in the matching boundary where free-text LLM
hints meet the user's actual workspace data — that's where bugs hide
silently. Both matchers are now pure-function-shaped (the production
wrappers just feed them Dexie data) so the tests run without
fake-indexeddb or any I/O.
todo: 16 cases for matchLabelsToTagsPure covering exact / case /
diacritic / substring / specificity rules + the "never invent tags"
guarantee.
habits: 11 cases for matchHabitToTranscript including the word-
boundary "Bier vs ausprobiert" false-positive, multi-word matching,
and a real bug the test surfaced on the first run:
Without specificity ranking, "Tee" would always beat "Grüner Tee"
because the first matching habit in input order won. The matcher
now collects all candidates and returns the one with the most
matched tokens, so multi-word habits beat single-word substrings
whenever both could fit the transcript.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>