<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/src/http/render.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>usecase,http,pipeline,ops: keep the contract, drop the argument</title>
<updated>2026-11-23T13:44:20+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-23T13:44:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=4c143e969dcd7b6a18e5a86f9a754c9b62979ccf'/>
<id>4c143e969dcd7b6a18e5a86f9a754c9b62979ccf</id>
<content type='text'>
A workflow's doc now says what it guarantees and stops defending its
existence: `subscribe` resolves the repo row, `approve` queues what the
approval buys, a per-item failure comes back as a value instead of a
panic. The history of which front end used to open-code it is gone.

The last census-war notes go with it — three places that explained why a
name in a test string was not a caller.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A workflow's doc now says what it guarantees and stops defending its
existence: `subscribe` resolves the repo row, `approve` queues what the
approval buys, a per-item failure comes back as a value instead of a
panic. The history of which front end used to open-code it is gone.

The last census-war notes go with it — three places that explained why a
name in a test string was not a caller.
</pre>
</div>
</content>
</entry>
<entry>
<title>src,tests: retire the census commentary from the source</title>
<updated>2026-11-22T10:51:45+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-22T10:51:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=053dfbca8a4955a616e9b2c0f5a5d664c0db7aef'/>
<id>053dfbca8a4955a616e9b2c0f5a5d664c0db7aef</id>
<content type='text'>
A gated item used to carry its own defence: why it is `pub` only under
`test-support`, which census once mistook a filename for a caller, why a
wrapper is compiled out rather than deleted. The budget file already
holds those claims and the ratchet already checks them, so the source
keeps the one line that says what the item is.

The module headers stop narrating the refactor that produced them. What
survives is the wire protocol, the git pipe, the poisoned lock that must
be recovered rather than unwedged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A gated item used to carry its own defence: why it is `pub` only under
`test-support`, which census once mistook a filename for a caller, why a
wrapper is compiled out rather than deleted. The budget file already
holds those claims and the ratchet already checks them, so the source
keeps the one line that says what the item is.

The module headers stop narrating the refactor that produced them. What
survives is the wire protocol, the git pipe, the poisoned lock that must
be recovered rather than unwedged.
</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: narrow what only its own module reads, and delete what nothing reads at all</title>
<updated>2026-11-21T13:28:55+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T13:28:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=48fecfe03be4f214eaf4f9c49cb3c27496bb74ba'/>
<id>48fecfe03be4f214eaf4f9c49cb3c27496bb74ba</id>
<content type='text'>
The census's 35 `deadonly` items were a lead, not a verdict, and the compiler
answered it: 17 of them are read only inside their own module and were declared
`pub` for no reason, so they are `pub(crate)` now — `db::OpenReview` and its two
queries, `ReviewSubject` and its query, `fetch::Body`, `http`'s `form_get`,
`query_get` and `Page::flash`, `ops::EvictPlan`, `usecase`'s `StageB`… — and two
are read by nobody: `ReleaseState::can_transition` and
`SubscriptionState::can_transition`, both already annotated "nothing consults
this table today", which is the definition of dead rather than the argument for
keeping.

Narrowing them is what made the compiler look harder, and it found three more:
`ReviewSubject::pkgbase` was selected out of the database and never read,
`StageB::cached` was written in three places and never read, and
`StageB::version` was never called. All gone, the SELECT column with them.

The other 18 cannot be narrowed and now say so, once at the declaration and once
in the budget file: a row type the `aur-build` binary binds without naming
(`PackageRow`, `Checked`, `GcPlan`, `Prepared`), a type behind a `pub` fn a test
calls (`Unbuilt`, `BulkItem`, `StageA`, `CheckReport`, `PkgInfo`, `Installed`,
`Subscription`, `Manifest`), a trait a public test provisioner implements
(`Provisioner`, `ProvisionRequest`), and three that a release build never even
compiles because their module is `test-support`-gated (`shims::*`, `VirtualClock`).

