diff options
| author | dev <dev@localhost> | 2026-11-20 16:58:27 +0000 |
|---|---|---|
| committer | dev <dev@localhost> | 2026-11-20 16:58:27 +0000 |
| commit | b73bb60403c3f2e7fc55d5038831912e8371e3a6 (patch) | |
| tree | c46b7757f0b4d26c795bb36a01929d32ad9a6134 /src/bin/makechrootpkg.rs | |
| parent | 28387a3b920d2ecff62d2ef267af6b875be9d28d (diff) | |
| download | aur-build-b73bb60403c3f2e7fc55d5038831912e8371e3a6.tar.gz aur-build-b73bb60403c3f2e7fc55d5038831912e8371e3a6.zip | |
tests: declare the layer map, and ratchet every interface width
Four greps in tests/layers.rs were the entire enforcement. They could say
that db had stopped naming http; they could not say what the architecture
is, could not place a new module, and said nothing about the twenty-odd
modules nobody had tripped over yet.
tests/architecture.rs declares the whole map instead. Every module in src/
gets a rank with the reason it sits there, and a module may name only
modules ranked strictly below it — one rule, every module, cycles
impossible by construction rather than by luck. The census says the graph
already satisfies it, so the map is a description of what is true, not an
aspiration the suite immediately fails on.
The same file holds the interface budgets, because a boundary is only as
strong as what it refuses to let you export: per module, how many pub items
it hands out and how many of them nothing outside the module names. Budgets
live in architecture-budget.json and move one way. A number that grows
fails; a number that got smaller without being written back also fails,
which is what stops a won gain from quietly becoming the new ceiling.
Each rule was probed rather than trusted: naming http from db fails with
`db (rank 3) names http (rank 9)`, tightening db.pub to 200 fails with
`db.pub: 226 > 200`, and leaving a stale budget fails with
`db.deadonly: budget 99, actual 36`.
tests/layers.rs is deleted, not weakened. Three of its four rules are rank
consequences now (db, review, recipe all sit below everything they were
forbidden to name); the fourth, watch -> shims, was already covered by
production_surface.rs, which greps every non-shim file for shims:: and
would catch it in any module, not just watch.
The census definition now lives in two languages, so the test checks them
against each other the way the vercmp oracle checks the hand-written
comparator: without python3 the note prints and the suite moves on.
277 passed / 0 failed (273 + 8 new - 4 subsumed), clippy -D warnings clean.
Diffstat (limited to 'src/bin/makechrootpkg.rs')
0 files changed, 0 insertions, 0 deletions
