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/pipeline/dispatch.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/pipeline') diff --git a/src/pipeline/dispatch.rs b/src/pipeline/dispatch.rs index ad2d627..13590ae 100644 --- a/src/pipeline/dispatch.rs +++ b/src/pipeline/dispatch.rs @@ -9,9 +9,7 @@ use crate::db::{self, builds, Db}; use crate::pipeline::{self, Outcome}; pub struct Pool { - // Read only by `shutdown`, which is compiled for the test tier: a release - // build starts the dispatcher and runs it until the process exits, so in - // that build these two fields are stored and never read. + // Read only by `shutdown`; a release build runs the pool until exit. #[cfg_attr(not(feature = "test-support"), allow(dead_code))] stop: Arc, #[cfg_attr(not(feature = "test-support"), allow(dead_code))] @@ -50,11 +48,8 @@ impl Pool { Pool { stop, handles } } - /// Stop the dispatcher threads and join them. - /// - /// Production runs the pool until the process exits; nothing asks it to - /// stop. A test needs the join, because it asserts on the pool's effects - /// and cannot do that while the threads are still running. + /// Stop the dispatcher threads and join them, so a test can assert on the + /// pool's effects. #[cfg(feature = "test-support")] pub fn shutdown(self) { self.stop.store(true, Ordering::SeqCst); @@ -110,7 +105,7 @@ fn dispatch_once_impl(cfg: &Config, db: &Db, tx: &Sender) -> Vec ids } -/// Production reaches this through `dispatch_once`, which is the only thing that acts on the answer. +/// Reached only through `dispatch_once`. #[cfg(feature = "test-support")] pub fn admissible(cfg: &Config, db: &Db) -> usize { admissible_impl(cfg, db) @@ -134,7 +129,7 @@ fn admissible_impl(cfg: &Config, db: &Db) -> usize { slots } -/// Production reaches this through `admissible`, which is the only thing that acts on the number. +/// Reached only through `admissible`. #[cfg(feature = "test-support")] pub fn free_disk_mb(path: &std::path::Path) -> u64 { free_disk_mb_impl(path) -- cgit v1.2.3