<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/tests/common, branch ai/main</title>
<subtitle>Unnamed repository
</subtitle>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/'/>
<entry>
<title>tests: the ratchet says what the code says now</title>
<updated>2026-11-23T13:56:40+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-23T13:56:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=6872e81644546a9ccd0e1420c3ef64a26358f78a'/>
<id>6872e81644546a9ccd0e1420c3ef64a26358f78a</id>
<content type='text'>
The architecture test's own essays were the largest block of prose left
in the tree, and the test-file headers were notes about which tests moved
into `src/` — history the file no longer needs.

Removing those mentions moved two measured numbers, and the ratchet was
right to complain. `db.Writer` now sits in the allowlist with the
compiler fact that keeps it `pub` — narrowing it makes every call site
say `type db::Writer is private` — and the counts that got smaller are
written back at the smaller value, as the ratchet demands.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The architecture test's own essays were the largest block of prose left
in the tree, and the test-file headers were notes about which tests moved
into `src/` — history the file no longer needs.

Removing those mentions moved two measured numbers, and the ratchet was
right to complain. `db.Writer` now sits in the allowlist with the
compiler fact that keeps it `pub` — narrowing it makes every call site
say `type db::Writer is private` — and the counts that got smaller are
written back at the smaller value, as the ratchet demands.
</pre>
</div>
</content>
</entry>
<entry>
<title>src,tests: say each thing once, in the code or not at all</title>
<updated>2026-11-22T10:44:04+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-22T10:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=1e1e12e7220a3fd288782ae40f0823db32acf6cb'/>
<id>1e1e12e7220a3fd288782ae40f0823db32acf6cb</id>
<content type='text'>
The repeated explanations go: sixteen copies of why a `pub` under
`test-support` has two declarations, six notes about where a test moved
from, forty-three banner comments naming the section they sit above.

The prose that stays is the prose the code cannot say — a hand-written
Debug that keeps a token out of a log line, a git pipe that would
deadlock if the write came first, an end-of-string check that has to
precede the separator skip. Enum docs in error.rs collapse to the line
that names what the type is; the argument for why it is shaped that way
is in the variants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The repeated explanations go: sixteen copies of why a `pub` under
`test-support` has two declarations, six notes about where a test moved
from, forty-three banner comments naming the section they sit above.

The prose that stays is the prose the code cannot say — a hand-written
Debug that keeps a token out of a log line, a git pipe that would
deadlock if the write came first, an end-of-string check that has to
precede the separator skip. Enum docs in error.rs collapse to the line
that names what the type is; the argument for why it is shaped that way
is in the variants.
</pre>
</div>
</content>
</entry>
<entry>
<title>rustfmt,lints: pin the formatting, adopt the idiom lints, pay them off</title>
<updated>2026-11-22T10:36:24+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-22T10:36:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=3dc71b2f5160ef9bd46143eed0edb5d2557b58e6'/>
<id>3dc71b2f5160ef9bd46143eed0edb5d2557b58e6</id>
<content type='text'>
rustfmt.toml fixes the shape the tree is written in (120 columns, small
items kept on one line) and one canonical pass makes it the truth.

[lints.clippy] names the idiom lints worth enforcing and leaves out the
two that would add doc-comment boilerplate rather than remove it. The
tree pays them off here: write!/writeln! instead of push_str(&amp;format!()),
let-else instead of match-on-Option, borrows where a thread entry point
only reads what it owns, no `&amp;self` on a Copy state and no `self` nobody
reads.

ops::to_prometheus gains one gauge helper: a metric's HELP, TYPE and
value are now emitted by the same call instead of three.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rustfmt.toml fixes the shape the tree is written in (120 columns, small
items kept on one line) and one canonical pass makes it the truth.

[lints.clippy] names the idiom lints worth enforcing and leaves out the
two that would add doc-comment boilerplate rather than remove it. The
tree pays them off here: write!/writeln! instead of push_str(&amp;format!()),
let-else instead of match-on-Option, borrows where a thread entry point
only reads what it owns, no `&amp;self` on a Copy state and no `self` nobody
reads.

ops::to_prometheus gains one gauge helper: a metric's HELP, TYPE and
value are now emitted by the same call instead of three.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: drop the one allowance the blanket already covers</title>
<updated>2026-11-21T15:56:59+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T15:56:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=d96a46ea15cfb7b47ed7b53d2b0465f20fc9b43e'/>
<id>d96a46ea15cfb7b47ed7b53d2b0465f20fc9b43e</id>
<content type='text'>
`Web::server` carried its own `#[allow(dead_code)]` from before the crate-level
one existed, and it is not even true: `tests/live.rs` reads `web.server.addr`.
Every suppression left in the tree is now either a `cfg_attr` on a
test-support-only item, with its reason beside it, or the one crate-level
allowance in `tests/common`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Web::server` carried its own `#[allow(dead_code)]` from before the crate-level
one existed, and it is not even true: `tests/live.rs` reads `web.server.addr`.
Every suppression left in the tree is now either a `cfg_attr` on a
test-support-only item, with its reason beside it, or the one crate-level
allowance in `tests/common`.
</pre>
</div>
</content>
</entry>
<entry>
<title>src,sandbox,http: three more fields nobody read, and the check that missed them</title>
<updated>2026-11-21T15:50:41+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T15:50:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=f5d970494f77d39dadf7c7d5a6a3d70221ca2da2'/>
<id>f5d970494f77d39dadf7c7d5a6a3d70221ca2da2</id>
<content type='text'>
A field scan that printed its first thirty lines missed the rest. Three `pub`
fields were written and never read: `SandboxSpec::disk_mb`, copied off
`cfg.min_free_disk_mb` into a spec no backend consulted — the dispatcher already
checks the disk itself, so the knob stayed live and the plumbing around it was
dead; `SandboxInfo::warm`, computed three ways by three backends and read by
nobody; and `Server::handle`, a `JoinHandle` stored and never joined, which is
what detaching a thread means and so was never load-bearing. All three are gone,
their construction sites with them.

Four more are written-but-never-read on purpose and now say so where they are
declared: `Identity::upstream_pins` and `source_digests` reach the identity
digest through `canonical_json`, not through a name; `VirtualClock::_owner` is
the lease, and holding it unread is the whole mechanism; the `Ab`/`Ba` pair in
`hash`'s canonical-json test exist to be serialized.

`the_test_helpers_are_used` only looked at `pub` items, which left the blanket
`allow(dead_code)` in `tests/common` exactly as able to hide a private helper as
a public one — the objection was fair, and planting
`fn planted_private_helper_never_used()` proved it passed while a dead private
helper sat in the file. It now scans private declarations too, and fails on both
the planted function and a planted struct.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A field scan that printed its first thirty lines missed the rest. Three `pub`
fields were written and never read: `SandboxSpec::disk_mb`, copied off
`cfg.min_free_disk_mb` into a spec no backend consulted — the dispatcher already
checks the disk itself, so the knob stayed live and the plumbing around it was
dead; `SandboxInfo::warm`, computed three ways by three backends and read by
nobody; and `Server::handle`, a `JoinHandle` stored and never joined, which is
what detaching a thread means and so was never load-bearing. All three are gone,
their construction sites with them.

Four more are written-but-never-read on purpose and now say so where they are
declared: `Identity::upstream_pins` and `source_digests` reach the identity
digest through `canonical_json`, not through a name; `VirtualClock::_owner` is
the lease, and holding it unread is the whole mechanism; the `Ab`/`Ba` pair in
`hash`'s canonical-json test exist to be serialized.

`the_test_helpers_are_used` only looked at `pub` items, which left the blanket
`allow(dead_code)` in `tests/common` exactly as able to hide a private helper as
a public one — the objection was fair, and planting
`fn planted_private_helper_never_used()` proved it passed while a dead private
helper sat in the file. It now scans private declarations too, and fails on both
the planted function and a planted struct.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: make the blanket `allow(dead_code)` in the test tier worth keeping</title>
<updated>2026-11-21T14:01:34+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T14:01:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=47f6c6db7faedc292fb55b6637a5f6e292ffcaec'/>
<id>47f6c6db7faedc292fb55b6637a5f6e292ffcaec</id>
<content type='text'>
`tests/common/mod.rs` opened with `#![allow(dead_code)]` and nothing else, which
means it could have been hiding helpers no test called. It was not hiding many —
`upstream2_commit` and nothing else at file scope — but "not many" is not a
check, and the file cannot simply drop the allowance: it is compiled into every
test binary, so a helper one binary uses is dead code in the other twenty and
the lint fires everywhere and means nothing.

So the allowance stays and the check moves up a level. `the_test_helpers_are_used`
reads the file and fails on any `pub` item no test writes, counting a type as
used when a field or method of it is — `Web::raw_request` hands back a `Raw` no
test ever names. `every_fixture_is_referenced` does the same for `testcorpus/`,
which had one entry, `git-submodules`, that no test had ever driven; it is gone.
Both were checked by planting a dead helper and a dead fixture and watching the
suite refuse them.

`tests/dispatch.rs` also carried a function whose entire body was an
`#[allow(dead_code)]` on `fn unused(_: AtomicBool, _: Config) {}` — the deadest
code in the repository, with its two imports behind it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`tests/common/mod.rs` opened with `#![allow(dead_code)]` and nothing else, which
means it could have been hiding helpers no test called. It was not hiding many —
`upstream2_commit` and nothing else at file scope — but "not many" is not a
check, and the file cannot simply drop the allowance: it is compiled into every
test binary, so a helper one binary uses is dead code in the other twenty and
the lint fires everywhere and means nothing.

So the allowance stays and the check moves up a level. `the_test_helpers_are_used`
reads the file and fails on any `pub` item no test writes, counting a type as
used when a field or method of it is — `Web::raw_request` hands back a `Raw` no
test ever names. `every_fixture_is_referenced` does the same for `testcorpus/`,
which had one entry, `git-submodules`, that no test had ever driven; it is gone.
Both were checked by planting a dead helper and a dead fixture and watching the
suite refuse them.

`tests/dispatch.rs` also carried a function whose entire body was an
`#[allow(dead_code)]` on `fn unused(_: AtomicBool, _: Config) {}` — the deadest
code in the repository, with its two imports behind it.
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: record the census, and make the README describe the tree that exists</title>
<updated>2026-11-20T19:03:01+00:00</updated>
<author>
<name>dev</name>
<email>dev@localhost</email>
</author>
<published>2026-11-20T19:03:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=e6c3a02229994a9e007d8e6618add778e1ec021c'/>
<id>e6c3a02229994a9e007d8e6618add778e1ec021c</id>
<content type='text'>
The census report gets its after-table, and the README's Layout gets rewritten
— it had drifted into fiction, listing `db/queries.rs`'s successors as "queries"
and omitting `usecase`, `error`, `hash`, `time`, `urlutil`, `git`, `fetch` and
`recipe` entirely. It now states the ranks and says plainly that they are
enforced by `tests/architecture.rs`, not kept in hope, and names the two
commands that keep it true.

This commit also carries the last of the narrowing that fell out of writing the
report, because writing it meant actually reading the numbers:

- `watch::upstream::resolve` looked test-only and was not — the tests contain an
  unrelated local function of the same name, which the census matches as a word.
  It is crate-internal and now says so.
- `read_tree` closed with it. Its two integration tests were testing the module's
  own batching behaviour from outside, so they moved inside as unit tests with a
  throwaway git repo, which is where a test about one `ls-tree` and one
  `cat-file --batch` belongs. They lost nothing: the empty-blob and NUL-byte
  assertions came across verbatim, plus one the old test never made — binary
  blobs are still listed, just not read.
- `Assessment::is_high`, `Tree::get`, `approve::current_accepted` and
  `diff::full_recipe_text` were dead once their callers closed, and are gone.
- `set_risk_for_tests` is gone too. The bulk-refusal test needed a candidate
  marked high-risk, and the honest way to get one was for the fixture to write
  the row — `Env::execute` — rather than the library growing a public setter
  that exists only so a test can pass. That was the last budget above baseline
  apart from `error.pub`.

`error.pub` stays at 21 against a baseline of 15, and the report says why: the
six payload enums are constructed in four modules and matched in `error`, so
they are interface. `error.dead` is 0.

Final: 281 passed / 0 failed across 36 binaries (baseline 273), clippy
-D warnings clean, release clean, census within budget.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The census report gets its after-table, and the README's Layout gets rewritten
— it had drifted into fiction, listing `db/queries.rs`'s successors as "queries"
and omitting `usecase`, `error`, `hash`, `time`, `urlutil`, `git`, `fetch` and
`recipe` entirely. It now states the ranks and says plainly that they are
enforced by `tests/architecture.rs`, not kept in hope, and names the two
commands that keep it true.

This commit also carries the last of the narrowing that fell out of writing the
report, because writing it meant actually reading the numbers:

- `watch::upstream::resolve` looked test-only and was not — the tests contain an
  unrelated local function of the same name, which the census matches as a word.
  It is crate-internal and now says so.
- `read_tree` closed with it. Its two integration tests were testing the module's
  own batching behaviour from outside, so they moved inside as unit tests with a
  throwaway git repo, which is where a test about one `ls-tree` and one
  `cat-file --batch` belongs. They lost nothing: the empty-blob and NUL-byte
  assertions came across verbatim, plus one the old test never made — binary
  blobs are still listed, just not read.
- `Assessment::is_high`, `Tree::get`, `approve::current_accepted` and
  `diff::full_recipe_text` were dead once their callers closed, and are gone.
- `set_risk_for_tests` is gone too. The bulk-refusal test needed a candidate
  marked high-risk, and the honest way to get one was for the fixture to write
  the row — `Env::execute` — rather than the library growing a public setter
  that exists only so a test can pass. That was the last budget above baseline
  apart from `error.pub`.

`error.pub` stays at 21 against a baseline of 15, and the report says why: the
six payload enums are constructed in four modules and matched in `error`, so
they are interface. `error.dead` is 0.

Final: 281 passed / 0 failed across 36 binaries (baseline 273), clippy
-D warnings clean, release clean, census within budget.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: stop copying git's locks, and stop git making them</title>
<updated>2026-11-20T06:47:51+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T06:47:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=1aa7c13a4ae02bf47f5b76482e83c129bf6a438e'/>
<id>1aa7c13a4ae02bf47f5b76482e83c129bf6a438e</id>
<content type='text'>
copy_tree walked a live repo and tried to copy .git/objects/maintenance.lock
after git's detached maintenance had already removed it - a claim, not content,
and a copied index.lock would have made the copy refuse to run anyway. Locks are
skipped now, and the test git helper runs with maintenance.auto and gc.auto off,
so nothing repacks a repo behind a test that is still copying it. Background
maintenance spawns in a sampled pair of binaries went 72 to 21; the rest come
from the library's own clone and fetch, in directories nobody copies from.

Five consecutive full-suite runs clean, against roughly two in three failing
before.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
copy_tree walked a live repo and tried to copy .git/objects/maintenance.lock
after git's detached maintenance had already removed it - a claim, not content,
and a copied index.lock would have made the copy refuse to run anyway. Locks are
skipped now, and the test git helper runs with maintenance.auto and gc.auto off,
so nothing repacks a repo behind a test that is still copying it. Background
maintenance spawns in a sampled pair of binaries went 72 to 21; the rest come
from the library's own clone and fetch, in directories nobody copies from.

Five consecutive full-suite runs clean, against roughly two in three failing
before.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: prove the per-append delivery directly on the tail</title>
<updated>2026-11-19T23:38:28+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T23:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=7e3369e92d154c8ed532b977d5dd541398b5197d'/>
<id>7e3369e92d154c8ed532b977d5dd541398b5197d</id>
<content type='text'>
The HTTP test cannot show delivery per append: the stream response is buffered
until it ends, so every line lands in one read no matter what the tail is doing,
and the sleeps that used to stage the appends proved nothing. The property moves
to where it is observable - drive LogTail, append between reads, and each append
has to arrive as its own event. The socket test keeps proving the wiring, the
headers and the end event.

copy_tree now names the file it failed on, which it did not do before.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The HTTP test cannot show delivery per append: the stream response is buffered
until it ends, so every line lands in one read no matter what the tail is doing,
and the sleeps that used to stage the appends proved nothing. The property moves
to where it is observable - drive LogTail, append between reads, and each append
has to arrive as its own event. The socket test keeps proving the wiring, the
headers and the end event.

copy_tree now names the file it failed on, which it did not do before.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: what clippy -D warnings was holding</title>
<updated>2026-11-19T20:37:35+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T20:37:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=8a612ab7a62cf7ee48f45795b8b6760d2cabe76f'/>
<id>8a612ab7a62cf7ee48f45795b8b6760d2cabe76f</id>
<content type='text'>
Sandbox::default was a hand-written derivable_impl, and copy_tree borrowed an
owned PathBuf.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sandbox::default was a hand-written derivable_impl, and copy_tree borrowed an
owned PathBuf.
</pre>
</div>
</content>
</entry>
</feed>
