
About this project. A standalone, generalized extraction of an architecture pattern from Ventute — a production AI-driven business-simulation platform — distilled into self-contained, runnable form. Published as a portfolio piece demonstrating event-sourcing and deterministic, replayable systems design. Author: @m4xkushnir.
(state, event) → state transition is context-free: no clock, no RNG, no I/O during replay.test_same_log_same_hash_across_two_kernels In-memory and SQLite agree byte-for-byte test_memory_and_sqlite_agree_bit_for_bit Replay is stable across repeated runs test_repeated_replay_is_stable A snapshot never changes the result (only the work) test_snapshot_replay_equals_zero_replay "State as of seq N" equals a prefix replay test_replay_until_matches_prefix_of_full_logreplay_from_snapshot folds a cached state plus only the tail of newer events. The suite asserts this yields a hash identical to replaying from zero — so snapshots can be discarded and rebuilt at any time without ever changing an answer.AggregateState (in state.py) the fields you accumulate.reducer.py with @handler("your_event_type").record those event types and replay — determinism, hashing, both stores, and snapshotting all keep working unchanged.Posted Jul 31, 2026
Implemented a kernel demonstrating event-sourcing for an AI-driven platform.