From fd3ecf91686b11feea078531baeddb60e6941116 Mon Sep 17 00:00:00 2001 From: aur-build Date: Tue, 17 Nov 2026 20:59:57 +0000 Subject: feat: SQLite schema, migrations, single writer actor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The §11 data model as four migrations, plus the §11a concurrency model: one writer thread owning the write connection (mutations arrive as closures over a crossbeam channel, so SQLITE_BUSY is not part of the design) and thread-local read-only connections under WAL. Invariants that are database guarantees rather than conventions: I7 partial unique index -> at most one pending_review per pkgbase I3 UNIQUE(pkgbase_id, identity_hash) -> no duplicate candidates I10 audit table rejects UPDATE and DELETE by trigger §16 current_accepted_release_id moves only by compare-and-swap Also: vercmp + dependency-string parsing (ALPM algorithm, no libalpm), hash helpers including recipe_hash over the whole AUR tree, the clock helper that stamps every write, and the config/root layout. Part of P0 (DESIGN.md §17). --- src/lib.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 77aa7d7..f87c598 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,15 @@ //! AUR Build Server — see DESIGN.md. +//! +//! One process, many threads, no async. The write path is: watcher detects a +//! change → candidate → human approval → build pipeline → atomic publish into a +//! signed pacman repo. Nothing reaches a consumer without an approval row +//! behind it (I1). + +pub mod config; +pub mod db; +pub mod error; +pub mod hash; +pub mod pkgver; +pub mod time; + +pub use error::{Error, Result}; -- cgit v1.2.3