Files
wanderbooks/mise.toml
T
swaitsandDeepSeek V4.1 Flash e431791bbc build(lean): verify/lean requires bookspec's Lean; the laws live once
D-69 puts the accounting laws in one place: bookspec's Lean, namespace
`Bookspec`. L-F1 landed there every file of `verify/lean/Wanderbooks/`.
Before deleting the copies, each was checked: comments stripped, namespace
normalised, blank lines dropped, and diffed against its bookspec peer --
all ten are identical (Basic, Entry, Statements, Closing, Ledger,
Apportion, Parties, Prorate, Deductible, Documents). There is nothing
wanderbooks-only left to keep.

So `verify/lean/lakefile.toml` now `[[require]]`s bookspec as a git
dependency at 77e046334eea29e082b53bbe907017d9ffef5a0a -- the same rev
`crates/ledger-core/Cargo.toml` pins the Rust checker to -- with
`subDir = "lean"`. The generated `lake-manifest.json` is committed, because
Lake builds from it and it must not float.

`Wanderbooks.lean` is now a thin local target that imports `Bookspec`:
`lake build` builds and checks the whole law set, and the file says where
a law is edited and how wanderbooks picks it up (move the pin). The
duplicated modules and the `Wanderbooks/` directory are gone.

`Audit.lean` imports `Bookspec` and audits all 151 theorems (the 118
headline laws plus the 33 named laws in `Laws.lean` that cite them) --
the whole set bookspec itself audits. `just prove` still checks standard
axioms only; its summary now says "theorems", since the set is more than
headline ones.

The new `tests/bookspec/pin.rs` reads the rev out of the lakefile, the
manifest, and both crates' Cargo.toml, and fails unless all four name the
same repository at the same commit, and bookspec's `lean/` package. Without
it the Lean laws and the Rust checker could silently be different spec
versions.

Verified: `lake build` from a clean `.lake` (fetches and builds in 7 s);
`just prove` 871 s (Kani 53 harnesses, then 151 theorems, standard axioms
only); `cargo test -p ledger-core --test bookspec pin`; `cargo fmt --check`;
`cargo clippy -p ledger-core --tests -D warnings`.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-08 11:35:07 -07:00

30 lines
1.3 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) and Miri need nightly; pinned so runs repeat.
{ version = "nightly-2026-10-01", components = "miri,rust-src" },
]
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 (bookspec's, required by
# 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"
# 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"