fix(simplefin): stop bare thank-you memos dropping purchases from spend - #180
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Replace the bare "thank you" Credit Card Payment substring with payment-shaped patterns so merchant thank-you purchase debits stay in spend totals. Fixes #179. Co-authored-by: Ossie Irondi <AojdevStudio@users.noreply.github.com>
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
thank you(for exampleTHANK YOU FOR SHOPPING…). Those purchase debits were classified asCredit Card Paymentand excluded viaNON_SPEND_CATEGORIES.thank youpattern with payment-shaped substrings in the sharedcategorize_expensepath so legitimatePAYMENT - THANK YOUcredits/debits still classify correctly.Concrete trigger and impact
Same failure class as the bare
credit cardsubstring fixed in #176; introduced on main by #176.Root cause and shared seam
CATEGORY_PATTERNS["Credit Card Payment"]matched bare"thank you"as a plain substring with no payment-shape requirement. All SimpleFIN expense sync callers go throughcategorize_expense, so the fix is at that shared pattern list.Test Plan
uv run pytest tests/python/test_categorize.py -q --no-cov— 92 passeduv run pytest -m "not integration" -q— 1188 passed, 1 skipped, coverage 83.41%uv run ruff format --check+uv run ruff checkon touched files — cleanuv run mypy src/— Success, 96 source filesOverlap check
Live open PRs at start and before open: none. Searched open/closed issues and PRs for
thank you/ categorize / Credit Card Payment; only related history is merged #176 (introducer). No open PR touchescategorize.py.Review Checklist
Wiki impact
Generated with Cursor; I reviewed, ran the tests, and verified behavior before submitting.