<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/tools/test-surface.md, branch ai/main</title>
<subtitle>Unnamed repository
</subtitle>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/'/>
<entry>
<title>pipeline,sandbox,shims: thirty-two more markers the compiler was willing to take</title>
<updated>2026-11-21T19:29:41+00:00</updated>
<author>
<name>dev</name>
<email>dev@example.com</email>
</author>
<published>2026-11-21T19:29:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=bb1d533515c8f63faacb00b3ef59232cf2d4a1c5'/>
<id>bb1d533515c8f63faacb00b3ef59232cf2d4a1c5</id>
<content type='text'>
The whole `shims` module is behind `test-support`, so its thirteen `pub(crate)`
items were invisible to a release build already — but `pub(crate)` still made
each of them part of the crate's interface to every other module, and none of
them had a reader outside the file that declares it. `manifest`, `record`,
`split_version`, `valid_db_arg`, `DB_SUFFIXES` and the nine tool entry points
are now private to `src/shims/mod.rs`, which is where the shim binaries reach
them through the module's own `pub` surface.

`pipeline` went 16 -&gt; 4 and `sandbox` 16 -&gt; 9. Two refusals are worth the
sentence: `SourceIdentity` is the type of the `pub(crate)` field `Ctx::src`, and
a field may not be more reachable than its type, so making it private is the
`private_interfaces` warning rather than a legal narrowing. `provision_request`
is declared inside the private `kata_backend` module and called from the
sibling `#[cfg(test)] mod tests`, and privacy does not cross to a sibling —
E0624. Both are argued in `over_visibility.allowlist` now instead of sitting
unexplained.

`LOW` in `review` is the same sibling case one level up: it lives in the
`pub mod level` nested in risk.rs and the scorer in the parent module reads
`level::LOW`, so `pub(crate)` is the narrowest thing that reaches, given that
this crate does not admit `pub(super)`.

priv 149 -&gt; 117, overwide 21 -&gt; 0 unargued. `cargo check` clean under both
profiles with no new warnings; tests/pipeline.rs, remote_agent.rs, kata.rs,
approve.rs, shims.rs and world.rs pass (62 tests), and `cargo test --test
architecture` is 16 passed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The whole `shims` module is behind `test-support`, so its thirteen `pub(crate)`
items were invisible to a release build already — but `pub(crate)` still made
each of them part of the crate's interface to every other module, and none of
them had a reader outside the file that declares it. `manifest`, `record`,
`split_version`, `valid_db_arg`, `DB_SUFFIXES` and the nine tool entry points
are now private to `src/shims/mod.rs`, which is where the shim binaries reach
them through the module's own `pub` surface.

`pipeline` went 16 -&gt; 4 and `sandbox` 16 -&gt; 9. Two refusals are worth the
sentence: `SourceIdentity` is the type of the `pub(crate)` field `Ctx::src`, and
a field may not be more reachable than its type, so making it private is the
`private_interfaces` warning rather than a legal narrowing. `provision_request`
is declared inside the private `kata_backend` module and called from the
sibling `#[cfg(test)] mod tests`, and privacy does not cross to a sibling —
E0624. Both are argued in `over_visibility.allowlist` now instead of sitting
unexplained.

`LOW` in `review` is the same sibling case one level up: it lives in the
`pub mod level` nested in risk.rs and the scorer in the parent module reads
`level::LOW`, so `pub(crate)` is the narrowest thing that reaches, given that
this crate does not admit `pub(super)`.

