Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing and documentation

Run the release gate from the workspace:

bash scripts/check.sh

It checks formatting, workspace tests, Clippy with warnings denied, Rust API documentation with warnings denied, the subprocess restart/retry example, and the mdBook documentation gate. Dependencies are resolved from the lockfile and local cache.

What the tests cover

Numerical tests include analytic results, probability-domain rejection, Bayesian symmetry, expected Brier optimality, CRPS against an independent quadratic formula, finite extreme values, reference-class denominators, and calibration raw/coarsened distinctions.

Workflow tests cover revision identity, evidence cutoffs, unchanged reviews, origin reuse, terminal adjudications and time-grid weighting. Adapter tests exercise strict decoding, persisted replay, request idempotency across restarts, competing writers, SQL immutability, failure rollback and explicit evaluation exclusions. Incremental-validation tests cover external commits, historical corruption, question switches, warm/cold equivalence, evidence-origin reuse, trigger side effects and commit-time constraint failure.

Evaluation tests check whole-cluster resampling against a simple known distribution, unequal cluster sizes, degeneracy, workload bounds and selection that does not use held-out labels. This verifies algorithmic behavior rather than empirical interval coverage for arbitrary real datasets.

Executable books

CARGO_TARGET_DIR=target cargo build --workspace --locked --offline
python3 scripts/docs.py
python3 scripts/docs.py --check

The first command writes updated generated reference pages. The check mode fails on drift. Both execute every JSON operation example, check explicit expected fields, build the two mdBooks, run their Rust code examples and verify local links and fragments in the rendered HTML.

The example fixture is scripts/doc_cases.py. Each case names one operation, setup commands if needed, an actual request, explanatory contracts and independently specified expected output fields. The set of cases must equal the runtime schema’s operation set exactly; a new operation without documentation fails the gate.

Commit timestamps are redacted in generated response examples so reference files are stable. Other outputs come from the binary. Expected float values use a 1e-12 comparison tolerance. Full result snapshots are displayed for inspectability.

Rust book examples use a copy of the Cargo-built core rlib in an isolated temporary search directory. This avoids accidentally selecting stale Clippy/check metadata from the shared build cache. Examples remain compiled against the current core implementation.

Boundaries of verification

The suite does not prove that a supplied source is authentic, an event cluster assignment is valid, a historical forecast was actually made before its outcome, or a utility function is appropriate. Those are application/data obligations. Storage tests do not simulate power loss or adversarial administrators.

A passing gate is necessary for a release, but inspect the changed behavior and artifacts too. A test that merely repeats an implementation can preserve the same error in two places; independent examples and invariants are included to reduce that risk.