Summary
Nothing detects when charge records drift from their expected invariants (e.g. sums that must balance, statuses that must be consistent). Add a reconciliation routine that scans, detects drift, and reports it.
Why this matters
Silent drift in financial state compounds into real losses. A reconciliation pass turns invisible corruption into an actionable, tested signal.
Requirements
- Define the charge invariants that must always hold.
- Implement a bounded, idempotent scan that checks each invariant and collects violations.
- Emit a structured report (counts + offending ids + reason); never mutate silently.
- Expose it as a callable job with a summary result.
Technical guidance
- Keep the scan chunked and side-effect-free by default.
- Make invariants individually testable.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- Auto-remediation of drift
- Scheduling/cron wiring
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.
Summary
Nothing detects when charge records drift from their expected invariants (e.g. sums that must balance, statuses that must be consistent). Add a reconciliation routine that scans, detects drift, and reports it.
Why this matters
Silent drift in financial state compounds into real losses. A reconciliation pass turns invisible corruption into an actionable, tested signal.
Requirements
Technical guidance
Edge cases — each must have a test
Acceptance criteria
npm run lint,npm test, andnpm run buildall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.