Problem
Many donor entries that are clearly companies are being classified as persons in the interests table and donor badges. This causes them to get the person silhouette badge instead of a company logo/initials badge.
Likely causes
- Company name patterns not matching the regex suffixes (Ltd, Limited, PLC etc.)
- Titled donors (Lord, Sir, etc.) being treated as persons even when they are known company owners
- Edge cases in the
_classify_donor() logic in card.py
Impact
- Wrong badge type shown on card
- Wrong classification shown in interests table
- Claude Haiku may not be being triggered correctly to resolve person → company links
Investigation needed
- Review
_COMPANY_SUFFIXES regex for gaps
- Check examples of misclassified donors and identify the pattern
- Verify the DB lookup and fuzzy match threshold for
donor_company_links
Problem
Many donor entries that are clearly companies are being classified as persons in the interests table and donor badges. This causes them to get the person silhouette badge instead of a company logo/initials badge.
Likely causes
_classify_donor()logic incard.pyImpact
Investigation needed
_COMPANY_SUFFIXESregex for gapsdonor_company_links