`deadonly` therefore means *dead and unargued* now: an allowlisted item leaves the
dead columns, which is the only way the number can be held at zero forever.
448 pub, 49 dead, 0 unargued; 284 tests pass, one ignored, none lost.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The census's 35 `deadonly` items were a lead, not a verdict, and the compiler
answered it: 17 of them are read only inside their own module and were declared
`pub` for no reason, so they are `pub(crate)` now — `db::OpenReview` and its two
queries, `ReviewSubject` and its query, `fetch::Body`, `http`'s `form_get`,
`query_get` and `Page::flash`, `ops::EvictPlan`, `usecase`'s `StageB`… — and two
are read by nobody: `ReleaseState::can_transition` and
`SubscriptionState::can_transition`, both already annotated "nothing consults
this table today", which is the definition of dead rather than the argument for
keeping.

Narrowing them is what made the compiler look harder, and it found three more:
`ReviewSubject::pkgbase` was selected out of the database and never read,
`StageB::cached` was written in three places and never read, and
`StageB::version` was never called. All gone, the SELECT column with them.

The other 18 cannot be narrowed and now say so, once at the declaration and once
in the budget file: a row type the `aur-build` binary binds without naming
(`PackageRow`, `Checked`, `GcPlan`, `Prepared`), a type behind a `pub` fn a test
calls (`Unbuilt`, `BulkItem`, `StageA`, `CheckReport`, `PkgInfo`, `Installed`,
`Subscription`, `Manifest`), a trait a public test provisioner implements
(`Provisioner`, `ProvisionRequest`), and three that a release build never even
compiles because their module is `test-support`-gated (`shims::*`, `VirtualClock`).

`deadonly` therefore means *dead and unargued* now: an allowlisted item leaves the
dead columns, which is the only way the number can be held at zero forever.
448 pub, 49 dead, 0 unargued; 284 tests pass, one ignored, none lost.
</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>sandbox,http,review,watch: keep six more test-only types out of the release build</title>
<updated>2026-11-20T23:39:07+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T23:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=debb8af0ef0e72048b9df5fed40071745ea40c6b'/>
<id>debb8af0ef0e72048b9df5fed40071745ea40c6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>http, config, sandbox: apply the rest of the dispositions</title>
<updated>2026-11-20T21:12:59+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T21:12:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=72dcae2a04644609a30a90200edca368d131d600'/>
<id>72dcae2a04644609a30a90200edca368d131d600</id>
<content type='text'>
Five http items were being counted as test-pinned on the strength of a
string alone, and are now `pub(crate)`:

    render::Attention   the word appears in crash.rs inside a message
    Res::html           "text/html" is a content type, not a call
    Res::redirect       "redirect" appears in an assertion message
    routes::logout      "/logout" is a route path
    routes::route       "mutating route" appears in an assertion message

Nothing in the test tier calls any of them; each carries a comment saying
so, because "the census said a test needed this" is not a reason and will
be re-asked by the next person to read the line.

`config::TestHooks` was already half-gated — the `hooks` field and the
`Default` line that fills it are both behind `test-support` — while the
type and its impl were not, so a release binary compiled a struct it
could never construct, read, or deserialize. Now gated whole.

The live kata tier moved into `src/sandbox/kata.rs`. It is not a fixture
test: it records its own absence without /dev/kvm or AUR_KATA_API, the
same way the vercmp live tier does. It was the only thing outside the
module naming `K8sSandboxProvisioner` field by field, so that struct is
`pub(crate)` now too.

One correction to the table, and it is the kind of correction a heuristic
deserves: `http::cookie` and `http::login` were classified `move-test`
because their tests contain no harness keyword. They do — `Web::` starts a
real HTTP listener, and a test that talks to one is not a unit test
however little code it holds. The detector now knows that, and both items
are residue, which is what they always were.