priv 149 -&gt; 117, overwide 21 -&gt; 0 unargued. `cargo check` clean under both
profiles with no new warnings; tests/pipeline.rs, remote_agent.rs, kata.rs,
approve.rs, shims.rs and world.rs pass (62 tests), and `cargo test --test
architecture` is 16 passed.
</pre>
</div>
</content>
</entry>
<entry>
<title>http: ten request and response helpers were never crate-internal, just unmarked</title>
<updated>2026-11-21T19:27:26+00:00</updated>
<author>
<name>dev</name>
<email>dev@example.com</email>
</author>
<published>2026-11-21T19:27:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=0f18ebddc1c138c531e3e331786c7fa917d9186f'/>
<id>0f18ebddc1c138c531e3e331786c7fa917d9186f</id>
<content type='text'>
`http` declares 81 `pub(crate)` items, the densest cluster in the tree, and the
census called every one of them the good state. Ten of them are not
crate-internal at all: `State`, `Req`, `Res`, `logout`, and the five accessors
on `Req` and constructors on `Res` are named only from `http/mod.rs`, the file
that declares them. The router dispatches through them in the same file; the
`pub(crate)` was describing an outside caller that does not exist.

`cookie` is the one worth naming: it is the auth-cookie helper, it looked used
from `http/routes/mod.rs`, and what is used there is a *field* named `cookie`
on `Req`. A word-match census cannot tell those apart, which is the whole
reason this pass was done by stripping markers and compiling rather than by
reading the census output.

priv 159 -&gt; 149 (http 81 -&gt; 71), overwide 22 -&gt; 21. `cargo check` clean under
both profiles, no new warnings; tests/http.rs, surfaces.rs, notices.rs and
invariants.rs all pass (43 tests).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`http` declares 81 `pub(crate)` items, the densest cluster in the tree, and the
census called every one of them the good state. Ten of them are not
crate-internal at all: `State`, `Req`, `Res`, `logout`, and the five accessors
on `Req` and constructors on `Res` are named only from `http/mod.rs`, the file
that declares them. The router dispatches through them in the same file; the
`pub(crate)` was describing an outside caller that does not exist.

`cookie` is the one worth naming: it is the auth-cookie helper, it looked used
from `http/routes/mod.rs`, and what is used there is a *field* named `cookie`
on `Req`. A word-match census cannot tell those apart, which is the whole
reason this pass was done by stripping markers and compiling rather than by
reading the census output.

priv 159 -&gt; 149 (http 81 -&gt; 71), overwide 22 -&gt; 21. `cargo check` clean under
both profiles, no new warnings; tests/http.rs, surfaces.rs, notices.rs and
invariants.rs all pass (43 tests).
</pre>
</div>
</content>
</entry>
<entry>
<title>config,db,fetch,ops: eleven pub(crate) items nothing outside their own file reaches</title>
<updated>2026-11-21T19:25:47+00:00</updated>
<author>
<name>dev</name>
<email>dev@example.com</email>
</author>
<published>2026-11-21T19:25:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=533835c6b49111d5520ccd7a7bdd008a428b560f'/>
<id>533835c6b49111d5520ccd7a7bdd008a428b560f</id>
<content type='text'>
Every one of these was found by taking the marker off and asking the compiler,
under both profiles, not by reading a grep. `cargo check --all-targets` builds
with `test-support` on, so it never compiles the `cfg(not(test-support))` half
of a feature-conditional declaration; the release check is the one that says
whether that half can go private, and it refused several of them that the dev
check appeared to accept.

Narrowed to private: config `shared_workspace` and `store_dir` (both are the
`cfg(not(test-support))` twin of a `pub` that only tests reach), db
`state_col`, `start`, `call`, `send`, fetch `Body` and `open`, ops
`build_success_rate`, `STAGING_GRACE_SECS` and `sweep_staging`.

Refused, and now argued in the budget file rather than left unexplained:
`EvictPlan`, because `plan_retention` is `pub(crate)` and returns
`Vec&lt;EvictPlan&gt;`, so a private row type is `error: type EvictPlan is private`
at `usecase/maintenance.rs:23` where the Vec is bound. `Readers`,
`OpenReview` and `ReviewSubject` are the same story in `db`.

