summaryrefslogtreecommitdiffstats
path: root/src/db/mod.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-22 10:51:45 +0000
committeraur-build <aur-build@localhost>2026-11-22 10:51:45 +0000
commit053dfbca8a4955a616e9b2c0f5a5d664c0db7aef (patch)
tree969777fa32845f49723c52b1889c4870c98134cf /src/db/mod.rs
parent1e1e12e7220a3fd288782ae40f0823db32acf6cb (diff)
downloadaur-build-053dfbca8a4955a616e9b2c0f5a5d664c0db7aef.tar.gz
aur-build-053dfbca8a4955a616e9b2c0f5a5d664c0db7aef.zip
src,tests: retire the census commentary from the source
A gated item used to carry its own defence: why it is `pub` only under `test-support`, which census once mistook a filename for a caller, why a wrapper is compiled out rather than deleted. The budget file already holds those claims and the ratchet already checks them, so the source keeps the one line that says what the item is. The module headers stop narrating the refactor that produced them. What survives is the wire protocol, the git pipe, the poisoned lock that must be recovered rather than unwedged.
Diffstat (limited to 'src/db/mod.rs')
-rw-r--r--src/db/mod.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/db/mod.rs b/src/db/mod.rs
index 27d1bfb..6f15c88 100644
--- a/src/db/mod.rs
+++ b/src/db/mod.rs
@@ -4,9 +4,7 @@ pub mod candidates;
pub mod migrations;
pub mod model;
-// The queries this module owns, one module per aggregate. They are private:
-// the interface is what `pub use` names below, not the file layout, so a
-// caller cannot reach a query that was not chosen for export.
+// One private module per aggregate; the interface is the `pub use` below.
mod audit;
mod invariants;
mod metrics;
@@ -24,9 +22,7 @@ mod staleness;
mod subscriptions;
mod world;
-/// The alias is only ever used from outside `db`, and only by the test tier;
-/// `db::migrate` walks `migrations::MIGRATIONS` by its own path, so there is
-/// no crate-internal alias to keep in a production build.
+/// Aliased only for the test tier; `db::migrate` walks `MIGRATIONS` by its own path.
#[cfg(feature = "test-support")]
pub use migrations::MIGRATIONS;
/// Its only caller is the test-tier `world_members`, so it is gated with it.
@@ -43,8 +39,7 @@ pub use metrics::{
count_subscriptions, count_unacknowledged_notices, last_gc_age_secs, last_poll_age_secs, oldest_queued_age_secs,
pending_review_ages_secs,
};
-/// `ReleaseState` is a column type on the release row. Nothing outside `db`
-/// names it, so the alias out of `db` exists only for the test tier.
+/// A column type on the release row; nothing outside `db` names it.
#[cfg(feature = "test-support")]
pub use model::ReleaseState;
#[cfg(not(feature = "test-support"))]
@@ -249,11 +244,8 @@ impl Writer {
self.tx.send(Msg::Call(f)).map_err(|_| Error::db("writer actor gone"))
}
- /// Stop the writer actor.
- ///
- /// Test-tier only: the server runs until the process ends and never
- /// quiesces the writer deliberately. Tests use it to prove a worker
- /// that dies mid-write leaves the database consistent.
+ /// Stop the writer actor. The server never quiesces it; tests use this to
+ /// prove a worker that dies mid-write leaves the database consistent.
#[cfg(feature = "test-support")]
pub fn shutdown(&self) {
let _ = self.tx.send(Msg::Shutdown);