All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
TransferBuilder::reference(..), which writes a caller-supplied reference
under the reserved REFERENCE_KEY metadata key. A transfer's id is the hash
of its content, so a transfer that consumes nothing (a deposit, an issuance)
cannot distinguish itself from an identical earlier one and the second commit
is reported as a replay. Setting a distinct reference makes two real deposits
two transfers; repeating one keeps a retry idempotent. See
doc/transfers.md.Arc. commit, commit_envelope,
reverse, the inflight entry points and workflow::run_transfers take
&self, so Ledger::new(store) is usable directly; an Arc<Ledger> still
derefs, so sharing stays available to callers who want it. (breaking only
for code naming the receiver type) (ADR-0026)EnvelopeId is TransferId and EnvelopeRecord is TransferRecord, so the
public surface speaks of transfers throughout. Envelope, EnvelopeBuilder
and commit_envelope keep their names as the resolved form. Nothing stored
changes: no migration, no content address and no dedup key moves.
(breaking) (ADR-0026)Ledger::compute_balance is balance_exact, beside balance, so a call site
says whether it took the cached read or the authoritative one. (breaking)
(ADR-0026)Ledger::with_snapshot_interval and with_projection_grace_ms become one
with_projection_config(ProjectionConfig { .. }). (breaking) (ADR-0026)kuatia::saga is now kuatia::workflow, and run_movements is
run_transfers, taking the transfers themselves. Its own Movement,
PayInput and DepositInput described legs it then rebuilt with
TransferBuilder, and that Movement shadowed kuatia_types::Movement.
(breaking)ValidationError::OverdraftExceeded no longer carries a floor field. The
balance model is binary (an account either permits unbounded overdraft or
forbids any negative balance), so the floor was always zero and implied a
configurable bound that does not exist. (breaking for callers matching on the
variant)TransferBuilder::movement_ref and pay_ref. Both pushed the same Movement
as movement and pay: ADR-0012 meant them for subaccount endpoints, but
every endpoint is a full AccountId already. (breaking) (ADR-0026)Ledger::append_cache_point moves to ledger.projection().append_cache_point(..),
since it maintains the balance cache rather than reading a balance.
(breaking) (ADR-0026)PostingState::Reserved, PostingFilter::{Active, Reserved},
ReservationId and TransitionId are gone, and live_postings.reservation is
dropped by migration 012_drop_reservation. A posting is live or spent, with
nothing in between. (breaking: PostingState::Active is now Live, which
also changes its serde representation, and the dashboard reports a posting's
status as "Live" rather than "Active") (ADR-0025)Store write methods: reserve_postings, release_postings,
deactivate_postings, insert_postings, append_account_version and
store_transfer. Nothing called them, and because Ledger::store() returns
the trait they were a public route to spend a posting or append a version while
skipping the guards the commit transaction enforces. CommitStore is now the
only way either is written. (breaking for out-of-tree backends) (ADR-0025)AccountId gains a subaccount leg ({ id, sub }), so several
independent balances live under one owner, each individually addressable,
drained, and closed. Aggregate reads take a base id plus an optional
subaccount filter; exact operations take the full AccountId; balances are
never summed across subaccounts. (ADR-0012)AccountId has a fixed 20-character
Display/FromStr form (a base-36 body plus two mod-97 check digits) for
presentation and routing, while storage keeps the two integer legs. (ADR-0015)SagaStore::get_saga, a keyed read for a single write-ahead record, so
recovery no longer scans every pending record.FOR UPDATE and ON CONFLICT paths)
and runs the test suite with the i128 Cent backing.Store write method returns the number of
affected rows and makes no domain decision. The saga interprets counts and
owns idempotency and compensation, with a phase-tracked write-ahead record and
roll-forward crash recovery in place of a monolithic commit transaction.
(ADR-0003) (breaking for Store implementors)DEBIT_MUST_NOT_EXCEED_CREDIT flag; overdraft is allowed by default. (ADR-0018)Ledger was split into concern-named submodules; the
commit-safety invariant is documented and its double-spend guard named
(ADR-0021); the write-ahead recovery record was concentrated into one
pending module; balance computation was consolidated into one module.UserData type and the orphaned withdraw saga step. (breaking)doc/journaling.md and ADR-0013, and notes it in the README overview.kuatia-dashboard: a server-rendered dashboard and REST API for observing a
Kuatia ledger over HTTP. Browse accounts, postings, transfers, and the event
log; inspect per-account balances computed in Rust.001_init.sql.Initial release.
sum(consumed) ==
sum(created)).pay, deposit, withdraw) resolved into concrete
postings by the core, committed through a single reserve → finalize saga
with automatic retry and LIFO compensation.NoOverdraft, CappedOverdraft, UncappedOverdraft,
SystemAccount, ExternalAccount, with append-only versioned accounts and
snapshot pinning to guard against TOCTOU races.Ledger::recover() (roll-forward, not rollback).Store trait split into focused sub-traits, with an in-memory
backend and a SQLite/PostgreSQL backend (kuatia-storage-sql).store_tests!) applied to every storage backend.i64 IDs generated in Rust; the database never assigns IDs.i64 default, i128 via the
i128 feature).kuatia-money — monetary Cent type with swappable integer backing.kuatia-types — domain types: accounts, postings, transfers, books.kuatia-core — pure, sans-IO logic: validation, hashing, posting selection.kuatia-storage — storage abstraction and conformance suite.kuatia-storage-sql — SQLite/PostgreSQL backend.kuatia — async Ledger resource and saga commit pipeline.