priv 170 -&gt; 159, overwide 27 -&gt; 22. `cargo check` clean under both profiles
with no new warnings, including no new dead_code; `cargo test --test
architecture` 16 passed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every one of these was found by taking the marker off and asking the compiler,
under both profiles, not by reading a grep. `cargo check --all-targets` builds
with `test-support` on, so it never compiles the `cfg(not(test-support))` half
of a feature-conditional declaration; the release check is the one that says
whether that half can go private, and it refused several of them that the dev
check appeared to accept.

Narrowed to private: config `shared_workspace` and `store_dir` (both are the
`cfg(not(test-support))` twin of a `pub` that only tests reach), db
`state_col`, `start`, `call`, `send`, fetch `Body` and `open`, ops
`build_success_rate`, `STAGING_GRACE_SECS` and `sweep_staging`.

Refused, and now argued in the budget file rather than left unexplained:
`EvictPlan`, because `plan_retention` is `pub(crate)` and returns
`Vec&lt;EvictPlan&gt;`, so a private row type is `error: type EvictPlan is private`
at `usecase/maintenance.rs:23` where the Vec is bound. `Readers`,
`OpenReview` and `ReviewSubject` are the same story in `db`.

priv 170 -&gt; 159, overwide 27 -&gt; 22. `cargo check` clean under both profiles
with no new warnings, including no new dead_code; `cargo test --test
architecture` 16 passed.
</pre>
</div>
</content>
</entry>
<entry>
<title>error,tools: a variant nothing constructed, and three tool constructs nothing read</title>
<updated>2026-11-21T17:07:56+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T17:07:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=689b82bfe36660c18cbce66a3f05550c4d02dc12'/>
<id>689b82bfe36660c18cbce66a3f05550c4d02dc12</id>
<content type='text'>
`Missing::Snapshot` was declared, rendered by the `Display` arm, and constructed
by nothing: `From&lt;&amp;str&gt; for Missing` routes a bare sentence to `Missing::Other`,
and the test that mentions a snapshot asserts `Other(_)`. The variant and its
formatting arm are gone. A variant scan that counted *mentions* could not see it,
because the formatting arm is a mention; the scan now ignores a line that only
renders the variant, and what it reports afterwards is `Error::Json` and
`Error::Sqlite`, both of which the compiler proves live — deleting either breaks
the hundred-odd `?` sites that reach them through `#[from]`.

Three survivors in `tools/`, none of them caught by the audit that claimed the
axis was empty, because that audit looked at module-level constants and function
parameters and never at local bindings:

- `test-surface.py` opened `render()` with `out = [...] if False else []`, a
  literal dead branch whose binding was then never read. Both gone.
- `test-surface.py` computed a `collisions` set that nothing consulted; the rule
  it narrated had moved into `mentioned` as `sole_owner`. The set is deleted and
  the explanation now sits in the docstring of the function that applies it.
- `release-surface-probe.py` built `decl_line` and used `decl_no` instead.

`a, b = item.split(" as ", 1)` became `_, b = ..` for the same reason. The scans
now cover locals and constant conditions as well, and report nothing: no unread
binding, no `if False`, no unreachable statement after a terminator, no unused
import, constant, parameter, or unread argparse option across the five tools.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Missing::Snapshot` was declared, rendered by the `Display` arm, and constructed
by nothing: `From&lt;&amp;str&gt; for Missing` routes a bare sentence to `Missing::Other`,
and the test that mentions a snapshot asserts `Other(_)`. The variant and its
formatting arm are gone. A variant scan that counted *mentions* could not see it,
because the formatting arm is a mention; the scan now ignores a line that only
renders the variant, and what it reports afterwards is `Error::Json` and
`Error::Sqlite`, both of which the compiler proves live — deleting either breaks
the hundred-odd `?` sites that reach them through `#[from]`.

Three survivors in `tools/`, none of them caught by the audit that claimed the
axis was empty, because that audit looked at module-level constants and function
parameters and never at local bindings:

- `test-surface.py` opened `render()` with `out = [...] if False else []`, a
  literal dead branch whose binding was then never read. Both gone.
