summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-20 21:22:56 +0000
committeraur-build <aur-build@localhost>2026-11-20 21:22:56 +0000
commit2ed254f5487613e00dae4ee15dc63500c4edcce2 (patch)
treefd14c32b9b2b8cba43a3b231b1833c411f2577e6 /README.md
parentb3c326735e4c212afed8c6a25411a1040a67f760 (diff)
downloadaur-build-2ed254f5487613e00dae4ee15dc63500c4edcce2.tar.gz
aur-build-2ed254f5487613e00dae4ee15dc63500c4edcce2.zip
docs: record the test-surface movement in the census report and README
The census report gets a second movement next to the first. The numbers: pub 505 -> 484, dead 105 -> 84, test-only 72 -> 48, pub(crate) 109 -> 119, globs still zero. Two budget increases are recorded rather than smoothed over, because both are consequences of narrowing and a reader is entitled to know which numbers moved the wrong way and why: - sandbox.deadonly 0 -> 2. `Provisioner` and `ProvisionRequest` are named by nobody outside sandbox but cannot be narrowed: LocalAgentProvisioner is pub because two fixture tests construct it, and Rust forbids a public type implementing a private trait or taking a private parameter. - db.deadonly 8 -> 9. Five state enums each have a `can_transition`. Three went private with their tests; ReleaseState's and SubscriptionState's are consulted by nothing at all, so the name slid from test-only to dead-only instead of disappearing. Both carry a NOTE already. `largest` went 603 -> 673 because eleven config tests moved into src/config.rs. It is reported and not budgeted: a line ceiling that counts a module and its tests together would penalise the exact act this goal was for. README's Testing section was stale in a way only a test move exposes — it named `versions::vercmp_matches_the_system_oracle`, a test that does not exist under that name in either location — and said nothing about where a test belongs. Both fixed, with the reason stated: a test outside a module can only reach what the module exports, so a fixture-free test in tests/ is a door held open by a test.
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/README.md b/README.md
index f802959..18e256c 100644
--- a/README.md
+++ b/README.md
@@ -171,12 +171,28 @@ fails if any of it leaks into the default build.
Some tests are gated on the host and skip themselves with a printed note rather
than failing:
-* `versions::vercmp_matches_the_system_oracle` needs pacman's `vercmp` on `PATH`
- and compares the hand-written comparator against it over ~1100 pairs.
+* `pkgver::tests::the_live_vercmp_tier_is_recorded_not_silently_absent` needs
+ pacman's `vercmp` on `PATH` and compares the hand-written comparator against it
+ over ~1100 pairs. A second test, `vercmp_matches_the_recorded_oracle`, checks
+ the same ~1100 pairs against a committed table, so the comparator is pinned on
+ a machine with no pacman at all.
* The live kata tier needs `/dev/kvm` and a cluster (`AUR_KATA_API`); the kata
rendezvous and TTL logic itself runs everywhere via a real `sandbox-agent`
process with no VM. The old real-chroot tier retired with devtools.
+### Where a test lives
+
+A test goes in the module it tests, unless it needs something a unit test cannot
+have — the fixture corpus, a database, a real subprocess, a listening socket.
+`tests/` is for those, and `src/` holds the rest as `#[cfg(test)] mod tests`.
+
+That is a rule with a consequence, and the consequence is the reason it is worth
+stating: a test outside a module can only reach what the module exports, so every
+test that sat in `tests/` while testing something module-private was quietly
+keeping that thing `pub`. Moving the test home is what lets the item go private.
+`tools/test-surface.py` finds the ones still outstanding and
+`tools/test-surface.md` records what is being done about each.
+
## Operations
```sh