From 141a14112554707e04bc2dd33f0c8071c1d74441 Mon Sep 17 00:00:00 2001 From: aur-build Date: Sat, 21 Nov 2026 14:09:28 +0000 Subject: tools: audit the tools, and let them regenerate what they already claim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five axes were asked of `tools/*.py` — unreachable statements, unused imports, module-level functions no tool calls, constants nothing reads, parameters nothing passes, and argparse options nothing reads — and all five came back empty, which is worth recording because the alternative is to assume a script directory rots. The one real finding was staleness rather than dead code: `tools/test-surface.md` still cited line numbers from before the narrowing, and `tools/arch-census.md` last recorded a census of 470 `pub` / 84 dead / 35 unargued. Both were regenerated by the tools that own them, so the committed reports now say 448 / 49 / 0. `gen-vercmp-oracle.py` was run and reproduces the committed oracle byte for byte. --- tools/arch-census.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'tools/arch-census.md') diff --git a/tools/arch-census.md b/tools/arch-census.md index c80c1ea..f436a11 100644 --- a/tools/arch-census.md +++ b/tools/arch-census.md @@ -240,3 +240,62 @@ disposition reason, or if any disposition count exceeds preserves the `test_surface` section instead of erasing it: two tools writing one file must not delete each other's axis, or the ratchet quietly stops checking one of them. + +## 2026-11-21 14:08 + +totals: 448 pub, 49 dead (49 test-only, 0 named by nobody), 170 pub(crate), 0 glob re-exports, 87 edges, largest file 699 (src/config.rs) + +| module | pub | dead | test-only | dead-only | pub(crate) | glob | lines | largest file | +|---|---|---|---|---|---|---|---|---| +| bin/gpg | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/gpg.rs | +| bin/makechrootpkg | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/makechrootpkg.rs | +| bin/makepkg | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/makepkg.rs | +| bin/mkarchroot | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/mkarchroot.rs | +| bin/pacman | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/pacman.rs | +| bin/repo-add | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 src/bin/repo-add.rs | +| bin/sandbox-agent | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 50 src/bin/sandbox-agent.rs | +| config | 29 | 2 | 2 | 0 | 2 | 0 | 699 | 699 src/config.rs | +| db | 189 | 11 | 11 | 0 | 19 | 0 | 3888 | 368 src/db/mod.rs | +| error | 21 | 0 | 0 | 0 | 0 | 0 | 430 | 430 src/error.rs | +| fetch | 1 | 0 | 0 | 0 | 2 | 0 | 57 | 57 src/fetch.rs | +| git | 14 | 0 | 0 | 0 | 0 | 0 | 240 | 240 src/git.rs | +| hash | 7 | 0 | 0 | 0 | 0 | 0 | 111 | 111 src/hash.rs | +| http | 17 | 5 | 5 | 0 | 81 | 0 | 2034 | 565 src/http/routes/pages.rs | +| lib | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 23 src/lib.rs | +| main | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 314 src/main.rs | +| ops | 11 | 3 | 3 | 0 | 5 | 0 | 455 | 455 src/ops.rs | +| pipeline | 21 | 6 | 6 | 0 | 16 | 0 | 1411 | 472 src/pipeline/steps.rs | +| pkginfo | 6 | 0 | 0 | 0 | 0 | 0 | 117 | 117 src/pkginfo.rs | +| pkgver | 7 | 0 | 0 | 0 | 0 | 0 | 559 | 559 src/pkgver/mod.rs | +| recipe | 7 | 0 | 0 | 0 | 0 | 0 | 459 | 459 src/recipe.rs | +| review | 24 | 4 | 4 | 0 | 4 | 0 | 915 | 301 src/review/diff.rs | +| sandbox | 21 | 7 | 7 | 0 | 16 | 0 | 1413 | 508 src/sandbox/kata.rs | +| shims | 8 | 4 | 4 | 0 | 13 | 0 | 655 | 655 src/shims/mod.rs | +| time | 13 | 3 | 3 | 0 | 0 | 0 | 243 | 243 src/time.rs | +| urlutil | 1 | 0 | 0 | 0 | 0 | 0 | 56 | 56 src/urlutil.rs | +| usecase | 30 | 0 | 0 | 0 | 0 | 0 | 405 | 124 src/usecase/reviews.rs | +| watch | 21 | 4 | 4 | 0 | 12 | 0 | 1115 | 296 src/watch/upstream.rs | + +``` +bin/gpg -> shims +bin/makechrootpkg -> shims +bin/makepkg -> shims +bin/mkarchroot -> shims +bin/pacman -> shims +bin/repo-add -> shims +bin/sandbox-agent -> sandbox +config -> error hash +db -> config error hash pkgver time +fetch -> error hash +git -> error +http -> config db hash ops pkgver review time usecase watch +main -> config db http ops pipeline pkgver review usecase +ops -> config db error time watch +pipeline -> config db error git hash pkginfo pkgver recipe review sandbox time watch +recipe -> db error +review -> config db error git hash pkgver recipe time urlutil +sandbox -> config error hash time +shims -> hash pkginfo pkgver recipe +usecase -> config db error ops pipeline review watch +watch -> config db error fetch git hash pkgver recipe review time +``` -- cgit v1.2.3