<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aur-build/ARCH_REVIEW.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>docs: remove the design and architecture docs</title>
<updated>2026-11-19T18:02:25+00:00</updated>
<author>
<name>aur-build</name>
<email>aur-build@localhost</email>
</author>
<published>2026-11-19T18:02:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/aur-build/commit/?id=7841c4afe8759c39cf4556953122aea5a6de71b4'/>
<id>7841c4afe8759c39cf4556953122aea5a6de71b4</id>
<content type='text'>
DESIGN.md, ARCH_REVIEW.md, docs/DECISIONS.md and docs/INVARIANTS.md are gone,
along with the references that pointed at them: the README links and layout
entry, the §/I-n citations README carried from the design doc, the Cargo.toml
shim comment, and the DESIGN.md citation in the first migration's SQL.

Nothing read these files at build or test time; 267 tests pass unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DESIGN.md, ARCH_REVIEW.md, docs/DECISIONS.md and docs/INVARIANTS.md are gone,
along with the references that pointed at them: the README links and layout
entry, the §/I-n citations README carried from the design doc, the Cargo.toml
shim comment, and the DESIGN.md citation in the first migration's SQL.

Nothing read these files at build or test time; 267 tests pass unchanged.
</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>
</feed>