http: 27 pub -&gt; 22 pub. Test-only items across the crate: 52 -&gt; 46.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Five http items were being counted as test-pinned on the strength of a
string alone, and are now `pub(crate)`:

    render::Attention   the word appears in crash.rs inside a message
    Res::html           "text/html" is a content type, not a call
    Res::redirect       "redirect" appears in an assertion message
    routes::logout      "/logout" is a route path
    routes::route       "mutating route" appears in an assertion message

Nothing in the test tier calls any of them; each carries a comment saying
so, because "the census said a test needed this" is not a reason and will
be re-asked by the next person to read the line.

`config::TestHooks` was already half-gated — the `hooks` field and the
`Default` line that fills it are both behind `test-support` — while the
type and its impl were not, so a release binary compiled a struct it
could never construct, read, or deserialize. Now gated whole.

The live kata tier moved into `src/sandbox/kata.rs`. It is not a fixture
test: it records its own absence without /dev/kvm or AUR_KATA_API, the
same way the vercmp live tier does. It was the only thing outside the
module naming `K8sSandboxProvisioner` field by field, so that struct is
`pub(crate)` now too.

One correction to the table, and it is the kind of correction a heuristic
deserves: `http::cookie` and `http::login` were classified `move-test`
because their tests contain no harness keyword. They do — `Web::` starts a
real HTTP listener, and a test that talks to one is not a unit test
however little code it holds. The detector now knows that, and both items
are residue, which is what they always were.

http: 27 pub -&gt; 22 pub. Test-only items across the crate: 52 -&gt; 46.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</pre>
</div>
</content>
</entry>
<entry>
<title>foundation, http: export what is used above you, and nothing else</title>
<updated>2026-11-20T18:49:22+00:00</updated>
<author>
<name>dev</name>
<email>dev@localhost</email>
</author>
<published>2026-11-20T18:49:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=6c4b4394bd8ddf28d130e87e0100349f13f6e912'/>
<id>6c4b4394bd8ddf28d130e87e0100349f13f6e912</id>
<content type='text'>
The leaf modules were the widest liars. `git` exported 19 names of which 5 were
named by nobody; `hash` exported a constant `EMPTY` that no code had ever
referenced; `time` exported a virtual clock, an `advance` and a `wrap` whose
only caller was a test that turned out not to exist. A leaf's interface is the
whole contract the rest of the crate can rely on, and these interfaces were
mostly decoration.

Nine items were genuinely dead and are gone: `hash::EMPTY`,
`git::{clone_source, count_commits, log_oneline, ls_remote_heads}`,
`recipe::is_diffable`, `pkginfo::values_of`, `time::virtual_now`, and a free
`time::advance` that had been shadowed by the `VirtualClock` method tests
actually call. Eighteen more were used only inside their own module and are now
private — `fetch`'s `Body` aside, which is the return type of a public parser
and so is part of the interface whether or not anyone writes its name.

http went 68 exported names to 27, and its last two glob re-exports
(`pub(crate) use mutations::*; use pages::*;`) are explicit lists now. That
makes the crate's glob count zero, so the allowlist in the architecture test is
empty and can stay that way.

Narrowing surfaced dead code that `pub` had been hiding, because a public item
is presumed used and never questioned: `Req::query` and `Req::body` were parsed
and stored and never read, `Res::found` had no callers, and `sse::FileBody` was
a reader nobody constructed. All four are deleted rather than re-published to
keep the warning quiet.

git 19→14, hash 8→7, recipe 11→7, urlutil 2→1, config 35→31, pkgver 18→14,
time 16→14, pkginfo 7→6, http 68→27. Crate totals: 585→516 pub, 219→115 dead,
4→0 globs.

281 passed / 0 failed, clippy -D warnings clean, release build clean,
architecture 8/8.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The leaf modules were the widest liars. `git` exported 19 names of which 5 were
named by nobody; `hash` exported a constant `EMPTY` that no code had ever
referenced; `time` exported a virtual clock, an `advance` and a `wrap` whose
only caller was a test that turned out not to exist. A leaf's interface is the
whole contract the rest of the crate can rely on, and these interfaces were
mostly decoration.

