diff options
| author | aur-build <aur-build@localhost> | 2026-11-21 14:21:43 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-21 14:21:43 +0000 |
| commit | 92742f0e5d336547d8d72464e2df0ff1c4f2d337 (patch) | |
| tree | 096cf9e7ed6c6845812b29a2951d0fd495d799f0 /src/review | |
| parent | 141a14112554707e04bc2dd33f0c8071c1d74441 (diff) | |
| download | aur-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 'src/review')
0 files changed, 0 insertions, 0 deletions
