Fix contacts matcher: full-number (15-digit) matching, junk-name guard

- Index by full E.164 digits instead of last-9 only; previously different
  people sharing a 9-digit suffix collided and lookups returned the wrong
  name. Resolve now tries longest match first.
- match_digits default 9 -> 15 in code and example config.
- Skip emoji/punctuation-only contact names so a junk card can't shadow a
  real one when a number is duplicated in the export.
- Verified: 513 contacts self-consistent; 6 remaining collisions are genuine
  duplicate entries in the source VCF (two cards, same number), not a matcher
  error.

Also: placed /home/jp/contacts.vcf at /var/lib/vm-transcribe/contacts.vcf
(640 asterisk:asterisk), set backends=file, cleared stale cache, restarted
vm-portal.
This commit is contained in:
jp
2026-08-13 11:13:12 +01:00
parent 857284abbf
commit 21dc883e99
2 changed files with 50 additions and 6 deletions

View File

@ -24,7 +24,7 @@ cache_ttl = 86400
# Match on the last N digits of the number, so +447941223856,
# 07941223856 and 447941223856 all resolve to the same contact.
# 9 is a sane default for UK/US. Lower it only if you get misses.
match_digits = 9
match_digits = 15
# ---------------------------------------------------------------------------