0.7.0
GitHub

What is checked, and where

The four promises this library makes, the instrument that checks each one, and where each crate runs.

This page routes. The normative text is the specification, and where this page and a clause disagree, the clause wins.

Each promise, and what checks it

The home page makes four promises. Each row names the instrument that would fail if the promise stopped being true.

PromiseChecked by
True offline: nothing is lost or overwritten when stores synchappenstance-sync-testkit's ingest and peer suites, run against MemorySyncPeer, NeonSyncPeer, a Durable Object over HTTP and a Postgres StoreSyncPeer. A native SQLite store round-trips through each with identical payload bytes, and a replayed batch changes nothing (harness/sync-round-trip).
True to your rules: a write is refused when something it depended on changedThe event-store family's append-condition matrix, the concurrency family (64 contenders, exactly one winner, against a store that does not serialise its writers), and the model family, which replays generated histories against a model.
True to its history: views are rebuilt from the log and never drift from itThe projection family, which holds a read-model write and its checkpoint to one unit of work (commit_is_atomic_with_the_read_model).
True wherever it lives: the same code behaves the same on every storeEvery adapter runs happenstance_testkit::event_store_conformance!; an adapter that has not passed it is not considered to exist. happenstance-core is built for wasm32-unknown-unknown in the gate, and the Durable Object adapter runs the suite under workerd.

And what keeps these claims honest

ClaimChecked by
No rule in the suite is decorativeEach rule has a deliberately wrong store that fails it, kept in the testkit's own tests.
The contract is stableEventStore has been frozen since 0.2.0 and ProjectionStore since 0.3.0; cargo-semver-checks runs against the published releases.
The specification is currentcargo xtask spec-trace fails when a clause's citation or maturity marker stops resolving.
The guide is true of the codeEvery Rust example in docs/ is compiled against the real crates by cargo xtask ci.

Where it runs

CrateWhat it is
happenstanceThe typed layer an application depends on: typed events, decision models and projection runners.
happenstance-coreThe contract: the EventStore and ProjectionStore ports, their value types, and in-memory reference stores.
happenstance-testkitThe conformance suites every adapter must pass.
happenstance-sqliteSQLite event and projection stores.
happenstance-postgresPostgreSQL event and projection stores — the adapter whose writers are not serialised.
happenstance-neonNeon serverless PostgreSQL over one-shot HTTP: no connection, no interactive transaction, no cursor. Host and wasm32.
happenstance-cloudflareA Cloudflare Durable Object event store: the workspace's !Send store, on wasm32.
happenstance-syncThe replication port: SyncPeer, the IngestStore port each adapter implements behind its sync feature, and the wire messages. Published from 0.4.4; a runner over one edge, write groups and network peers from 0.6.0; the adjudication hook and the retention-gap report from 0.7.0.
happenstance-sync-testkitThe conformance suites for sync peers and ingest stores. Pin it exactly: a new rule can turn a passing adapter red.

Further reading