- `test-surface.py` computed a `collisions` set that nothing consulted; the rule
  it narrated had moved into `mentioned` as `sole_owner`. The set is deleted and
  the explanation now sits in the docstring of the function that applies it.
- `release-surface-probe.py` built `decl_line` and used `decl_no` instead.

`a, b = item.split(" as ", 1)` became `_, b = ..` for the same reason. The scans
now cover locals and constant conditions as well, and report nothing: no unread
binding, no `if False`, no unreachable statement after a terminator, no unused
import, constant, parameter, or unread argparse option across the five tools.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: audit the tools, and let them regenerate what they already claim</title>
<updated>2026-11-21T14:09:28+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T14:09:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=141a14112554707e04bc2dd33f0c8071c1d74441'/>
<id>141a14112554707e04bc2dd33f0c8071c1d74441</id>
<content type='text'>
Five axes were asked of `tools/*.py` — unreachable statements, unused imports,
module-level functions no tool calls, constants nothing reads, parameters nothing
passes, and argparse options nothing reads — and all five came back empty, which
is worth recording because the alternative is to assume a script directory rots.
The one real finding was staleness rather than dead code: `tools/test-surface.md`
still cited line numbers from before the narrowing, and `tools/arch-census.md`
last recorded a census of 470 `pub` / 84 dead / 35 unargued. Both were
regenerated by the tools that own them, so the committed reports now say
448 / 49 / 0. `gen-vercmp-oracle.py` was run and reproduces the committed oracle
byte for byte.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Five axes were asked of `tools/*.py` — unreachable statements, unused imports,
module-level functions no tool calls, constants nothing reads, parameters nothing
passes, and argparse options nothing reads — and all five came back empty, which
is worth recording because the alternative is to assume a script directory rots.
The one real finding was staleness rather than dead code: `tools/test-surface.md`
still cited line numbers from before the narrowing, and `tools/arch-census.md`
last recorded a census of 470 `pub` / 84 dead / 35 unargued. Both were
regenerated by the tools that own them, so the committed reports now say
448 / 49 / 0. `gen-vercmp-oracle.py` was run and reproduces the committed oracle
byte for byte.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: a re-export is not a call, and an alias is not a stranger</title>
<updated>2026-11-21T11:06:01+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T11:06:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=7f5d3dc2ae540b7d4faf5e8c854e638fe70b9fd3'/>
<id>7f5d3dc2ae540b7d4faf5e8c854e638fe70b9fd3</id>
<content type='text'>
The auditor's `open_reviews_for` was invisible for one reason: the cross-module
mention index counted `pub use` lines as production use, so the item was
discarded before it could become a row. The tool's own docstring already said
"a re-export is not a call" — the rule was simply applied to the in-module loop
and never to the cross-module one. Two implementations of one idea, one of them
ignored.

Fixing that exposed the next layer, because once re-exports stop counting, the
calls that remain are mostly made through a name the declaring module did not
choose:

- `ap::approve(..)` from `use crate::review::{approve as ap, ..}`
- `sources::recipe_hash(..)` from `use crate::watch::sources;`
- `crate::db::model::BUILD_STEPS` — a path is not just its last token
- `candidates::mark_viewed(..)` — an item declared in `db`, re-exported by
  `review`, and called through `review`

So the mention resolver now resolves import prefixes, walks the whole qualified
path, and follows re-export edges (collected from the entire `use` statement,
not just its first line — the names live on the continuation lines, which is how
`mark_viewed` hid too).

It also learned the opposite lesson. `Vec::new()`, `v.parse::&lt;u64&gt;()` and
`stop.load(..)` are not mentions of `db::new`, `pkgver::parse` or
`pipeline::load`. Treating every unresolvable receiver as ambiguous buried the
real rows, so a qualified mention must now name a crate module or an imported
prefix to count as anything, and a method name declared in exactly one module is
credited on a value receiver — `cfg.validate()` is `config::validate`, because
nothing else in the crate could mean it. With that, the ambiguous column is empty
instead of full of noise.

