<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/Cargo.lock, branch ai/main</title>
<subtitle>Unnamed repository
</subtitle>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/'/>
<entry>
<title>deps: drop `similar`, and stop telling cargo not to look</title>
<updated>2026-11-21T13:31:33+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-21T13:31:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=864bb0bc3181ff57f4b8a30c4fc4ac4099185ba9'/>
<id>864bb0bc3181ff57f4b8a30c4fc4ac4099185ba9</id>
<content type='text'>
`[lints.cargo] unused_dependencies = "allow"` was justified by a roadmap: the
warning was silenced because the dependencies it named would be needed by
targets further down the line. One of them never arrived. `similar` is referenced
by nothing in `src`, `tests` or `tools` — the diff is rendered by `similar`'s
namesake in `review::diff` only if something calls it, and nothing does — and the
mask is what kept that invisible.

Both are gone, and neither profile now warns: `cargo check --all-targets
--features test-support` and `cargo check --release --all-targets` are silent
without the override, so the next dependency that goes unused is a warning
rather than a fact nobody can see.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`[lints.cargo] unused_dependencies = "allow"` was justified by a roadmap: the
warning was silenced because the dependencies it named would be needed by
targets further down the line. One of them never arrived. `similar` is referenced
by nothing in `src`, `tests` or `tools` — the diff is rendered by `similar`'s
namesake in `review::diff` only if something calls it, and nothing does — and the
mask is what kept that invisible.

Both are gone, and neither profile now warns: `cargo check --all-targets
--features test-support` and `cargo check --release --all-targets` are silent
without the override, so the next dependency that goes unused is a warning
rather than a fact nobody can see.
</pre>
</div>
</content>
</entry>
<entry>
<title>db: the schema gets an owner — every statement moves into db/, and the writer stops handing out connections</title>
<updated>2026-11-18T15:20:13+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-18T15:20:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=933c637de34095f1ea1ab88b02626bbf22eec7f4'/>
<id>933c637de34095f1ea1ab88b02626bbf22eec7f4</id>
<content type='text'>
Twelve modules outside `db/` contained hand-rolled SQL — 22 statements in
`ops.rs`, 17 in `approve.rs`, 15 in `candidates.rs`, 11 in `publish.rs`, and a
dozen more scattered through `watch`, `pipeline`, `http` — which meant the
blast radius of a schema change was "any module", and `db/` was a directory
rather than a boundary. The audit trail alone was defined in four places with
three different detail payloads.

Every statement now lives in `db/`. New modules `db::candidates` and
`db::approvals` own their tables (including the 21-column candidate select,
spelled once as `CANDIDATE_COLS` instead of four times); `db::queries` gains
the metrics reads, the retention reads and writes, the publish writes
(`insert_release_in`, `cas_accepted_release_in`, `remove_index_packages_in`),
the staleness reads and the source-cache lookups; `db::builds` gains
`set_release_in`. Where a mutation is a *decision* — the collapse rules, the
approval gate, the publish compare-and-swap — the decision stays where it was
and the statements are called through the transaction handle, so the atomicity
is unchanged and only the SQL moved.

`audit_in` is the in-transaction audit append, and `audit` is now a wrapper
over it: a decision and its audit row commit together or not at all, which is
what I10 actually claims.

Enforcement is two-layered, because one layer is a lie. `Writer::call`, `tx`
and `send` are `pub(crate)`, which keeps the crate's *users* out — the
integration tests and the shim binaries — but `pub(crate)` is crate-wide, so
on its own it would not stop `approve.rs` from writing SQL tomorrow. The layer
that does is `tests/schema_ownership.rs`: it walks `src/` and fails the build
if a statement literal or a rusqlite statement call appears outside `src/db/`.
It was checked against a deliberate violation. The test harness still needs to
construct states no typed API reaches, so the raw door exists but only under
the `test-support` feature, which nothing but this crate's own dev-dependency
enables; a production binary cannot see it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Twelve modules outside `db/` contained hand-rolled SQL — 22 statements in
`ops.rs`, 17 in `approve.rs`, 15 in `candidates.rs`, 11 in `publish.rs`, and a
dozen more scattered through `watch`, `pipeline`, `http` — which meant the
blast radius of a schema change was "any module", and `db/` was a directory
rather than a boundary. The audit trail alone was defined in four places with
three different detail payloads.

Every statement now lives in `db/`. New modules `db::candidates` and
`db::approvals` own their tables (including the 21-column candidate select,
spelled once as `CANDIDATE_COLS` instead of four times); `db::queries` gains
the metrics reads, the retention reads and writes, the publish writes
(`insert_release_in`, `cas_accepted_release_in`, `remove_index_packages_in`),
the staleness reads and the source-cache lookups; `db::builds` gains
`set_release_in`. Where a mutation is a *decision* — the collapse rules, the
approval gate, the publish compare-and-swap — the decision stays where it was
and the statements are called through the transaction handle, so the atomicity
is unchanged and only the SQL moved.

`audit_in` is the in-transaction audit append, and `audit` is now a wrapper
over it: a decision and its audit row commit together or not at all, which is
what I10 actually claims.

