build(check): every crate is held at zero Decimal arithmetic outside the kernel (K-U12)
The viewer was the last crate with arithmetic of its own on amounts. With it at zero, `just kernel-only` runs the detector over all eleven crates, and it now fails when a folder under crates/ is not in its list, so a new crate cannot do money arithmetic of its own from the day it is added. Why it matters for the books: the proofs (Kani, Lean) are about the kernel. A sum or a product computed anywhere else is one they say nothing about, and rust_decimal's own operators either panic or round without saying so. Bar item 1 of AGENTS.md is now a property the compiler checks for the whole workspace, not a rule to remember. Checked on main after the merge: the detector reads 0 places and 0 waivers for ledger-gui, the crate's whole test suite passes in one run (300 passed, 0 failed, 1 ignored), clippy with warnings denied and fmt are clean. docs/proofs/k-u12.md is the account: the 183 places by crate, the rule each kind followed, and the decision for every site that was not a plain sum or sign. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
e444a41071
commit
ef86f7820a
7 files changed
+129
-16
No files matched your search
+1
-1
@@ -28,7 +28,7 @@ promise.
|
||||
| Fuzzing | crash, hang, broken books (4); for `fuzz_store_replay` (validly chained journals with fuzz-chosen events): books that open must verify, and the viewer must accept exactly what the writer does | `fuzz/fuzz_targets/`, corpora in `fuzz/corpus/` | `just fuzz <target> <secs>` | 10 min each | weekly |
|
||||
| Miri | undefined behavior in our use of dependencies (4) | the core's unit, bridge, invariant tests (the exhaustive calendar walk aside) | `just miri` | ~4 min | on demand |
|
||||
| Golden | `tests/golden/fixture_company.json` (5) | `invariants.rs` | `just check` | <1s | every change |
|
||||
| Kernel only | no `Decimal` arithmetic outside `src/kernel/`: no raw operator, none of rust_decimal's own arithmetic or rounding methods, no `Iterator::sum` (AGENTS.md, bar item 1; the proofs are about the kernel only) | `scripts/raw-decimal-arith.sh`, which asks clippy twice and compares; the crates held at zero are the justfile's `kernel_only_crates` (every crate that has reached zero; the rest join as K-U12 brings each there, and none leaves) | `just kernel-only` (in `just check`, the lint part) | ~1 min warm, a few minutes cold (two clippy runs of the crate) | every change. A waiver is an `#[allow]` with a `reason`; the last line counts them, and ledger-core has none |
|
||||
| Kernel only | no `Decimal` arithmetic outside `src/kernel/`: no raw operator, none of rust_decimal's own arithmetic or rounding methods, no `Iterator::sum` (AGENTS.md, bar item 1; the proofs are about the kernel only) | `scripts/raw-decimal-arith.sh`, which asks clippy twice and compares; every crate of the workspace is held at zero since K-U12 (the justfile's `kernel_only_crates`; the recipe fails when a folder under `crates/` is not in it) | `just kernel-only` (in `just check`, the lint part) | ~1 min warm, a few minutes cold (two clippy runs of the crate) | every change. A waiver is an `#[allow]` with a `reason`; the last line counts them, and no crate has one |
|
||||
| Dependencies | no crate in the lock file with a known vulnerability (RustSec) or yanked; none under a licence that does not fit MIT OR Apache-2.0; none from a source `deny.toml` does not name; none of our own unmaintained (4) | `deny.toml`, each exception with its reason and date | `just deny` (in `just check`, the lint part) | seconds, needs the network | every change, and weekly (`scheduled.yml`), since an advisory is published when it is, not when we push. First run, 2026-11-09: 23 advisories; closed by upgrades (quick-xml, rusqlite, rust_xlsxwriter, rmcp, rustls, tokio, zstd, pulldown-cmark) but two, lived with in `deny.toml` |
|
||||
| Notices | every crate the program links and every font it embeds, with the licence text each asks to travel with (1, the licence itself) | `THIRD-PARTY-NOTICES.txt`, written by cargo-about from `ledger-cli`'s manifest, by `scripts/notices-packaged.py` (the crates' own licence files, where cargo-about could only give a licence's standard text with a placeholder for the copyright line) and from the licence files beside the fonts | `just notices`; `just notices-check` (in `just check`, the lint part) | ~2 min (12 CPU-minutes: it reads every crate's files for licence text) | every change that touches a dependency or a font. `just notices` writes the file; `just notices-check` fails when a dependency changed and the file was not regenerated, and the fix is `just notices` and committing the result |
|
||||
| Benchmarks | a baseline (6) | `ledger-core/benches/books.rs`, `ledger-store/benches/store.rs` | `just bench` | ~2 min | none (no budget, by decision) |
|
||||
|
||||
Reference in new issue
Block a user