`use_block_lines`, `gated_declarations`, `line_context` and `use_prefixes` each
re-read their file on every call — 15,280 reads of the same dozen files, two and
a half minutes per run. Memoised: 20.7s, same output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The auditor's `open_reviews_for` was invisible for one reason: the cross-module
mention index counted `pub use` lines as production use, so the item was
discarded before it could become a row. The tool's own docstring already said
"a re-export is not a call" — the rule was simply applied to the in-module loop
and never to the cross-module one. Two implementations of one idea, one of them
ignored.

Fixing that exposed the next layer, because once re-exports stop counting, the
calls that remain are mostly made through a name the declaring module did not
choose:

- `ap::approve(..)` from `use crate::review::{approve as ap, ..}`
- `sources::recipe_hash(..)` from `use crate::watch::sources;`
- `crate::db::model::BUILD_STEPS` — a path is not just its last token
- `candidates::mark_viewed(..)` — an item declared in `db`, re-exported by
  `review`, and called through `review`

So the mention resolver now resolves import prefixes, walks the whole qualified
path, and follows re-export edges (collected from the entire `use` statement,
not just its first line — the names live on the continuation lines, which is how
`mark_viewed` hid too).

It also learned the opposite lesson. `Vec::new()`, `v.parse::&lt;u64&gt;()` and
`stop.load(..)` are not mentions of `db::new`, `pkgver::parse` or
`pipeline::load`. Treating every unresolvable receiver as ambiguous buried the
real rows, so a qualified mention must now name a crate module or an imported
prefix to count as anything, and a method name declared in exactly one module is
credited on a value receiver — `cfg.validate()` is `config::validate`, because
nothing else in the crate could mean it. With that, the ambiguous column is empty
instead of full of noise.

`use_block_lines`, `gated_declarations`, `line_context` and `use_prefixes` each
re-read their file on every call — 15,280 reads of the same dozen files, two and
a half minutes per run. Memoised: 20.7s, same output.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: key items by (module, name), and prove the surface by compiling</title>
<updated>2026-11-21T09:38:33+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T09:38:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=d3da3a1882999a80db34089153f9684fd8d7bbee'/>
<id>d3da3a1882999a80db34089153f9684fd8d7bbee</id>
<content type='text'>
The auditor's two counterexamples were both detector bugs, and they were the
same class of bug as the ones before: the instrument was reading the source in a
way that flattered the number.

- Rows are keyed by `(module, name)`. Keyed by bare name,
  `pipeline::dispatch::Pool::shutdown` merged into the `db::Writer::shutdown`
  row, which is gated, so an ungated item was reported `already-gated`.
- The production-mention index is built from lines with comments and string
  literals removed. Searching raw text made `review::approve::withdraw` look
  production-used because the *string* "withdraw" appears in an HTTP route
  pattern and an audit action; every real caller named `withdraw_package` or
  `withdraw_release_in`, which are different items.
- A `pub` declaration inside a private module is not a public declaration.
  Without that, the inner-module narrowing made the detector report an
  `http::new` nobody could name.
- For a name declared in several modules — `new`, `open`, `record`, `parse` — a
  bare mention elsewhere cannot be resolved, so the row is kept and flagged
  `ambiguous` rather than silently dropped, and
  `tools/test-surface-ambiguous.json` holds the human verdict. An ambiguous row
  with no verdict fails the architecture test; "the tool could not tell" is not a
  disposition.
- The count rule was duplicated between `--json` and `--write-budget` and the
  two drifted the moment a rule was added to one. `tally()` is now the one place.

