debug-finance

Installation
SKILL.md

Debugging finance-specific bugs in ledger-sync

The mental model

Most "wrong number" bugs in this codebase fit one of seven failure modes. Walk them in order — the cheap checks are first.

1. Stale V2 analytics (most common)

The dashboard reads pre-aggregated tables (monthly_summaries, daily_summaries, etc.) that get rebuilt on upload. If a user does anything that changes transactions outside the upload path (manual edit, settings change that affects classification), V2 doesn't refresh automatically.

Quick check:

SELECT MAX(updated_at) FROM monthly_summaries WHERE user_id = ?;
SELECT MAX(updated_at) FROM transactions WHERE user_id = ?;

If transactions are newer than summaries, V2 is stale.

Fix: call POST /api/analytics/v2/refresh for the user, or reproduce by re-uploading.

Installs
1
GitHub Stars
4
First Seen
10 days ago
debug-finance — sagargupta16/ledger-sync