<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/src/review/approve.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: 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>src: keep every remaining test-only item out of the release build</title>
<updated>2026-11-20T23:53:42+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T23:53:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=66814ddb86009de7a519f167db634dab3e924fa8'/>
<id>66814ddb86009de7a519f167db634dab3e924fa8</id>
<content type='text'>
The auditor was right and my "Rust has no test-conditional visibility" defence
was wrong. Two shapes do it, and both are now used wherever the item allows.

For free functions, methods, consts and statics: one body behind two visibility
declarations.

    #[cfg(feature = "test-support")]      pub fn probe(..) -&gt; .. { probe_impl(..) }
    #[cfg(not(feature = "test-support"))] pub(crate) fn probe(..) -&gt; .. { probe_impl(..) }
    fn probe_impl(..) -&gt; .. { .. }

The value lives once in a private `*_impl` / `*_VALUE`, so the aliases cannot
drift apart.

For types: a private inner module holding the real definition, re-exported under
a feature gate.

    mod kata_backend { pub struct KataBackend { .. } }
    #[cfg(feature = "test-support")]      pub use kata_backend::KataBackend;
    #[cfg(not(feature = "test-support"))] pub(crate) use kata_backend::KataBackend;

A `pub` item inside a private module has no nameable path from outside, but it is
visible enough to appear in a public trait signature — which is why `Exit`, the
return type of `Sandbox::run`, narrows this way and would not as a plain
`pub(crate) struct`. `ReleaseState` earns its keep the same route: `ReleaseRow`
is public and its `state` field is typed here.

Verified with an external crate against the built library: naming `Exit`,
`SandboxInfo`, `KataBackend`, `LoopbackBackend`, `RemoteBackend`, `ReleaseState`,
`BulkRefusal` or `LogTail` from a release build is `error[E0603]: .. is private`;
with `test-support` the same program compiles.

Where narrowing needed a re-export split by feature (`db::MIGRATIONS`,
`model::ReleaseState`) the alias is split; where nothing in the crate used the
alias (`watch::sync_mirror`) it is gone rather than gated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The auditor was right and my "Rust has no test-conditional visibility" defence
was wrong. Two shapes do it, and both are now used wherever the item allows.

For free functions, methods, consts and statics: one body behind two visibility
declarations.

    #[cfg(feature = "test-support")]      pub fn probe(..) -&gt; .. { probe_impl(..) }
    #[cfg(not(feature = "test-support"))] pub(crate) fn probe(..) -&gt; .. { probe_impl(..) }
    fn probe_impl(..) -&gt; .. { .. }

The value lives once in a private `*_impl` / `*_VALUE`, so the aliases cannot
drift apart.

For types: a private inner module holding the real definition, re-exported under
a feature gate.

    mod kata_backend { pub struct KataBackend { .. } }
    #[cfg(feature = "test-support")]      pub use kata_backend::KataBackend;
    #[cfg(not(feature = "test-support"))] pub(crate) use kata_backend::KataBackend;

A `pub` item inside a private module has no nameable path from outside, but it is
visible enough to appear in a public trait signature — which is why `Exit`, the
return type of `Sandbox::run`, narrows this way and would not as a plain
`pub(crate) struct`. `ReleaseState` earns its keep the same route: `ReleaseRow`
is public and its `state` field is typed here.

Verified with an external crate against the built library: naming `Exit`,
`SandboxInfo`, `KataBackend`, `LoopbackBackend`, `RemoteBackend`, `ReleaseState`,
`BulkRefusal` or `LogTail` from a release build is `error[E0603]: .. is private`;
with `test-support` the same program compiles.

Where narrowing needed a re-export split by feature (`db::MIGRATIONS`,
`model::ReleaseState`) the alias is split; where nothing in the crate used the
alias (`watch::sync_mirror`) it is gone rather than gated.
</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>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>error: give the six variants behavior carries a shape, not a sentence</title>
<updated>2026-11-20T18:20:18+00:00</updated>
<author>
<name>dev</name>
<email>dev@localhost</email>
</author>
<published>2026-11-20T18:20:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=bbae6c8e83cf145f9af472f69591bae804d03048'/>
<id>bbae6c8e83cf145f9af472f69591bae804d03048</id>
<content type='text'>
`Error::NotFound("no repo row; run `aur-build init`")` and
`Error::NotFound("pkgbase linux")` were the same variant. One is "the install
was never initialised, every page is wrong"; the other is "that page does not
exist, answer 404". The difference lived inside a string, so the only way to
act on it was to re-parse text the same process had written moments earlier.

