Tests
The three test layers share data, not implementations:
- Crate tests live beside their Rust modules.
crates/simconnects the real Rust client and server state machines in one process and checks every invariant after every step of random and named scenarios; seecrates/sim/README.md. bindingstests language callbacks and native lifetimes;persistencetests caller-owned transactions with actual PostgreSQL/Prisma;generated-apicompiles positive/negative TypeScript fixtures and executes generated Dart/TypeScript against native Rust.e2estarts an actual HTTP backend, PostgreSQL and local SQLite, then exercises both languages, normalization, rejection, lost responses and nonblocking local edits.
fixtures/schemas and fixtures/protocol contain reusable input data. fixtures/compiler contains source .model definitions. Test code stays in each owning module or integration package; temporary SQLite and PostgreSQL state is created per test run and removed afterward. No application cache or checked-in binary database is a fixture.
Run the full supported-host gate from the root:
bash scripts/test.sh
Requires Rust, Node 22.18+ (tested with Node 26.4), Dart 3.12+, Python 3 and PostgreSQL command-line tools on PATH. The scripts install repository-local JS/Dart dependencies, build native artifacts, and create their own temporary PostgreSQL clusters. The test databases are created and removed by their runners. Platform-specific simulator tests are separate from the normal host gate.
.github/workflows/verify.yml runs the same host gate on macOS and Linux, followed by optimized native artifacts and a binding smoke. The action setup follows the official checkout, Node, Dart and Rust action documentation.
For focused checks, run bash integration/persistence/transaction-probe/run.sh or bash integration/generated-api/verify.sh. The capacity diagnostic is available through cargo run -p ahead-integration --example capacity.
See guarantees and proofs for the proof inventory and testing strategy for the planned test organization.