Enforcement is two-layered, because one layer is a lie. `Writer::call`, `tx`
and `send` are `pub(crate)`, which keeps the crate's *users* out — the
integration tests and the shim binaries — but `pub(crate)` is crate-wide, so
on its own it would not stop `approve.rs` from writing SQL tomorrow. The layer
that does is `tests/schema_ownership.rs`: it walks `src/` and fails the build
if a statement literal or a rusqlite statement call appears outside `src/db/`.
It was checked against a deliberate violation. The test harness still needs to
construct states no typed API reaches, so the raw door exists but only under
the `test-support` feature, which nothing but this crate's own dev-dependency
enables; a production binary cannot see it.
</pre>
</div>
</content>
</entry>
<entry>
<title>pipeline: dispatcher actor, worker pool and reaper (§8.2, §8.4)</title>
<updated>2026-11-18T08:36:39+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-18T08:36:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=e27e90aa82b6c878e34b94a6fa238836f497b1c3'/>
<id>e27e90aa82b6c878e34b94a6fa238836f497b1c3</id>
<content type='text'>
One dispatcher thread, N workers, one crossbeam channel between them. The
dispatcher loop is reap -&gt; cancel -&gt; claim -&gt; send, and the reaper runs first
on every pass including the first, so 'recover from a crash' and 'notice an
expired lease' are literally the same code path. There is no startup recovery
routine to get wrong.

- claim_batch does the SELECT and the UPDATE in one BEGIN IMMEDIATE
  transaction. SQLite has no SKIP LOCKED, but with exactly one writer the
  claim cannot race: nobody can see a row between the two statements.
- Backpressure is min(max_concurrent_builds - in_flight, disk headroom),
  measured with statvfs. A build that cannot fit on disk stays queued instead
  of filling the filesystem halfway through a compile.
- Retry policy (§8.4): transient failures (IO, HTTP) requeue up to
  max_transient_attempts; a deterministic build failure is never retried, and
  the release stays approved_but_unbuilt so the old version never looks
  healthy. Tests assert attempt==1 for build-fails and attempt==3 for a
  transient one.
- A superseded candidate sets cancel_requested on in-flight builds; the worker
  stops at the step boundary rather than mid-step, which is what keeps the
  checkpoints honest.
- Publish takes a process-wide lock so two workers cannot interleave the index
  rewrite. The critical section is the db file rewrite, never a build.
- The deterministic build id makes re-enqueue an INSERT OR IGNORE no-op, so a
  careless 'rebuild that again' is harmless.

tests/dispatch.rs drives the real threads: the pool takes a queued build all
the way to publication, a reaped build resumes from its checkpoints without
re-running makechrootpkg, and backpressure admits exactly one build per slot.

Serve now starts the pool alongside the watcher and the HTTP server.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One dispatcher thread, N workers, one crossbeam channel between them. The
dispatcher loop is reap -&gt; cancel -&gt; claim -&gt; send, and the reaper runs first
on every pass including the first, so 'recover from a crash' and 'notice an
expired lease' are literally the same code path. There is no startup recovery
routine to get wrong.

- claim_batch does the SELECT and the UPDATE in one BEGIN IMMEDIATE
  transaction. SQLite has no SKIP LOCKED, but with exactly one writer the
  claim cannot race: nobody can see a row between the two statements.
- Backpressure is min(max_concurrent_builds - in_flight, disk headroom),
  measured with statvfs. A build that cannot fit on disk stays queued instead
  of filling the filesystem halfway through a compile.
- Retry policy (§8.4): transient failures (IO, HTTP) requeue up to
  max_transient_attempts; a deterministic build failure is never retried, and
  the release stays approved_but_unbuilt so the old version never looks
  healthy. Tests assert attempt==1 for build-fails and attempt==3 for a
  transient one.
- A superseded candidate sets cancel_requested on in-flight builds; the worker
  stops at the step boundary rather than mid-step, which is what keeps the
  checkpoints honest.
- Publish takes a process-wide lock so two workers cannot interleave the index
  rewrite. The critical section is the db file rewrite, never a build.
- The deterministic build id makes re-enqueue an INSERT OR IGNORE no-op, so a
  careless 'rebuild that again' is harmless.

tests/dispatch.rs drives the real threads: the pool takes a queued build all
the way to publication, a reaped build resumes from its checkpoints without
re-running makechrootpkg, and backpressure admits exactly one build per slot.

Serve now starts the pool alongside the watcher and the HTTP server.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: scaffold cargo project, toolchain shim binaries, git baseline</title>
<updated>2026-11-17T20:47:03+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-17T20:47:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=3762c7ce9f765283f47e5716b708e04590339375'/>
<id>3762c7ce9f765283f47e5716b708e04590339375</id>
<content type='text'>
Provisions rustup + devtools from the distro package set and lays down the
crate skeleton: library, CLI binary, and one binary per external tool the
pipeline shells out to (mkarchroot, makechrootpkg, makepkg, repo-add, gpg,
pacman) so the §16a PATH shims are real executables that cargo builds and
tests can locate via CARGO_BIN_EXE_*.

Part of P0 (DESIGN.md §17).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provisions rustup + devtools from the distro package set and lays down the
crate skeleton: library, CLI binary, and one binary per external tool the
pipeline shells out to (mkarchroot, makechrootpkg, makepkg, repo-add, gpg,
pacman) so the §16a PATH shims are real executables that cargo builds and
tests can locate via CARGO_BIN_EXE_*.

Part of P0 (DESIGN.md §17).
</pre>
</div>
</content>
</entry>
</feed>