Six variants now carry structure:

  Missing        pkgbase / candidate / release / build / snapshot /
                 mirror path / repo row
  Refused        IllegalTransition / WrongState / PointerMoved / Other
  Guard          HashMismatch / DigestMismatch / Invariant
  WorldGap       MissingPin / Other
  PoolFull       Backend{backend} / Other
  TransientCause Upstream / Command / Other

`Refused` distinguishes the three refusals that were indistinguishable: a
transition no edge permits (caller bug), a row in the wrong state (stale
view), and the accepted pointer moving under a build (a lost race, and the
one a client may safely retry). `PoolFull::Backend` names which pool, because
a kata quota needs an operator and a local cap clears when a build exits.

`is_transient` and `is_pool_exhausted` already matched on variants rather than
strings, so they are unchanged — the typing is what lets the *next* branch be
a match instead of a `contains`.

No test assertion was edited. Where a message is load-bearing the Display was
written to reproduce it: `recipe_hash mismatch: approved X, materialized Y`,
`no release 4`, `illegal candidate transition approved → rejected`, `sandbox
world is missing plain-make-1.0-1 after installing the lease set` and kata's
`never dialed in` all come out of the new types byte-identical. Five messages
did change wording, none asserted anywhere:

  release N is X, not published: nothing to withdraw
    -&gt; release N is X, not published          (Refused::WrongState's shape)
  illegal candidate transition a → b for review 7
    -&gt; ... for candidate 7                   (it is a candidate id; "review"
                                              was misleading)
  no candidate 7 to resolve -&gt; candidate 7   (Missing::Candidate's shape)
  lease artifact n-v: store bytes hash to A but the index says B
    -&gt; source n-v hashed to A but the candidate recorded B  (shares
       Guard::DigestMismatch with the source-cache check)
  vcs_cache clone URL: err -&gt; upstream: vcs_cache clone URL: err
                                              (TransientCause::Upstream tag)

error.pub 15-&gt;21 is the six payload enums, which is the point of the task
rather than a widening to apologise for. watch.dead/test each rose by one for
a subtler reason: `watch::upstream::resolve` looked live only because an
unrelated db message ended "... to resolve", and rewording that string removed
the phantom mention. The census now documents that a clean count is not always
an answer, since mentions are matched over raw source including string
literals.

281 passed / 0 failed (277 plus four new typing tests in src/error.rs), clippy
-D warnings clean, release build clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Error::NotFound("no repo row; run `aur-build init`")` and
`Error::NotFound("pkgbase linux")` were the same variant. One is "the install
was never initialised, every page is wrong"; the other is "that page does not
exist, answer 404". The difference lived inside a string, so the only way to
act on it was to re-parse text the same process had written moments earlier.

Six variants now carry structure:

  Missing        pkgbase / candidate / release / build / snapshot /
                 mirror path / repo row
  Refused        IllegalTransition / WrongState / PointerMoved / Other
  Guard          HashMismatch / DigestMismatch / Invariant
  WorldGap       MissingPin / Other
  PoolFull       Backend{backend} / Other
  TransientCause Upstream / Command / Other

`Refused` distinguishes the three refusals that were indistinguishable: a
transition no edge permits (caller bug), a row in the wrong state (stale
view), and the accepted pointer moving under a build (a lost race, and the
one a client may safely retry). `PoolFull::Backend` names which pool, because
a kata quota needs an operator and a local cap clears when a build exits.

`is_transient` and `is_pool_exhausted` already matched on variants rather than
strings, so they are unchanged — the typing is what lets the *next* branch be
a match instead of a `contains`.

No test assertion was edited. Where a message is load-bearing the Display was
written to reproduce it: `recipe_hash mismatch: approved X, materialized Y`,
`no release 4`, `illegal candidate transition approved → rejected`, `sandbox
world is missing plain-make-1.0-1 after installing the lease set` and kata's
`never dialed in` all come out of the new types byte-identical. Five messages
did change wording, none asserted anywhere:

  release N is X, not published: nothing to withdraw
    -&gt; release N is X, not published          (Refused::WrongState's shape)
  illegal candidate transition a → b for review 7
    -&gt; ... for candidate 7                   (it is a candidate id; "review"
                                              was misleading)
  no candidate 7 to resolve -&gt; candidate 7   (Missing::Candidate's shape)
  lease artifact n-v: store bytes hash to A but the index says B
    -&gt; source n-v hashed to A but the candidate recorded B  (shares
       Guard::DigestMismatch with the source-cache check)
  vcs_cache clone URL: err -&gt; upstream: vcs_cache clone URL: err
                                              (TransientCause::Upstream tag)

error.pub 15-&gt;21 is the six payload enums, which is the point of the task
rather than a widening to apologise for. watch.dead/test each rose by one for
a subtler reason: `watch::upstream::resolve` looked live only because an
unrelated db message ended "... to resolve", and rewording that string removed
the phantom mention. The census now documents that a clean count is not always
an answer, since mentions are matched over raw source including string
literals.

281 passed / 0 failed (277 plus four new typing tests in src/error.rs), clippy
-D warnings clean, release build clean.
</pre>
</div>
</content>
</entry>
<entry>
<title>review: one call to record a candidate, and one way to read one</title>
<updated>2026-11-20T17:41:34+00:00</updated>
<author>
<name>dev</name>
<email>dev@localhost</email>
</author>
<published>2026-11-20T17:41:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=1cd680c12dc191bfbf7afa8ad8308524776e60ae'/>
<id>1cd680c12dc191bfbf7afa8ad8308524776e60ae</id>
<content type='text'>
`watch::detect` was performing review's write protocol by hand: look up the
accepted release, upsert the candidate, assess the risk, store the risk, work
out the missing dependencies, store those. Six calls that only make sense in
that order, issued from a module whose job is noticing that an upstream moved.
Get the order wrong and nothing complains — the candidate just quietly has no
risk score, and the reviewer approves it without one.

`review::intake::record` is the protocol now. The watcher hands over what it
observed and review decides what it means. `missing_deps` moved with it: it
computes a risk signal, which is a review question that happened to be living
in the watcher.

`accepted_for` was not a review question either. It reads a pointer column off
the pkgbase row, so it is now `db::accepted_release_for` — the watcher asks
persistence what is currently accepted, rather than asking review as a favour.

With intake owning the write path, three things became internal and closed:
`upsert_candidate`, `risk::assess`, and the risk/missing-deps column setters.
`approve::approval_for` was a pass-through to db that only the pipeline called;
it is gone, and the pipeline now asks `review::reads::{candidate, approval}` —
two named facts instead of a re-export of review's storage layout.

The budget rose in two places and both are moves, not growth: db.pub 201-&gt;202
is `accepted_release_for` arriving from review, and review.test 4-&gt;5 is
`set_risk_for_tests`, the one place a fixture still needs to force a score.
review.pub itself is unchanged at 29 — four names added, four removed.

`priv` was also dropped from the budget keys. Counting `pub(crate)` items
against a ceiling was backwards: closing an interface raises that number, so a
budget that punishes it punishes the work. The Rust test never checked it.

277 passed / 0 failed, clippy -D warnings clean, and every detect, approve and
staleness assertion intact.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`watch::detect` was performing review's write protocol by hand: look up the
accepted release, upsert the candidate, assess the risk, store the risk, work
out the missing dependencies, store those. Six calls that only make sense in
that order, issued from a module whose job is noticing that an upstream moved.
Get the order wrong and nothing complains — the candidate just quietly has no
risk score, and the reviewer approves it without one.

`review::intake::record` is the protocol now. The watcher hands over what it
observed and review decides what it means. `missing_deps` moved with it: it
computes a risk signal, which is a review question that happened to be living
in the watcher.

`accepted_for` was not a review question either. It reads a pointer column off
the pkgbase row, so it is now `db::accepted_release_for` — the watcher asks
persistence what is currently accepted, rather than asking review as a favour.

With intake owning the write path, three things became internal and closed:
`upsert_candidate`, `risk::assess`, and the risk/missing-deps column setters.
`approve::approval_for` was a pass-through to db that only the pipeline called;
it is gone, and the pipeline now asks `review::reads::{candidate, approval}` —
two named facts instead of a re-export of review's storage layout.

The budget rose in two places and both are moves, not growth: db.pub 201-&gt;202
is `accepted_release_for` arriving from review, and review.test 4-&gt;5 is
`set_risk_for_tests`, the one place a fixture still needs to force a score.
review.pub itself is unchanged at 29 — four names added, four removed.

`priv` was also dropped from the budget keys. Counting `pub(crate)` items
against a ceiling was backwards: closing an interface raises that number, so a
budget that punishes it punishes the work. The Rust test never checked it.

277 passed / 0 failed, clippy -D warnings clean, and every detect, approve and
staleness assertion intact.
</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>
</feed>
