Money import: on-budget to tracking transfers lose their Category; oracle misses Ready to Assign #955

Open
opened 2026-10-02 22:50:00 +00:00 by kayg · 0 comments
Owner

Found by the round-3 break-the-numbers review of #462 (2026-10-03)

Pre-existing (not introduced by the #462 branch): a budget-app (YNAB) transfer from an on-budget Account to a tracking Account loses its Category (crates/plugins/money/src/import.rs ~4404-4407 and ~370-374). The other importer adapter handles this case.

  • With month data in the export, a real budget is wrongly rejected (the Ready to Assign check fails).
  • Without month data, Available is too high after import.

Also from the same review (test gaps, P2):

  • A one-sided cash outflow posts to Uncategorized, overspends it and lowers next month's Ready to Assign; no test checks Ready to Assign or Available for that path (tests/import_review.rs ~1282, ~1400 check February Ready to Assign against itself; the property-test oracle checks neither Ready to Assign nor Available).
  • The property-test generator gives every transfer a unique amount, so legs never compete for a mate; it never generates Card or Tracking Accounts, API balances, month snapshots or deleted rows.

Review: ~/Developer/calternal-wt/rev2-money-ident/review-money-ident-r3.md on the build VM; summary on #462.

Fix

Keep the Category for on-budget → tracking transfers (match the other adapter), and extend the oracle to Ready to Assign and Available with generators for Card/Tracking Accounts, competing mates, API balances, month snapshots and deleted rows. Money rule: property tests and a separate break-the-numbers review before merge.

## Found by the round-3 break-the-numbers review of #462 (2026-10-03) Pre-existing (not introduced by the #462 branch): a budget-app (YNAB) transfer from an on-budget Account to a tracking Account loses its Category (`crates/plugins/money/src/import.rs` ~4404-4407 and ~370-374). The other importer adapter handles this case. - With month data in the export, a real budget is wrongly **rejected** (the Ready to Assign check fails). - Without month data, **Available is too high** after import. Also from the same review (test gaps, P2): - A one-sided cash outflow posts to Uncategorized, overspends it and lowers next month's Ready to Assign; no test checks Ready to Assign or Available for that path (`tests/import_review.rs` ~1282, ~1400 check February Ready to Assign against itself; the property-test oracle checks neither Ready to Assign nor Available). - The property-test generator gives every transfer a unique amount, so legs never compete for a mate; it never generates Card or Tracking Accounts, API balances, month snapshots or deleted rows. Review: `~/Developer/calternal-wt/rev2-money-ident/review-money-ident-r3.md` on the build VM; summary on #462. ## Fix Keep the Category for on-budget → tracking transfers (match the other adapter), and extend the oracle to Ready to Assign and Available with generators for Card/Tracking Accounts, competing mates, API balances, month snapshots and deleted rows. Money rule: property tests and a separate break-the-numbers review before merge.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#955
No description provided.