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.
Unreleased
0.6.0 - 2026-07-02
Ecto storage, native queries, Datalog removal, anti-pattern fixes.
Added
- Ecto-based storage: SQLite (
:memory:) default, SQLite file for persistence. - Ecto schemas for all 17 directive tables (
Beancount.Schemas.*;PostingandCostSpecare embedded). Beancount.StorageAPI:store/1,load/0,clear/0,import_file/1,export_file/1.Beancount.Queriesmodule: Ecto.Query-based ad-hoc queries against stored directives (list_opens/1,find_transactions/1,count_by_type/0, etc.).Beancount.Repowith auto-migration on startup.- Guides:
storage.md,queries.md.
Removed
Beancount.BQL(parser and AST) — BQL remains viaEngine.CLI(bean-query).Beancount.Engine.Elixir.QueryEngine(3-shape string dispatcher) — replaced by explicit canned-query mapping inReports.Beancount.Engine.Elixir.FactBase,Index,CompiledLedger— replaced by Ecto.Repo and database tables.nimble_parsecdependency — lexer uses regex only.- All "Datalog" terminology and claims.
- Guides:
query_engine.md,directive_compiler.md(replaced byqueries.mdandstorage.md).
Changed
Engine.Elixir.query/2runs canned reports via the booking engine. Arbitrary BQL is not supported natively; useEngine.CLIfor BQL.Reportsmodule rewritten: explicit canned-query dispatch instead of BQL string matching.DirectiveSort.merge_by_file_index/2rewritten as single-pass O(n+m) merge.format_decimal/1consolidated to useRenderer.format_decimal/1.
Fixed
- H-4:
check/1doc example fixed. - M-3:
cli.exmoduledoc updated. - M-4: Repo URLs consolidated.
- L-4:
FakeEngine.query/2records calls. - L-5:
beancount.exmoduledoc updated. - N-2:
querying.md"future native engines" phrasing fixed. - AP-4: 12 inline stub modules extracted to
test/support/compare_stubs.ex. - AP-5: Lexer dual regex + NimbleParsec paths consolidated to regex only.
- AP-6: DirectiveSort O(n*m) merge replaced with O(n+m) single-pass merge.
- AP-7:
format_decimal/1duplication consolidated. - T-4: Removed self-comparison test.
- T-5: Fixed stale "v0.3 parity contract" test name.
- T-8: Added position-cell normalization tests.
- T-9: Added pad + cost-basis interaction test.
- Native
Ledgernow processes dated directives in Beancount date order (entry_sortkey) instead of source-file order, closing thebalance_failedgap on vendoredexample.beancount. DirectiveSortinterleavespushtag/poptagat source-file positions while sorting dated entries chronologically.Comparenormalizes position cells by merging lots at the same cost, trimming zero balances, and normalizing plain commodity amounts (e.g.-53000.00 IRAUSDvs-53000 IRAUSD).Compareno longer treats one-sided uncategorized errors as equivalent (M-2).compare/3on vendoredexample.beancountis equivalent (M-1).- Holdings
cost()output rounds to two decimal places, matchingbean-query.
0.5.0 - 2026-06-30
Native BQL parser, directive compiler, and native query evaluation.
Added
Beancount.BQL- parse and evaluate Beancount Query Language strings.- Directive compiler:
FactBase,Index(ETS),CompiledLedger,QueryEngine. - Guides:
query_engine.md,directive_compiler.md. - BQL parity tests (tagged
:beancount) andbench/compiler_bench.exs. - Coveralls.io integration in CI.
Changed
Engine.Elixir.query/2evaluates arbitrary supported BQL natively (replaces hardcoded canned-query map).- Reconciliation test documents known
balance_failedgap onexample.beancountinstead of a skipped equivalence test.
0.4.0 - 2026-06-30
Full native booking parity, reconciliation harness, and performance benchmarks.
Added
- Native booking engine (
Inventory,Booking,Lot) with FIFO, LIFO, STRICT, AVERAGE, and NONE methods. - Balance assertion evaluation with tolerance inference (
BalanceCheck,Tolerance). - Pad resolution (
PadResolver) with per-account pending pads. - Option processing (
Options) for tolerance and operating currency settings. - Error category normalization in
Beancount.Compare.compare/3. - Reconciliation harness: vendored
example.beancountandtest/beancount/reconciliation_test.exs. - Benchmarks under
bench/and guides:booking.md,reconciliation.md,performance.md. - Parser support for org-mode headers, multiline
querystrings, and hyphens in account names.
Changed
- All 30 golden fixtures pass
compare/3as{:ok, :equivalent}. Ledgerprocesses directives in date order with point-in-time open/close checks.compare/3skips canned queries when both engines agree on equivalent check errors; no more:deferredreturn value.
0.3.0 - 2026-06-30
Native parser, Elixir engine, and oracle comparison.
Added
Beancount.Parserwith full Beancount grammar coverage (NimbleParsec).- Public parse API:
parse/1,parse_text/1,parse_file/1,parse!/1. - New directives:
Query,Plugin,PushTag,PopTagwith constructorsquery_directive/3,plugin/2,push_tag/1,pop_tag/1. Beancount.Engine.Elixir: native structuralcheck/1and cannedquery/2.Beancount.Compare.compare/3andBeancount.Property.Difffor oracle ↔ native equivalence within the v0.3 parity contract.- Guide:
guides/parsing.md.
Changed
Beancount.Property.compare/3replaces the v0.2 placeholder.decimaldependency bumped to~> 3.1(security fix).Beancount.check_file/1routes through the configured engine.
0.2.0 - 2026-06-30
Adds querying and reporting on top of the v0.1 directive/render/check core.
Added
query/2callback on theBeancount.Enginebehaviour; native engines must implement it too.Beancount.Querywrapper aroundbean-query(CSV output) with a configurable:bean_query_pathandBeancount.Query.NotInstalledError.- Neutral, engine-independent
Beancount.Query.Resultstruct withto_maps/1. - Public API:
Beancount.query/2,query_text/2,query_file/2. Beancount.Reportwithbalances/1,balance_sheet/1,income_statement/1,holdings/1,journal/2, delegated from theBeancountmodule.- Optional
Beancount.Explorer.to_dataframe/1bridge (compiled only when the optional:explorerdependency is present). - Guides:
querying.md,reporting.md, and Livebook notebooks underguides/livebook/.
Changed
Beancount.Engine.CLInow implementsquery/2.
0.1.0-pre - 2026-06-30
Initial pre-release establishing the compatibility layer and behavioral oracle.
Added
- Idiomatic public API under
Beancountfor constructing directives:open/4,close/3,commodity/3,transaction/6,posting/4,balance/5,price/5,note/4,document/4,event/4,custom/4. - Typed directive structs under
Beancount.Directives.*. Beancount.Directiveprotocol and deterministicBeancount.Renderer.Beancount.Enginebehaviour with the initialBeancount.Engine.CLIimplementation wrappingbean-checkviaBeancount.Checker.Beancount.ResultandBeancount.Normalizerfor engine-independent output.- Golden-file infrastructure (
Beancount.Golden) and themix beancount.golden.updatetask. - Property-testing infrastructure (
Beancount.Property) built onStreamData, including a planned oracle-comparison helper inBeancount.Propertyfor future engine validation. - Documentation: README, guides, and HexDocs-ready module docs with doctests.
- GitHub Actions CI running format, compile (warnings as errors), Credo, Dialyzer, tests, property tests and docs.