summaryrefslogtreecommitdiffstats
path: root/src/review/approve.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/review/approve.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/review/approve.rs')
-rw-r--r--src/review/approve.rs26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/review/approve.rs b/src/review/approve.rs
index 26963d6..afda51b 100644
--- a/src/review/approve.rs
+++ b/src/review/approve.rs
@@ -142,7 +142,6 @@ pub fn reject(db: &Db, actor: &str, candidate_id: i64, note: &str) -> Result<()>
}
#[derive(Debug)]
-// BulkItem stays `pub`: one outcome of `approve::bulk`, which tests/approve.rs drives directly.
pub struct BulkItem {
pub candidate: Option<CandidateRow>,
pub outcome: BulkOutcome,
@@ -161,10 +160,7 @@ pub enum BulkOutcome {
Refused(BulkRefusal),
}
-/// The real definition. The module is private, so this `pub`
-/// is not a nameable path from outside; the alias below is the
-/// only way to reach it, and the alias is what carries the
-/// feature-conditional visibility.
+/// The real definition; the alias below carries the visibility.
mod bulk_refusal {
use super::{Error, Stale};
@@ -183,11 +179,7 @@ mod bulk_refusal {
}
}
-/// The payload of one `BulkOutcome::Refused` arm. The bulk tests construct it to assert which approval was refused.
-///
-/// `pub` only under `test-support`. Production reaches the type
-/// through its own module and never names it from outside; the
-/// outside reader that needs the name is a test.
+/// The payload of one `BulkOutcome::Refused` arm.
#[cfg(feature = "test-support")]
pub use bulk_refusal::BulkRefusal;
@@ -229,17 +221,9 @@ pub fn bulk(
Ok(out)
}
-/// Withdraw a published release and unpublish its files.
-///
-/// Nothing in production reaches this today: the CLI and the web UI both go
-/// through `usecase::withdraw_package`, which withdraws a *package* and
-/// republishes the repo. This is the single-release operation underneath what
-/// that path will eventually use, and `tests/pipeline.rs` is what pins its
-/// invariants — a second withdraw is refused, an unknown release is refused.
-///
-/// So it is compiled only under `test-support`. A release build does not carry
-/// an operation nothing invokes; when production grows the call, the gate comes
-/// off and the test that already exists becomes the regression cover.
+/// Withdraw a published release and unpublish its files. The user-facing path
+/// is `usecase::withdraw_package`; this is the single-release operation under
+/// it, and nothing in production calls it yet.
#[cfg(feature = "test-support")]
pub fn withdraw(db: &Db, actor: &str, release_id: i64, reason: &str) -> Result<()> {
let actor = actor.to_string();