test(parity): machine-check the catalog's statuses and floor

docs/parity.md was only review-checked. `parity_floor.rs` now parses every
table with a `Status` column and fails unless each status is exactly
`done`, `partial` or `todo`, and unless the count of `done` rows equals
the floor line exactly. Equal, not at least: adding a done row raises the
line in the same commit, so a later drop cannot pass unnoticed. The
parser's own cases (a bad status, an empty status, a missing floor line)
are unit-tested inline.

The catalog said 21 done but held 25. The floor line was stale, not the
rows: P4b S5 added one done row (invoice sent tracking) and S6 added three
(multi-document settlements, the processor's fee, bills due and aging),
all four named in the notes with their tests. Raising the line to 25
fixes the discrepancy without demoting anything; the history sentence is
kept and the reason is added to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-11-06 16:45:18 -07:00
1 parent 6d5bab5cbf
commit 76b64f99c2
2 files changed
+197 -2

No files matched your search

+4 -2
View File
@@ -6,9 +6,11 @@ same commit as the feature. **The floor never decreases**: the count of
Statuses: `done` = implemented + invariant-tested + golden-covered.
`partial` = implemented but missing tests or goldens. `todo` = not started.
No other statuses.
No other statuses. `crates/ledger-cli/tests/parity_floor.rs` enforces the
statuses and the floor in `cargo test`; `scripts/parity-floor.sh` enforces
in CI that the floor never falls between commits.
**Floor: 21 done** (2026-10-28; it was 10 on 2026-10-10, when the fixed-asset register was added, and the sections below record each rise).
**Floor: 25 done** (2026-10-28; it was 10 on 2026-10-10, when the fixed-asset register was added, and the sections below record each rise; 2026-11-06: P4b S5 added one `done` row and S6 three, to 25, which the line had missed — the four rows' implementations and tests are named below).
| Area | GnuCash counterpart (a cross-check, not the spec) | Status | Notes |
|---|---|---|---|