From 4c143e969dcd7b6a18e5a86f9a754c9b62979ccf Mon Sep 17 00:00:00 2001 From: aur-build Date: Mon, 23 Nov 2026 13:44:20 +0000 Subject: usecase,http,pipeline,ops: keep the contract, drop the argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A workflow's doc now says what it guarantees and stops defending its existence: `subscribe` resolves the repo row, `approve` queues what the approval buys, a per-item failure comes back as a value instead of a panic. The history of which front end used to open-code it is gone. The last census-war notes go with it — three places that explained why a name in a test string was not a caller. --- src/usecase/bootstrap.rs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/usecase/bootstrap.rs') diff --git a/src/usecase/bootstrap.rs b/src/usecase/bootstrap.rs index 6793076..a4e64d2 100644 --- a/src/usecase/bootstrap.rs +++ b/src/usecase/bootstrap.rs @@ -1,5 +1,4 @@ -//! Bringing a repository up, which every command does and every front end -//! used to write out for itself. +//! Bringing a repository up, which every command does. use std::sync::atomic::AtomicBool; use std::sync::Arc; @@ -10,17 +9,13 @@ use crate::error::Result; use crate::pipeline; /// Directories exist, the schema is current, and the repo row is present. -/// -/// Four calls in an order that matters — migrate before open, `ensure_repo` -/// before anything reads `repo_id` — which is precisely the kind of sequence -/// that quietly rots when it is copied. +/// Order matters: migrate before open, `ensure_repo` before anything reads +/// `repo_id`. pub fn open(cfg: &Config) -> Result { open_and_ensure(cfg).map(|(db, _)| db) } -/// `open`, plus the id of the row named by `cfg.repo_name` — which is what -/// `init` prints, and is not necessarily the lowest repo id if a root ever -/// holds more than one repo. +/// `open`, plus the id of the row named by `cfg.repo_name`. fn open_and_ensure(cfg: &Config) -> Result<(Db, i64)> { cfg.ensure_dirs()?; db::migrate(&cfg.db_path())?; @@ -44,10 +39,8 @@ pub fn init(cfg: &Config) -> Result { /// Everything `serve` does before control passes to the UI: bring the /// repository up, finish anything a previous run left half-published, and start -/// the two background loops. -/// -/// The HTTP server is deliberately not started here. This module sits below the -/// UI and must not be able to name it. +/// the two background loops. This module sits below the UI, so it cannot start +/// the HTTP server. pub fn serve(cfg: &Config) -> Result { let db = open(cfg)?; let _ = pipeline::publish::reconcile(cfg, &db); -- cgit v1.2.3