`tools/release-surface-probe.py` replaces inference with compilation for the
final claim. It writes a throwaway crate depending on `aur-build` twice, with and
without `test-support`, and tries to name every dispositioned item from outside.
A path that compiles with the feature proves the path is real; every such path
must fail without it. Current result: 28 real external paths, 27 closed in a
release build, and the one that stays open is `db::Writer`, which is public
because `Db` has a `pub writer: Writer` field and Rust will not type a public
field with a private type. That is recorded as `interface` in
`tools/test-surface-interface.json` — a disposition that admits reachability and
names the signature that forces it — and the probe fails if the file claims an
item that is not in fact reachable, so it cannot quietly rot.

The tool's own docstring and the generated table claimed "Rust has no
test-conditional visibility". That was false and is gone, replaced with the two
shapes that do it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The auditor's two counterexamples were both detector bugs, and they were the
same class of bug as the ones before: the instrument was reading the source in a
way that flattered the number.

- Rows are keyed by `(module, name)`. Keyed by bare name,
  `pipeline::dispatch::Pool::shutdown` merged into the `db::Writer::shutdown`
  row, which is gated, so an ungated item was reported `already-gated`.
- The production-mention index is built from lines with comments and string
  literals removed. Searching raw text made `review::approve::withdraw` look
  production-used because the *string* "withdraw" appears in an HTTP route
  pattern and an audit action; every real caller named `withdraw_package` or
  `withdraw_release_in`, which are different items.
- A `pub` declaration inside a private module is not a public declaration.
  Without that, the inner-module narrowing made the detector report an
  `http::new` nobody could name.
- For a name declared in several modules — `new`, `open`, `record`, `parse` — a
  bare mention elsewhere cannot be resolved, so the row is kept and flagged
  `ambiguous` rather than silently dropped, and
  `tools/test-surface-ambiguous.json` holds the human verdict. An ambiguous row
  with no verdict fails the architecture test; "the tool could not tell" is not a
  disposition.
- The count rule was duplicated between `--json` and `--write-budget` and the
  two drifted the moment a rule was added to one. `tally()` is now the one place.

`tools/release-surface-probe.py` replaces inference with compilation for the
final claim. It writes a throwaway crate depending on `aur-build` twice, with and
without `test-support`, and tries to name every dispositioned item from outside.
A path that compiles with the feature proves the path is real; every such path
must fail without it. Current result: 28 real external paths, 27 closed in a
release build, and the one that stays open is `db::Writer`, which is public
because `Db` has a `pub writer: Writer` field and Rust will not type a public
field with a private type. That is recorded as `interface` in
`tools/test-surface-interface.json` — a disposition that admits reachability and
names the signature that forces it — and the probe fails if the file claims an
item that is not in fact reachable, so it cannot quietly rot.

The tool's own docstring and the generated table claimed "Rust has no
test-conditional visibility". That was false and is gone, replaced with the two
shapes that do it.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: the detector learns to see through a private inner module</title>
<updated>2026-11-20T23:53:49+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T23:53:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=28023ba17adbe6fc096a31d5e2c62d017a88fc4c'/>
<id>28023ba17adbe6fc096a31d5e2c62d017a88fc4c</id>
<content type='text'>
`aliased_behind_private_module` reports an item as not release-exposed only when
both halves of the pattern hold: a `pub use ..::NAME;` whose attribute block
carries the test-support gate, and every `pub` declaration of the name sitting
inside a module that is itself private. Either half alone is not enough — a
gated alias to a genuinely public type says nothing, and a `pub` type in a
public module is reachable whatever the alias says.

The census still counts the inner `pub` as a public declaration, which is the
honest reading of the text and the reason this needed a second check rather than
a change to the first.

New `narrowed` disposition, distinct from `already-gated`: production *does* use
these items, just never from outside their module. `residue` and `ungated` are
now 0 and the ratchet records it.

Every one of the 46 items carries a hand-written reason naming its production
caller or explaining why it has none.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`aliased_behind_private_module` reports an item as not release-exposed only when
both halves of the pattern hold: a `pub use ..::NAME;` whose attribute block
carries the test-support gate, and every `pub` declaration of the name sitting
inside a module that is itself private. Either half alone is not enough — a
gated alias to a genuinely public type says nothing, and a `pub` type in a
public module is reachable whatever the alias says.

The census still counts the inner `pub` as a public declaration, which is the
honest reading of the text and the reason this needed a second check rather than
a change to the first.

New `narrowed` disposition, distinct from `already-gated`: production *does* use
these items, just never from outside their module. `residue` and `ungated` are
now 0 and the ratchet records it.

Every one of the 46 items carries a hand-written reason naming its production
caller or explaining why it has none.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: the test-surface detector credited four items with callers they lack</title>
<updated>2026-11-20T22:13:44+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T22:13:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=92ecaabd7c62d029eba239e95cc8a7d2520fe4a9'/>
<id>92ecaabd7c62d029eba239e95cc8a7d2520fe4a9</id>
<content type='text'>
An audit found that `internal` — the check deciding whether a test-only item
has a real production caller — was crediting non-calls. Four items were
sorted into `residue` on false evidence, and each false credit was a
different mistake:

  db::cas_accepted_release   a `pub use` continuation line at db/mod.rs:55.
                             Production does this CAS through
                             `cas_accepted_release_in` inside a transaction;
                             the two names differ by three characters.
  shims::invocations         the string "invocations.jsonl", plus a call from
                             `called_with`, which is itself test-support
                             gated. A test-only function cannot be evidence
                             that another function is production-used.
  sandbox::LocalAgentProvisioner   its own struct and impl headers.
                             Production selects `K8sSandboxProvisioner`.
  sandbox::local_addr        `listener.local_addr()` — std's method on a
                             TcpListener, in sibling files. The census treats
                             all of src/sandbox as one module, and a name
                             match cannot tell a receiver's type.

All four are gated now. `KataBackend::local_addr` had zero callers in src and
zero in tests — `tests/remote_agent.rs` calls `RemoteBackend::local_addr`, a
different type — so it is deleted rather than gated.

The detector now strips string literals and comments, skips `use` statements
including the continuation lines of a brace-delimited block, skips an item's
own impl headers, and refuses to count a call made inside a `#[cfg(test)]`
module or a `test-support`-gated item.

The case a regex cannot resolve is `self.store_dir()` versus
`listener.local_addr()`: identical to a name match. Rows whose only evidence
is a call in method position are flagged `⚑`, listed in
`tools/test-surface-confirmed.json` only after a human read the cited line,
and `the_test_surface_is_disposed_of` fails on any unconfirmed one. Four rows
are confirmed that way — `config.store_dir`, `http.cookie`,
`ops.build_success_rate`, `watch.needs_stage_b`.

The table now prints each item's in-module call sites as its own column,
because the residue count is the one number this work cannot eliminate and the
claim underneath it has to be checkable rather than asserted.

Suite: 284 passed, 0 failed. Clippy clean. Release build clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An audit found that `internal` — the check deciding whether a test-only item
has a real production caller — was crediting non-calls. Four items were
sorted into `residue` on false evidence, and each false credit was a
different mistake:

  db::cas_accepted_release   a `pub use` continuation line at db/mod.rs:55.
                             Production does this CAS through
                             `cas_accepted_release_in` inside a transaction;
                             the two names differ by three characters.
  shims::invocations         the string "invocations.jsonl", plus a call from
                             `called_with`, which is itself test-support
                             gated. A test-only function cannot be evidence
                             that another function is production-used.
  sandbox::LocalAgentProvisioner   its own struct and impl headers.
                             Production selects `K8sSandboxProvisioner`.
  sandbox::local_addr        `listener.local_addr()` — std's method on a
                             TcpListener, in sibling files. The census treats
                             all of src/sandbox as one module, and a name
                             match cannot tell a receiver's type.

All four are gated now. `KataBackend::local_addr` had zero callers in src and
zero in tests — `tests/remote_agent.rs` calls `RemoteBackend::local_addr`, a
different type — so it is deleted rather than gated.

The detector now strips string literals and comments, skips `use` statements
including the continuation lines of a brace-delimited block, skips an item's
own impl headers, and refuses to count a call made inside a `#[cfg(test)]`
module or a `test-support`-gated item.

The case a regex cannot resolve is `self.store_dir()` versus
`listener.local_addr()`: identical to a name match. Rows whose only evidence
is a call in method position are flagged `⚑`, listed in
`tools/test-surface-confirmed.json` only after a human read the cited line,
and `the_test_surface_is_disposed_of` fails on any unconfirmed one. Four rows
are confirmed that way — `config.store_dir`, `http.cookie`,
`ops.build_success_rate`, `watch.needs_stage_b`.

The table now prints each item's in-module call sites as its own column,
because the residue count is the one number this work cannot eliminate and the
claim underneath it has to be checkable rather than asserted.

Suite: 284 passed, 0 failed. Clippy clean. Release build clean.
</pre>
</div>
</content>
</entry>
<entry>
<title>review, shims, time: gate the last three test-only entry points</title>
<updated>2026-11-20T21:20:05+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T21:20:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=b3c326735e4c212afed8c6a25411a1040a67f760'/>
<id>b3c326735e4c212afed8c6a25411a1040a67f760</id>
<content type='text'>
`review::diff::render_and_store` is the alarming row in the table: zero
callers in `src/`, seventeen test files. Intake renders through
`review::intake::record` — the single entry point the pipeline and both
front ends use — and this is the older uncomposed form. It is gated, not
relocated to `tests/common`, because it needs this module's private
`panels`/`render_text` and `candidates::set_diff_digest`; widening those
to let a test out would undo the narrowing the last dozen commits did.

`shims::called_with` is gated: the shim *writes* its invocation log in
production, which is how a fake tool leaves evidence, but nothing in the
crate reads it back. Only tests ask what a build actually did.

`time::pin` and `time::unpin` are gated together. Gating half of a
two-function capability would leave a release binary able to freeze the
clock and unable to release it. `pin` is worth naming because the census
never reported it as test-only at all: its name match also fires inside
`upstream_pins`, so a genuinely test-only function hid in plain sight
until its counterpart was examined. The only callers in the crate are
tests, and the unit test that uses them is gated with them.

Nothing was relocated to `tests/common`. The table chose no `relocate`
disposition — every item either needed module-private internals or moved
into its own module instead — and no API was widened to accommodate a
test, which was the condition on relocating anything.

Test-only items across the crate: 61 at the start of this work, 46 now,
of which 33 are residue and 13 already gated. `gate_pending` is zero.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`review::diff::render_and_store` is the alarming row in the table: zero
callers in `src/`, seventeen test files. Intake renders through
`review::intake::record` — the single entry point the pipeline and both
front ends use — and this is the older uncomposed form. It is gated, not
relocated to `tests/common`, because it needs this module's private
`panels`/`render_text` and `candidates::set_diff_digest`; widening those
to let a test out would undo the narrowing the last dozen commits did.

`shims::called_with` is gated: the shim *writes* its invocation log in
production, which is how a fake tool leaves evidence, but nothing in the
crate reads it back. Only tests ask what a build actually did.

`time::pin` and `time::unpin` are gated together. Gating half of a
two-function capability would leave a release binary able to freeze the
clock and unable to release it. `pin` is worth naming because the census
never reported it as test-only at all: its name match also fires inside
`upstream_pins`, so a genuinely test-only function hid in plain sight
until its counterpart was examined. The only callers in the crate are
tests, and the unit test that uses them is gated with them.

Nothing was relocated to `tests/common`. The table chose no `relocate`
disposition — every item either needed module-private internals or moved
into its own module instead — and no API was widened to accommodate a
test, which was the condition on relocating anything.

Test-only items across the crate: 61 at the start of this work, 46 now,
of which 33 are residue and 13 already gated. `gate_pending` is zero.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</pre>
</div>
</content>
</entry>
</feed>
