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

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

Removing those mentions moved two measured numbers, and the ratchet was
right to complain. `db.Writer` now sits in the allowlist with the
compiler fact that keeps it `pub` — narrowing it makes every call site
say `type db::Writer is private` — and the counts that got smaller are
written back at the smaller value, as the ratchet demands.
</pre>
</div>
</content>
</entry>
<entry>
<title>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>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>db, sandbox: apply the dispositions the table decided</title>
<updated>2026-11-20T21:03:58+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-20T21:03:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=2210c934d4a25602318f094e0eca72f42862d44a'/>
<id>2210c934d4a25602318f094e0eca72f42862d44a</id>
<content type='text'>
Six db items are now gated behind `test-support`, each with a comment
saying what it is for and why production never calls it:

    builds::claim            production leases a batch; `claim_batch` is
                             what the dispatcher runs
    settings::set_setting    the readers are used, the setter is not
    Writer::shutdown         the server runs until the process ends
    snapshots::snapshot_by_commit
    world::world_members     production writes world snapshots, never
                             reads one back member by member
    invariants::unapproved_index_entries
                             gated, not relocated: reading it needs this
                             module's private helpers, and widening those
                             to let a test out would be the wrong trade

Gating them exposed three things they were the only user of, and each is
gated with them rather than left compiling into a binary that cannot reach
it: `Msg::Shutdown` and its loop arm, and `model::json_or`.
`arch-census.py --write-budget` also stopped erasing the `test_surface`
section — two writers of one file must not delete each other's axis, or
the ratchet quietly stops checking it.

`steps::touch` is deleted, not narrowed. Nothing called it — not
production, not a test. The census had credited it to `tests/shims.rs`,
where the word appears inside a string.

In sandbox, two tests moved into `src/sandbox/kata.rs`: the container
record a lease provisions, and the TTL expiry of a sandbox that never
dials in. Neither builds a fixture. `KataBackend::shared_for`,
`provision_request`, `sandbox_cr` and `K8sSandboxProvisioner::for_config`
are `pub(crate)` as a result.

`KataBackend::reclaim` is deleted — same story as `touch`. It forwarded to
`self.provisioner.reclaim`, which the reaping site already calls itself,
and the TTL test the census credited it for implements the *trait's*
`reclaim` on a null provisioner. Same word, different function.

Two honest costs, both recorded rather than smoothed over:

- `Provisioner` and `ProvisionRequest` are now named by nobody outside
  `sandbox`, yet cannot be narrowed: `LocalAgentProvisioner` is `pub`
  because two fixture tests construct it, and Rust forbids a public type
  implementing a private trait or taking a private parameter type.
  `sandbox.deadonly` therefore rises 0 → 2, with the reason here as the
  ratchet demands.
- `agent_sandbox_config()` now exists in both `tests/kata.rs` and
  `src/sandbox/kata.rs`. Three of that file's remaining tests still need
  it, and a test helper cannot be shared across the crate boundary without
  making it public again.

sandbox: 27 pub / 15 dead -&gt; 22 pub / 10 dead.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Six db items are now gated behind `test-support`, each with a comment
saying what it is for and why production never calls it:

    builds::claim            production leases a batch; `claim_batch` is
                             what the dispatcher runs
    settings::set_setting    the readers are used, the setter is not
    Writer::shutdown         the server runs until the process ends
    snapshots::snapshot_by_commit
    world::world_members     production writes world snapshots, never
                             reads one back member by member
    invariants::unapproved_index_entries
                             gated, not relocated: reading it needs this
                             module's private helpers, and widening those
                             to let a test out would be the wrong trade

Gating them exposed three things they were the only user of, and each is
gated with them rather than left compiling into a binary that cannot reach
it: `Msg::Shutdown` and its loop arm, and `model::json_or`.
`arch-census.py --write-budget` also stopped erasing the `test_surface`
section — two writers of one file must not delete each other's axis, or
the ratchet quietly stops checking it.

`steps::touch` is deleted, not narrowed. Nothing called it — not
production, not a test. The census had credited it to `tests/shims.rs`,
where the word appears inside a string.

In sandbox, two tests moved into `src/sandbox/kata.rs`: the container
record a lease provisions, and the TTL expiry of a sandbox that never
dials in. Neither builds a fixture. `KataBackend::shared_for`,
`provision_request`, `sandbox_cr` and `K8sSandboxProvisioner::for_config`
are `pub(crate)` as a result.

`KataBackend::reclaim` is deleted — same story as `touch`. It forwarded to
`self.provisioner.reclaim`, which the reaping site already calls itself,
and the TTL test the census credited it for implements the *trait's*
`reclaim` on a null provisioner. Same word, different function.

Two honest costs, both recorded rather than smoothed over:

- `Provisioner` and `ProvisionRequest` are now named by nobody outside
  `sandbox`, yet cannot be narrowed: `LocalAgentProvisioner` is `pub`
  because two fixture tests construct it, and Rust forbids a public type
  implementing a private trait or taking a private parameter type.
  `sandbox.deadonly` therefore rises 0 → 2, with the reason here as the
  ratchet demands.
- `agent_sandbox_config()` now exists in both `tests/kata.rs` and
  `src/sandbox/kata.rs`. Three of that file's remaining tests still need
  it, and a test helper cannot be shared across the crate boundary without
  making it public again.

sandbox: 27 pub / 15 dead -&gt; 22 pub / 10 dead.
Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
</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>
<entry>
<title>sandbox: the kata lease path publishes a real package, and the config says what it means</title>
<updated>2026-11-19T15:57:39+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T15:57:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=94c318f13264bb3c00a9f3057ba2e1aafb57c9e4'/>
<id>94c318f13264bb3c00a9f3057ba2e1aafb57c9e4</id>
<content type='text'>
The end-to-end claim of the seam, tested as one thing: `plain-make` detected,
approved, built and published through `KataBackend` + `LocalAgentProvisioner` —
a real `sandbox-agent` process, a real nonce-matched rendezvous, real frames —
with a VM being the only thing this host cannot provide. The index ends up
serving the package, the agent's output reaches the same log the SSE tail reads,
and the shim saw exactly one `makepkg`.

Documented where the project records such things: the enum and the refusal of an
unwired kind, the shared listener and the shared Kata backend, and the
`shared_workspace` assertion as a guard rather than a fix — the workspace sync is
still the unimplemented thing it was, and the config now says so at startup
instead of letting `makepkg` discover it.

Also reaped two unreaped `sandbox-agent` children in the remote tests, which was
the last clippy warning in the tree; `--all-targets` is now silent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The end-to-end claim of the seam, tested as one thing: `plain-make` detected,
approved, built and published through `KataBackend` + `LocalAgentProvisioner` —
a real `sandbox-agent` process, a real nonce-matched rendezvous, real frames —
with a VM being the only thing this host cannot provide. The index ends up
serving the package, the agent's output reaches the same log the SSE tail reads,
and the shim saw exactly one `makepkg`.

Documented where the project records such things: the enum and the refusal of an
unwired kind, the shared listener and the shared Kata backend, and the
`shared_workspace` assertion as a guard rather than a fix — the workspace sync is
still the unimplemented thing it was, and the config now says so at startup
instead of letting `makepkg` discover it.

Also reaped two unreaped `sandbox-agent` children in the remote tests, which was
the last clippy warning in the tree; `--all-targets` is now silent.
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: agent-sandbox is a backend now, and nerdctl is gone</title>
<updated>2026-11-19T15:45:38+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T15:45:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=8dcdce879b51b19603d8163d8a9bfb5f61ff1558'/>
<id>8dcdce879b51b19603d8163d8a9bfb5f61ff1558</id>
<content type='text'>
`sandbox_backend` was a string and `backend_for` matched it with `_ =&gt; loopback`,
so the documented Kata backend was unreachable from configuration: a hub told to
use agent-sandbox would have quietly built untrusted PKGBUILDs as its own user.
The kind now parses, validates, and produces a real `KataBackend` over
`K8sSandboxProvisioner`, with the CR's `runtimeClass`, `activeDeadlineSeconds`,
nonce, image and cluster coordinates all traced back to the config that produced
them.

Kata shares a *backend* per configuration rather than only a listener: it routes
each dial-in by the nonce in its `Hello` into a map that belongs to it, so two
backends on one address would each see half the dial-ins and neither could
complete a rendezvous. The cache key is a digest of the distinguishing fields so
the token and bearer are not copied into a second place.

The containerd/`nerdctl` payload builder is deleted rather than left unused. It
was a second deployment shape with no provisioner, no config path and no live
tier — a builder that advertises a route the configuration refuses is worse than
no builder, because someone will eventually assume the route exists. DESIGN.md
now names one provisioning shape, which is the one that exists.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`sandbox_backend` was a string and `backend_for` matched it with `_ =&gt; loopback`,
so the documented Kata backend was unreachable from configuration: a hub told to
use agent-sandbox would have quietly built untrusted PKGBUILDs as its own user.
The kind now parses, validates, and produces a real `KataBackend` over
`K8sSandboxProvisioner`, with the CR's `runtimeClass`, `activeDeadlineSeconds`,
nonce, image and cluster coordinates all traced back to the config that produced
them.

Kata shares a *backend* per configuration rather than only a listener: it routes
each dial-in by the nonce in its `Hello` into a map that belongs to it, so two
backends on one address would each see half the dial-ins and neither could
complete a rendezvous. The cache key is a digest of the distinguishing fields so
the token and bearer are not copied into a second place.

The containerd/`nerdctl` payload builder is deleted rather than left unused. It
was a second deployment shape with no provisioner, no config path and no live
tier — a builder that advertises a route the configuration refuses is worse than
no builder, because someone will eventually assume the route exists. DESIGN.md
now names one provisioning shape, which is the one that exists.
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: kata backend — ad-hoc TTL sandboxes over the agent protocol</title>
<updated>2026-11-19T11:49:50+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T11:49:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=2eb4500f089154b982f7c5dbbc7f1efbfd702ed5'/>
<id>2eb4500f089154b982f7c5dbbc7f1efbfd702ed5</id>
<content type='text'>
The kata lease path is composition, not a new protocol: acquire mints a
rendezvous nonce, asks a Provisioner for a sandbox pointed at this hub,
and leases only the dial-in whose hello carries that nonce back. A box
that never dials in is a TTL expiry — the same vocabulary every other
failure here speaks (I5) — and a stray box that greets with a nonce
nobody ordered is dropped unread, never leased.

Two payload shapes are constructed as pure, unit-tested functions
because both are real targets: an agent-sandbox-style Kubernetes CR
(runtimeClass kata, activeDeadlineSeconds so the orchestrator enforces
the TTL even if the hub dies) and a nerdctl/containerd argv for hosts
without a cluster. The K8s provisioner is real ureq code exercised only
by the gated live tier, which skips with a printed note wherever
/dev/kvm or AUR_KATA_API is absent — the recorded-skip convention, not
a silent pass.

The rendezvous and TTL logic runs for real on any machine via
LocalAgentProvisioner: a real sandbox-agent process, real frames, real
nonce matching, no VM. That is the same honesty as the loopback
backend — the interface is under test, not a mock of it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kata lease path is composition, not a new protocol: acquire mints a
rendezvous nonce, asks a Provisioner for a sandbox pointed at this hub,
and leases only the dial-in whose hello carries that nonce back. A box
that never dials in is a TTL expiry — the same vocabulary every other
failure here speaks (I5) — and a stray box that greets with a nonce
nobody ordered is dropped unread, never leased.

Two payload shapes are constructed as pure, unit-tested functions
because both are real targets: an agent-sandbox-style Kubernetes CR
(runtimeClass kata, activeDeadlineSeconds so the orchestrator enforces
the TTL even if the hub dies) and a nerdctl/containerd argv for hosts
without a cluster. The K8s provisioner is real ureq code exercised only
by the gated live tier, which skips with a printed note wherever
/dev/kvm or AUR_KATA_API is absent — the recorded-skip convention, not
a silent pass.

The rendezvous and TTL logic runs for real on any machine via
LocalAgentProvisioner: a real sandbox-agent process, real frames, real
nonce matching, no VM. That is the same honesty as the loopback
backend — the interface is under test, not a mock of it.
</pre>
</div>
</content>
</entry>
</feed>
