From a200edaac2056dd9c85d6bddff3ca181f0cc277e Mon Sep 17 00:00:00 2001 From: aur-build Date: Sat, 21 Nov 2026 13:04:12 +0000 Subject: tools: the census names its dead items, and the budget argues its survivors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A count cannot be acted on. `db: 8 dead-only` tells a module is wide and sends the reader back to grep for which eight, so the census now records where every dead item is declared and `--list-dead` prints them: 35 named by nobody, 49 named only by tests. What is *accepted* moves into the one file the ratchet already reads, under a `dead_code` section — the accepted `deadonly` count per module, and an allowlist of `module.item` to a one-line reason. `--budget` now fails three ways: a module over its accepted count, a dead item no one argued for, and an allowlist entry that no longer names a dead item. The third is the one that matters, because a stale permission is how a deleted item comes back: the excuse is still on the books, so nobody notices the new one. `--write-budget` writes the counts and preserves the allowlist, the same way it already preserves the section tools/test-surface.py owns — two writers of one file may not erase each other. All 35 are unargued today, which is the point: the check is the worklist. --- tests/architecture-budget.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests') diff --git a/tests/architecture-budget.json b/tests/architecture-budget.json index 2702372..f451680 100644 --- a/tests/architecture-budget.json +++ b/tests/architecture-budget.json @@ -1,4 +1,36 @@ { + "dead_code": { + "deadonly": { + "bin/gpg": 0, + "bin/makechrootpkg": 0, + "bin/makepkg": 0, + "bin/mkarchroot": 0, + "bin/pacman": 0, + "bin/repo-add": 0, + "bin/sandbox-agent": 0, + "config": 0, + "db": 8, + "error": 0, + "fetch": 1, + "git": 0, + "hash": 0, + "http": 3, + "lib": 0, + "main": 0, + "ops": 1, + "pipeline": 0, + "pkginfo": 2, + "pkgver": 0, + "recipe": 0, + "review": 1, + "sandbox": 2, + "shims": 8, + "time": 2, + "urlutil": 0, + "usecase": 3, + "watch": 4 + } + }, "modules": { "bin/gpg": { "dead": 0, -- cgit v1.2.3