All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- GitHub Actions CI (
.github/workflows/ci.yml) — automated test pipeline triggered on every push and pull request. Runs a matrix across Python 3.11, 3.12, and 3.13; installs dev dependencies, lints withruff, type-checks withmypy, and executes the fullpytestsuite with--covcoverage reporting.fail-fast: falseensures all matrix legs run to completion.
- Ruff linting violations — resolved all issues reported by
ruff checkon first CI run: sorted__all__alphabetically in__init__.py(RUF022); replacedtimezone.utcwith theUTCalias throughout source and tests (UP017); replacedDecimal("0")string literals withDecimal(0)inbank_account.py(FURB157); updatedSQLiteEventStore.__enter__return annotation toSelf(PYI034).
0.1.0 - 2026-08-23
EventStoreABC (store.py) — backend-agnostic interface declaringappend,load,save_snapshot, andload_snapshotwith full PEP 484 type annotations.SQLiteEventStore(sqlite_store.py) — fully ACID-compliant concrete implementation using the standard-librarysqlite3module. Enforces per-aggregate monotonically increasing version numbers via aUNIQUE(aggregate_id, version)constraint; translatesIntegrityErrortoOptimisticConcurrencyError.AggregateRoot(aggregate.py) — base class with integerversiontracking,pending_eventscollection,record()/apply()/clear_pending_events()lifecycle methods,on_<EventType>handler dispatch convention, andsnapshot_state()/_restore_from_snapshot()hooks.Repository(repository.py) — orchestration layer that loads the latest snapshot, fetches subsequent events, callsAggregateRoot.rehydrate(), auto-triggers snapshot saves when the post-snapshot event count reaches the configurablesnapshot_threshold(default 50), and persists pending events viasave().StoredEventandSnapshotRecord(domain.py) — immutablefrozen=Truedataclasses carryingaggregate_id,version,event_type/state,payload, and a UTCoccurred_at/taken_attimestamp.- Exception hierarchy (
exceptions.py) —EventSourcingErrorbase;OptimisticConcurrencyError,AggregateNotFoundError,UnknownEventTypeError,InsufficientFundsError,AccountClosedErrorconcrete exceptions, all with human-readable messages identifying theaggregate_idand, where applicable, conflicting version numbers. BankAccountworked example (examples/bank_account.py) — concrete aggregate demonstratingAccountOpened,MoneyDeposited,MoneyWithdrawn, andAccountClosedevents; enforcesInsufficientFundsErrorandAccountClosedErrorguard conditions; implementssnapshot_state()/_restore_from_snapshot()for snapshot-aware rehydration.- Full
pytesttest suite — 69 tests acrosstest_sqlite_store.py,test_aggregate.py,test_rehydration.py,test_domain.py, andtest_bank_account.py; 100% line coverage of theevent_sourcingpackage. pyproject.tomlpackaging — PEP 517/518 build configuration via Hatchling;devextras forpytestandpytest-cov;src/layout withevent_sourcingas the sole wheel package;requires-python = ">=3.11".
- SQLite (stdlib
sqlite3) was chosen as the sole backend for this release to provide zero-infrastructure, fully ACID, CI/CD-friendly event storage. TheEventStoreinterface is designed so a PostgreSQL or other server-backed implementation can be substituted without changing application code. Seedocs/requirements/SRS.md§4 for the full trade-off analysis.
docs/requirements/SRS.md— Software Requirements Specification covering functional requirements (FR-01 – FR-25), non-functional requirements, backend trade-off analysis, out-of-scope items, glossary, and acceptance criteria.docs/design/DESIGN.md— Architecture and design document covering the three-layer architecture, module responsibilities, key interfaces (with full type-hinted pseudocode), SQLite schema, rehydration algorithm, snapshot strategy, and concurrency model.