Coverage is a tripwire, not a correctness oracle: the proofs, the property tests, the GnuCash cross-check and mutation testing answer whether the books are right; a line/branch report answers whether a test still reaches the code it used to. This adds that measurement, pinned in mise.toml like every other tool: cargo-llvm-cov 0.9.1, and the llvm-tools component on the pinned nightly because branch coverage is nightly-only (-Zcoverage-options=branch). `just coverage` runs each crate's own suite instrumented (core and store separately, so one crate's dev-dependency code does not enter the other's totals), writes HTML, the JSON and the plain per-file table under target/coverage/<crate>/, and excludes src/proofs.rs (Kani-only, cfg(kani)) plus test and bench files: it measures the library. `just coverage-check` reads docs/coverage-floor.md and fails when a crate's total line coverage is more than 0.5 pp below its floor; regions and branches are recorded for context but not gated, since branch coverage is the noisier number across compiler versions. First measurement from the full run: ledger-core 90.01% lines (88.86% regions, 82.65% branches), ledger-store 91.71% lines (85.27%, 80.73%). The store measured 91.98% on an earlier run the same day; properties pick random cases, so a few tenths move between runs and the 0.5 pp tolerance absorbs it (the floor records the lower run). The largest holes are findings, not fixes here: ledger-store/reconcilable.rs is 0% (the server and viewer are its readers; the store suite never calls it), and ledger.rs is mostly the document/payroll replay steps the store's replay tests exercise rather than the core's own. It is not a push gate (the instrumented suites are slow: the store alone runs about a hundred minutes of tests once built); the weekly scheduled workflow runs it beside the proofs. The store's tests start and kill helper processes that inherit LLVM_PROFILE_FILE, so a killed child can leave a truncated profraw; the run passes --failure-mode all, which merges the test binaries' profiles and ignores such a file (it holds no test coverage). Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
34 lines
1.5 KiB
TOML
34 lines
1.5 KiB
TOML
# Everything needed to build, test, prove, and ship wanderbooks.
|
|
# `mise install` in this directory, then `just` lists the recipes.
|
|
|
|
[tools]
|
|
# Workspace toolchain (clippy and rustfmt for `just check`).
|
|
rust = [
|
|
{ version = "1.99", components = "clippy,rustfmt", targets = "x86_64-pc-windows-msvc" },
|
|
# Fuzzing (cargo-fuzz), Miri and branch coverage need nightly; pinned so
|
|
# runs repeat. `llvm-tools` is what cargo-llvm-cov reads profiles with.
|
|
{ version = "nightly-2026-10-01", components = "miri,rust-src,llvm-tools" },
|
|
]
|
|
just = "1"
|
|
# `just deploy` runs the Netlify CLI through npx.
|
|
node = "26"
|
|
# `just prove`: Kani model-checks the accounting kernel. Kani fetches its
|
|
# own pinned nightly and CBMC under ~/.kani on first run.
|
|
"cargo:kani-verifier" = "0.68.0"
|
|
# `just prove`: Lean proves the accounting laws (verify/lean). Matches
|
|
# verify/lean/lean-toolchain.
|
|
"github:leanprover/lean4" = "4.34.1"
|
|
# Mutation testing and fuzzing (docs/oracle.md).
|
|
"cargo:cargo-mutants" = "27.1.0"
|
|
"cargo:cargo-fuzz" = "0.13.2"
|
|
# `just coverage`: line and branch coverage of the core and the store
|
|
# (docs/coverage-floor.md).
|
|
"cargo:cargo-llvm-cov" = "0.9.1"
|
|
# A compile cache shared by every jj workspace's target dir: point
|
|
# cargo's build.rustc-wrapper at it (~/.cargo/config.toml).
|
|
sccache = "0.18.0"
|
|
# `just package-linux` (docs/packaging.md): the AppImage and .deb by
|
|
# cargo-packager, the .rpm by cargo-generate-rpm (D-25).
|
|
"cargo:cargo-packager" = "0.11.8"
|
|
"cargo:cargo-generate-rpm" = "0.21.1"
|