[ledger] Shared projects: project.shared and project.unshared, one budget at a time; v0.8.0 #10

Manually merged
mnovak merged 1 commits from feature/shared-projects into main 2026-11-16 03:17:56 +01:00
Owner

Step B (core) of Fiscus's PLAN-shared-payments-projects.md: a project can be shared with the members of a shared budget.

What changes

  • project.shared { project, budget } and project.unshared { project } in fiscus-ledger. Projects.shared maps a project to its budget and is #[serde(default)], so a state saved before this version still reads.
  • Checks: the project must exist, the budget must exist, and a project is shared with one budget at a time; unsharing needs a shared project. A project can be shared again later, with another budget.
  • docs/06_projects.md gets both events. The version is 0.8.0.

How the app uses it (Fiscus, next PR)

Fiscus mirrors the shared parts (name, dates, status, lines, phases, tasks) through the budget's log, using the existing project.* and task.* events; for each item the newer change wins. Each member's own ledger holds the project, so the existing checks keep working, for example time is logged only on a task the ledger has. Time, invoices and project rules never leave a ledger. Payments go into a shared project through the budget's log, where payment.projected already needs the payment to be in that log.

Self-review

  • The core stays pure: no I/O, no clock; the mirroring is the app's.
  • No amounts are involved; nothing touches Haler.
  • Every refusal is tested and changes nothing, using the file's refusal() helper. The wire names and the old-state read are tested too.
  • cargo test --workspace passes and cargo clippy --workspace --all-targets is clean.
Step B (core) of Fiscus's PLAN-shared-payments-projects.md: a project can be shared with the members of a shared budget. ## What changes - `project.shared { project, budget }` and `project.unshared { project }` in `fiscus-ledger`. `Projects.shared` maps a project to its budget and is `#[serde(default)]`, so a state saved before this version still reads. - Checks: the project must exist, the budget must exist, and a project is shared with one budget at a time; unsharing needs a shared project. A project can be shared again later, with another budget. - `docs/06_projects.md` gets both events. The version is 0.8.0. ## How the app uses it (Fiscus, next PR) Fiscus mirrors the shared parts (name, dates, status, lines, phases, tasks) through the budget's log, using the existing `project.*` and `task.*` events; for each item the newer change wins. Each member's own ledger holds the project, so the existing checks keep working, for example time is logged only on a task the ledger has. Time, invoices and project rules never leave a ledger. Payments go into a shared project through the budget's log, where `payment.projected` already needs the payment to be in that log. ## Self-review - The core stays pure: no I/O, no clock; the mirroring is the app's. - No amounts are involved; nothing touches `Haler`. - Every refusal is tested and changes nothing, using the file's `refusal()` helper. The wire names and the old-state read are tested too. - `cargo test --workspace` passes and `cargo clippy --workspace --all-targets` is clean.
mnovak added 1 commit 2026-11-16 03:17:44 +01:00
mnovak manually merged commit c6805aea8f into main 2026-11-16 03:17:56 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/FiscusPublic#10