summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-21 14:21:43 +0000
committeraur-build <aur-build@localhost>2026-11-21 14:21:43 +0000
commit92742f0e5d336547d8d72464e2df0ff1c4f2d337 (patch)
tree096cf9e7ed6c6845812b29a2951d0fd495d799f0 /README.md
parent141a14112554707e04bc2dd33f0c8071c1d74441 (diff)
downloadaur-build-92742f0e5d336547d8d72464e2df0ff1c4f2d337.tar.gz
aur-build-92742f0e5d336547d8d72464e2df0ff1c4f2d337.zip
tests,tools: hold the dead-code zero in the ratchet, and prove the checks bite
`dead_code.deadonly` is 0 for all 28 modules and the allowlist names the 18 items that stay `pub` by decision, so the remaining question is whether the ratchet can be broken quietly. Three tests close that. `the_dead_code_budget_matches_the_code` refuses a budget that contradicts itself: `modules.<m>.deadonly` is what `interfaces_stay_within_budget` reads and `dead_code.deadonly.<m>` is what `tools/arch-census.py --budget` reads, and both must equal the census — an edit to one alone is how a widening enters unnoticed. `the_dead_code_allowlist_names_real_items` refuses an entry whose item the module no longer declares, which is the permission that lets a deleted item return. `the_budget_writers_preserve_each_other` runs both writers against a copy of the file and fails if either erases the section it does not own, or rewrites the hand-written allowlist — the failure mode two tools sharing one file were always going to have. Each was checked by breaking it on purpose: a raised budget, a stale allowlist key, and a writer that drops the allowlist all fail loudly and pass again when reverted. README now says `--list-dead` exists and that a kept item is allowed by name in the budget file, because a ratchet nobody can inspect is not a ratchet.
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 18e256c..5fb41b1 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ Two tools keep this honest, and both are meant to be run, not read once:
```
cargo test --test architecture # ranks, no cycles, no globs, interface budgets
-python3 tools/arch-census.py # the numbers, and --budget to check the ratchet
+python3 tools/arch-census.py # the numbers; --list-dead names them, --budget checks the ratchet
```
## Testing without root, network, or a real chroot
@@ -256,4 +256,7 @@ These are not suggestions:
items it hands out, and how many of them nothing outside the module ever
names. Budgets may only shrink — a number that grows fails the suite, and a
number that quietly got smaller has to be written back at the lower value.
- `tools/arch-census.py` prints the same numbers for a human to read.
+ `tools/arch-census.py` prints the same numbers for a human to read, and
+ `--list-dead` names every item behind them. A `pub` item that stays `pub`
+ without an outside reader is allowed only by name, in the same budget file,
+ with the reason beside it.