Skip to content

Bug: companies frequently misclassified as persons in donor table #46

Description

@mahsa7haft

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions