[ledger] Sharing: only an explicit assignment shares a payment; budget.shared; v0.2.1 #3
Reference in New Issue
Block a user
Delete Branch "fix/explicit-sharing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A boundary bug that Fiscus's integration test found. A person whose only budget is a shared one (for example someone who just joined "Holiday") has it as their default budget. Their unassigned payments then counted as "in" it, so
shared_paymentwould have sent them to the other members.What changes
shared_paymentneeds an explicitpayment.assigned: the latest one on either half of a confirmed pair. Falling into a budget as the default never shares a payment.budget.sharedevent: a shared budget in a personal log, created there or joined. It behaves likebudget.created, but it is never the default budget. Unassigned spending therefore never shows under a budget other people see, even locally.Tests: 87 pass, 0 fail
Two new tests in
sharing:budget.sharedis never the default, an explicit assignment shares, and a secondbudget.sharedwith the same id is rejected.Self-review
EventBodygains a variant: Fiscus (the only user) must handlebudget.sharedwherever it matches events. Itsfiscus-syncwrites it on create and join.budget.createdor to any day-1 event: existing logs replay byte-identically, and the replay tests are unchanged and green.