Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

feat: detect recurring subscription charges - #1046

Closed
Robertg761 wants to merge 1 commit into
rohitdash08:mainfrom
Robertg761:detect-recurring-subscriptions
Closed

feat: detect recurring subscription charges#1046
Robertg761 wants to merge 1 commit into
rohitdash08:mainfrom
Robertg761:detect-recurring-subscriptions

Conversation

@Robertg761

Copy link
Copy Markdown

/claim #109

Summary

  • Add a recurring-charge detection service that groups same-merchant/same-amount expenses, normalizes statement noise, infers daily/weekly/monthly/yearly cadence, and skips income or generated recurring rows.
  • Expose GET /expenses/recurring/detect with bounded min_occurrences and lookback_days query parameters.
  • Document the endpoint in README/OpenAPI and add regression coverage for candidate detection and generated-row exclusion.

Validation

  • . .venv/bin/activate && PYTHONPATH=packages/backend pytest packages/backend/tests/test_recurring_detection.py
  • . .venv/bin/activate && black --check packages/backend/app/services/recurring_detection.py packages/backend/app/routes/expenses.py packages/backend/tests/test_expenses.py packages/backend/tests/test_recurring_detection.py
  • . .venv/bin/activate && flake8 packages/backend/app/services/recurring_detection.py packages/backend/app/routes/expenses.py packages/backend/tests/test_expenses.py packages/backend/tests/test_recurring_detection.py
  • git diff --check
  • sh ./scripts/test-backend.sh tests/test_expenses.py could not run locally because Docker is not available (Docker is required to run backend tests.).

@Robertg761
Robertg761 requested a review from rohitdash08 as a code owner May 14, 2026 12:49
@Robertg761 Robertg761 closed this by deleting the head repository May 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant