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:
swaitsandClaude committed 2026-11-10 01:55:11 -07:00
1 parent e444a41071
commit ef86f7820a
7 files changed
+129 -16

No files matched your search

+6 -5
View File
@@ -121,14 +121,15 @@ over the rationals to state. What carries it instead:
`just kernel-only` runs the detector over the crates named in the
justfile's `kernel_only_crates`, and the lint part of `just check` runs
it, so a new raw operator or rust_decimal method on a `Decimal` outside
the kernel fails the build. The list is ledger-core and the four outer
crates that were already at zero (ledger-cli, ledger-host, ledger-reader,
ledger-vault); the other six join it as K-U12 brings each to zero, and a
crate never leaves it. A waiver is an
the kernel fails the build. With this unit the list was ledger-core and
the four outer crates already at zero (ledger-cli, ledger-host,
ledger-reader, ledger-vault); K-U12 (`k-u12.md`) brought the other six
there, so it is every crate of the workspace, and a crate never leaves
it. A waiver is an
`#[allow(clippy::arithmetic_side_effects)]` or
`#[allow(clippy::disallowed_methods)]` with a `reason`, and the detector
counts them on its last line so one cannot slip in unseen. There are none
in ledger-core.
in any crate.
## What this does not show