Skip to content

fix(#127): stamp filename on CC transactions before card grouping#128

Merged
longieirl merged 1 commit intomainfrom
fix/cc-transactions-missing-filename
Apr 9, 2026
Merged

fix(#127): stamp filename on CC transactions before card grouping#128
longieirl merged 1 commit intomainfrom
fix/cc-transactions-missing-filename

Conversation

@longieirl
Copy link
Copy Markdown
Owner

Summary

Closes #127

  • In _build_grouping_inputs(), backfill tx.filename from extraction.source_file.name for any CC transaction with an empty filename before extending all_cc_txns
  • Prevents CCGroupingService from falling back to 'unknown' when pdf_card_numbers.get(tx.filename) returns None

Test plan

  • Existing tests pass
  • Paid-tier integration snapshot: bank_statements_unknown.* files gone; bank_statements_9459 row count increases from 15 → 22 (7 previously misrouted transactions now correctly attributed)

CC transactions with empty tx.filename could not be looked up in
pdf_card_numbers, causing CCGroupingService to bucket them under
'unknown'. Backfill tx.filename from extraction.source_file.name
in _build_grouping_inputs() before extending all_cc_txns.
@github-actions github-actions bot added the bug Something isn't working label Apr 9, 2026
@longieirl longieirl merged commit 8a50946 into main Apr 9, 2026
11 checks passed
@longieirl longieirl deleted the fix/cc-transactions-missing-filename branch April 9, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: CC transactions missing filename cause unknown grouping in CCGroupingService

2 participants