Test Scope
- Add regression tests for each meaningful runtime failure mode found during review.
- Prefer behavior-focused assertions over implementation details.
- Test public APIs when the change affects host-facing behavior.
- Test pure protocol and projection modules directly when changing journal semantics.
- Keep one reason to fail per test.
Runtime Cases
- Cover retries, replay, cancellation, pause/resume, approval/rejection, waits, dependency/fan-out behavior, conditional routing, stale workflow definitions, duplicate delivery, stale claims, and terminal-state ordering when relevant.
- For stateful or concurrency-sensitive changes, prove stale reads are either eliminated, revalidated under the same lock, or safe by idempotent design.
- For versioned graph mutations, cover stale versions, duplicate IDs, dependency chains and fan-in, concurrent writers, post-commit dispatch repair, tombstones, terminal completion, and redacted inspection.
- For telemetry or audit-history changes, test terminal-event symmetry and ordering relative to durable commits.
- Prove trace lineage across worker handoff and reconstruction. Assert exact telemetry metadata keys, secret exclusion, rollback discard, and point-before-enclosing-span ordering.
- For partition-aware behavior, reuse the same run UUID, queue, workflow, and idempotency keys in two partitions. Assert isolation for journal entries, checkpoints, catalogs, indexes, execution, replay, controls, cron, signals, child inheritance, recovery agents, and public read models. Also preserve an explicit regression for the exact legacy namespace when no partition is set.
Example Apps
- Use
examples/minimal_host_appfor embedded runtime smoke tests. - Use
examples/bedrock_minimal_host_appfor Bedrock queue, lease, heartbeat, retry, dead-letter, and cron delivery coverage. - Reset example app databases when persisted test rows can affect later smoke runs.
Verification
- Run
mix formatbefore handoff. - Run focused tests first, then
mix precommitbefore finishing a code slice. - Run
MIX_ENV=test mix coverallswhen tests or coverage-sensitive runtime paths change; coverage gates live incoveralls.jsonandcodecov.yml. - For runtime, workflow, persistence, jobs, state-machine, or public API changes, run an end-to-end smoke path in the relevant example app.