Found probing a copy of the live SimpleFIN DB: 3 transactions were match_status='matched' with matched_bill_id=NULL. Bills are soft-deleted (retained for recovery), then the retention GC hard-deletes them past the 30-day window. transactions.matched_bill_id is ON DELETE SET NULL, so the purge nulled the pointer but left match_status='matched' — a limbo row excluded from spending/analytics (match_status != 'matched') yet attributed to no bill, silently dropping that spend. pruneSoftDeletedFinancialRecords now releases those matches back to 'unmatched' in the same transaction and self-heals pre-existing orphans; retention behaviour is unchanged. Verified on a live-DB copy (3→0 orphans, 0 transactions lost). Regression: 3 tests in backupAndCleanup.test.js. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| images | ||
| Authentik-Integration.md | ||
| CSRF-SPA-Setup.md | ||
| Engineering_Reference_Manual.md | ||
| Engineering_Reference_promp.md | ||
| QA_PLAN.md | ||
| RATE_LIMITING_ENHANCEMENT.md | ||
| ROADMAP_REDESIGN_PLAN.md | ||
| ROADMAP_UI_AUDIT.md | ||
| UI_IMPROVEMENTS.md | ||
| advisory_non_bill_transaction_filters_us_ms_5000.json | ||
| cents-migration-plan.md | ||
| merchant_store_match_us_nems_online_5k_v0_2.json | ||
| top_200_us_subscriptions.csv | ||
| top_200_us_subscriptions_researched_2026-06-06.json | ||