Skip to content

Conversation

@jjmata
Copy link
Collaborator

@jjmata jjmata commented Nov 16, 2025

Summary

  • ensure family reset clears recurring transactions along with other data
  • add manual recurring fixture to cover non-merchant recurring data
  • extend family reset job test to verify recurring transactions are removed

TODO

  • remove SimpleFIN connection and accounts
  • remove Lunch Flow connection and accounts
  • remove (all) merchants - ProviderMerchant is not cleared, should it?
  • remove enrichments
  • add more tests

Testing

  • bin/rails test test/jobs/family_reset_job_test.rb

Codex Task

Summary by CodeRabbit

  • Bug Fixes
    • Recurring transactions are now properly removed when performing a family account reset, ensuring complete data cleanup during the reset process.

@jjmata jjmata added the codex Touched by OpenAI Codex somehow label Nov 16, 2025 — with ChatGPT Codex Connector
@cursor
Copy link

cursor bot commented Nov 16, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 15.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@coderabbitai
Copy link

coderabbitai bot commented Nov 16, 2025

Walkthrough

This PR adds recurring transaction cleanup to the family reset process by destroying all recurring transactions during reset. Supporting changes include a new test fixture entry and updated test assertions to verify the cleanup behavior.

Changes

Cohort / File(s) Summary
Family Reset Job
app/jobs/family_reset_job.rb
Adds a destruction step for recurring transactions within the family reset process to ensure they are cleaned up alongside other family data.
Test Fixture
test/fixtures/recurring_transactions.yml
Introduces a new manual_subscription fixture entry with complete recurring transaction attributes (family, amount, currency, expected_day_of_month, status, etc.) for test purposes.
Test Verification
test/jobs/family_reset_job_test.rb
Adds initialization of initial_recurring_count, assertion that count is greater than 0 before reset, and verification that count reaches 0 after reset.

Sequence Diagram

sequenceDiagram
    participant Test as Test Suite
    participant Job as FamilyResetJob
    participant Family as Family
    participant RT as RecurringTransactions

    Test->>Job: perform(family_id)
    activate Job
    Job->>Family: retrieve family
    Note over Job: Existing cleanup steps
    Job->>RT: destroy all
    activate RT
    RT-->>Job: destroyed
    deactivate RT
    Job-->>Test: reset complete
    deactivate Job
    Test->>Family: verify count = 0
    Note over Test: Assertions confirm<br/>cleanup success
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Straightforward addition of a single destructive operation to an existing job
  • New fixture follows established patterns with no structural complexity
  • Test assertions are standard and verification logic is clear

Possibly related PRs

Poem

🐰 When families reset their tale anew,
The recurring cycles must vanish too!
Fresh starts bloom as transactions depart,
Each reset brings a cleaner heart. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Reset account completeness' is vague and generic, using non-descriptive language that doesn't convey the specific change of ensuring recurring transactions are cleared during family reset. Consider a more specific title like 'Clear recurring transactions in family reset' that precisely describes the main change being implemented.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/fix-reset-function-to-delete-recurring-transactions

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jjmata jjmata changed the title Remove recurring transactions during account reset Reset account completeness Nov 16, 2025
@jjmata jjmata self-assigned this Nov 16, 2025
@jjmata jjmata marked this pull request as draft November 16, 2025 21:27
@jjmata jjmata added this to the v0.6.6 milestone Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Touched by OpenAI Codex somehow

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants