<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/src/db/audit.rs, branch ai/main</title>
<subtitle>Unnamed repository
</subtitle>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/'/>
<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>src: close the items the stricter detector surfaced</title>
<updated>2026-11-21T09:38:21+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T09:38:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=ae492c87ff66b9f2c8fec25a5ca917c438bf5858'/>
<id>ae492c87ff66b9f2c8fec25a5ca917c438bf5858</id>
<content type='text'>
The auditor's two counterexamples were real, and fixing the detector exposed
seventeen more items it had never listed. Each was checked individually rather
than dispositioned in bulk, and the check changed what the right answer was:

- `review::approve::withdraw` — gated. The CLI and the web UI both go through
  `usecase::withdraw_package`; nothing invokes this. tests/pipeline.rs pins its
  invariants, so it is gated rather than deleted: the test is the cover for an
  operation production has not grown yet.
- `pipeline::dispatch::Pool::shutdown` — gated. Production runs the pool until
  the process exits; a test needs the join to assert on effects after the
  threads stop. Its two fields now carry a matching `cfg_attr(allow(dead_code))`
  because in a release build they are stored and never read.
- `shims::{mkarchroot,makechrootpkg,makepkg,gpg,pacman,record}` — plain
  `pub(crate)`. `run` dispatches to them by tool name; no module outside `shims`
  names them and no test calls them. The tool names appear in test *strings*,
  which is not a caller.
- `db::Writer::start`, `fetch::open`, `http::Req::form`, `http::Page::new`,
  `http::Panel::new`, `http::render::BuildRow` — plain `pub(crate)`, same
  reason: used only from inside their own module.
- `db::AuditEntry::system` — deleted. `audit_system` builds the row through the
  free `audit()`; nothing ever called the constructor, production or otherwise.
- `pkgver::Version::display` — deleted, a wrapper around `to_string` with no
  callers.
- `http::Server`, `watch::Stale`, `pkgver::Version` — private inner module with a
  gated alias. `Server` is what `spawn` hands back and `main` holds without
  naming; `Stale` is what `stale_rows` returns to `http` and `ops`; `Version` is
  what `parse` returns. All three must stay nameable to those callers in shape
  but not in name, which is exactly what the inner-module alias gives.

Measured on the release build's public surface: 466 reachable public names at the
start of this goal, 402 now, newly-public set empty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The auditor's two counterexamples were real, and fixing the detector exposed
seventeen more items it had never listed. Each was checked individually rather
than dispositioned in bulk, and the check changed what the right answer was:

- `review::approve::withdraw` — gated. The CLI and the web UI both go through
  `usecase::withdraw_package`; nothing invokes this. tests/pipeline.rs pins its
  invariants, so it is gated rather than deleted: the test is the cover for an
  operation production has not grown yet.
- `pipeline::dispatch::Pool::shutdown` — gated. Production runs the pool until
  the process exits; a test needs the join to assert on effects after the
  threads stop. Its two fields now carry a matching `cfg_attr(allow(dead_code))`
  because in a release build they are stored and never read.
- `shims::{mkarchroot,makechrootpkg,makepkg,gpg,pacman,record}` — plain
  `pub(crate)`. `run` dispatches to them by tool name; no module outside `shims`
  names them and no test calls them. The tool names appear in test *strings*,
  which is not a caller.
- `db::Writer::start`, `fetch::open`, `http::Req::form`, `http::Page::new`,
  `http::Panel::new`, `http::render::BuildRow` — plain `pub(crate)`, same
  reason: used only from inside their own module.
- `db::AuditEntry::system` — deleted. `audit_system` builds the row through the
  free `audit()`; nothing ever called the constructor, production or otherwise.
- `pkgver::Version::display` — deleted, a wrapper around `to_string` with no
  callers.
- `http::Server`, `watch::Stale`, `pkgver::Version` — private inner module with a
  gated alias. `Server` is what `spawn` hands back and `main` holds without
  naming; `Stale` is what `stale_rows` returns to `http` and `ops`; `Version` is
  what `parse` returns. All three must stay nameable to those callers in shape
  but not in name, which is exactly what the inner-module alias gives.

Measured on the release build's public surface: 466 reachable public names at the
start of this goal, 402 now, newly-public set empty.
</pre>
</div>
</content>
</entry>
<entry>
<title>db: one module per aggregate, and an interface you can read</title>
<updated>2026-11-20T17:13:44+00:00</updated>
<author>
<name>dev</name>
<email>dev@localhost</email>
</author>
<published>2026-11-20T17:13:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=8cd32e5309b14f5264813e5f2ce6ecdb5aa41fb4'/>
<id>8cd32e5309b14f5264813e5f2ce6ecdb5aa41fb4</id>
<content type='text'>
queries.rs was 1,501 lines holding 83 queries across seventeen aggregates,
separated by comment banners that said "settings", "release", "notices" and
then kept them in one file. The banners were the design; they just never got
files. Each one has one now, verbatim — the split is provably content-only,
the moved text being identical to the original as a sorted set of lines.

model.rs and builds.rs were each two concerns deep, so they became
directories. model.rs held what a row looks like and, separately, the state
machines that say which moves are legal; builds.rs held the build machine and,
below its own `step rows` banner, the step machine. The impl_state_enum!
macro implements StateEnum for all five enums from one place, so it moved
with its invocations rather than being exported across a boundary to chase
them.

They are directories rather than new sibling modules on purpose:
`db::model::CandidateState` and `db::builds::steps` are used across the crate
and by the integration tests, and renaming them would be a bigger change than
the one being made. No call site and no test changed.

db/mod.rs now lists its interface instead of spraying one. `pub use model::*`
and `pub use queries::*` are gone, replaced by seventeen explicit exports, and
the query modules are private — so a query that was not chosen for export is
not reachable, and the width of the module is visible from its own text
rather than only from a grep.

The ratchet caught the win immediately: db.glob went 2 -&gt; 0, which failed
a_shrunk_interface_is_written_back until the budget was written back at the
new value. db is off the glob allowlist now rather than holding a stale zero.

277 passed / 0 failed, clippy -D warnings clean, largest file in src/db 363
lines (candidates.rs, unchanged from before this work).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
queries.rs was 1,501 lines holding 83 queries across seventeen aggregates,
separated by comment banners that said "settings", "release", "notices" and
then kept them in one file. The banners were the design; they just never got
files. Each one has one now, verbatim — the split is provably content-only,
the moved text being identical to the original as a sorted set of lines.

model.rs and builds.rs were each two concerns deep, so they became
directories. model.rs held what a row looks like and, separately, the state
machines that say which moves are legal; builds.rs held the build machine and,
below its own `step rows` banner, the step machine. The impl_state_enum!
macro implements StateEnum for all five enums from one place, so it moved
with its invocations rather than being exported across a boundary to chase
them.

They are directories rather than new sibling modules on purpose:
`db::model::CandidateState` and `db::builds::steps` are used across the crate
and by the integration tests, and renaming them would be a bigger change than
the one being made. No call site and no test changed.

db/mod.rs now lists its interface instead of spraying one. `pub use model::*`
and `pub use queries::*` are gone, replaced by seventeen explicit exports, and
the query modules are private — so a query that was not chosen for export is
not reachable, and the width of the module is visible from its own text
rather than only from a grep.

The ratchet caught the win immediately: db.glob went 2 -&gt; 0, which failed
a_shrunk_interface_is_written_back until the budget was written back at the
new value. db is off the glob allowlist now rather than holding a stale zero.

277 passed / 0 failed, clippy -D warnings clean, largest file in src/db 363
lines (candidates.rs, unchanged from before this work).
</pre>
</div>
</content>
</entry>
</feed>