Nine items were genuinely dead and are gone: `hash::EMPTY`,
`git::{clone_source, count_commits, log_oneline, ls_remote_heads}`,
`recipe::is_diffable`, `pkginfo::values_of`, `time::virtual_now`, and a free
`time::advance` that had been shadowed by the `VirtualClock` method tests
actually call. Eighteen more were used only inside their own module and are now
private — `fetch`'s `Body` aside, which is the return type of a public parser
and so is part of the interface whether or not anyone writes its name.

http went 68 exported names to 27, and its last two glob re-exports
(`pub(crate) use mutations::*; use pages::*;`) are explicit lists now. That
makes the crate's glob count zero, so the allowlist in the architecture test is
empty and can stay that way.

Narrowing surfaced dead code that `pub` had been hiding, because a public item
is presumed used and never questioned: `Req::query` and `Req::body` were parsed
and stored and never read, `Res::found` had no callers, and `sse::FileBody` was
a reader nobody constructed. All four are deleted rather than re-published to
keep the warning quiet.

git 19→14, hash 8→7, recipe 11→7, urlutil 2→1, config 35→31, pkgver 18→14,
time 16→14, pkginfo 7→6, http 68→27. Crate totals: 585→516 pub, 219→115 dead,
4→0 globs.

281 passed / 0 failed, clippy -D warnings clean, release build clean,
architecture 8/8.
</pre>
</div>
</content>
</entry>
<entry>
<title>comments: keep only what the code cannot show</title>
<updated>2026-11-19T17:33:17+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T17:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=4304b0f336ddba7b4ec6780795059ff2066d105b'/>
<id>4304b0f336ddba7b4ec6780795059ff2066d105b</id>
<content type='text'>
Stripped every comment that described what an item does, documented its
arguments or fields, or cited the design docs (§n, I-n, m-n, decision n).
2247 comments down to 83.

What survives: the section dividers that segment the large modules, the
secret-handling warnings, the agent wire-frame directions, and the few notes
without which the code they attach to reads as redundant, reorderable, or
unsound.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stripped every comment that described what an item does, documented its
arguments or fields, or cited the design docs (§n, I-n, m-n, decision n).
2247 comments down to 83.

What survives: the section dividers that segment the large modules, the
secret-handling warnings, the agent wire-frame directions, and the few notes
without which the code they attach to reads as redundant, reorderable, or
unsound.
</pre>
</div>
</content>
</entry>
<entry>
<title>comments: say why, not what</title>
<updated>2026-11-19T17:09:59+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T17:09:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=e757979f1a2afdbe7146066345bb9acd19d3b151'/>
<id>e757979f1a2afdbe7146066345bb9acd19d3b151</id>
<content type='text'>
Every module-level `//!` header is gone, and the comments that remained
either re-explained the line below them or had grown into paragraphs.

Density went from one comment line per 6.7 lines of code to one per 10.
827 insertions against 2194 deletions across 86 files.

What survived: the invariants (I1-I12), the design cross-references into
DESIGN.md, and the notes recording a bug that was found and fixed — those
are the comments that carry weight, because they answer a question the
code cannot answer about itself. What did not: restating a function
signature in prose, and narration of the statement underneath.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every module-level `//!` header is gone, and the comments that remained
either re-explained the line below them or had grown into paragraphs.

Density went from one comment line per 6.7 lines of code to one per 10.
827 insertions against 2194 deletions across 86 files.

What survived: the invariants (I1-I12), the design cross-references into
DESIGN.md, and the notes recording a bug that was found and fixed — those
are the comments that carry weight, because they answer a question the
code cannot answer about itself. What did not: restating a function
signature in prose, and narration of the statement underneath.
</pre>
</div>
</content>
</entry>
</feed>
