From 4304b0f336ddba7b4ec6780795059ff2066d105b Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 17:33:17 +0000 Subject: comments: keep only what the code cannot show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stripped every comment that described what an item does, documented its arguments or fields, or cited the design docs (§n, I-n, m-n, decision n). 2247 comments down to 83. What survives: the section dividers that segment the large modules, the secret-handling warnings, the agent wire-frame directions, and the few notes without which the code they attach to reads as redundant, reorderable, or unsound. --- src/review/candidates.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/review/candidates.rs') diff --git a/src/review/candidates.rs b/src/review/candidates.rs index d4c49e8..53361fe 100644 --- a/src/review/candidates.rs +++ b/src/review/candidates.rs @@ -8,23 +8,13 @@ pub use crate::db::candidates::{ #[derive(Debug, Clone, PartialEq, Eq)] pub enum Upsert { - /// A new review row was opened. Created { id: i64, kind: String }, - /// The open review was updated in place; no new row, `base` untouched (I7). Collapsed { id: i64, revision: i64 }, - /// A human had already seen the old diff, so it was frozen as `superseded` - /// and a fresh review opened (decision 8). Superseded { old: i64, new: i64 }, - /// This exact identity was rejected before; do not nag (§7.1). PreviouslyRejected, - /// Nothing changed relative to what is already recorded. Unchanged, } -/// Insert-or-collapse a candidate for `pb`. -/// -/// `accepted` is the pkgbase's current accepted release, or `None` when this is -/// a first introduction (§7.1b). pub fn upsert_candidate(db: &Db, pb: &Pkgbase, accepted: Option<&ReleaseRow>, nc: &NewCandidate) -> Result { let kind = if accepted.is_some() { db::candidate_kind::NEW_VERSION } else { db::candidate_kind::FIRST_INTRODUCTION }; let base = accepted.map(|a| a.id); @@ -40,14 +30,11 @@ pub fn upsert_candidate(db: &Db, pb: &Pkgbase, accepted: Option<&ReleaseRow>, nc let revision = sql::collapse_in(tx, &open, &nc)?; return Ok(Upsert::Collapsed { id: open.id, revision }); } - // A human saw the old diff: freeze it for the audit trail and open - // a fresh review against the same base. sql::supersede_in(tx, open.id)?; let new_id = sql::insert_in(tx, pkgbase_id, base, kind, &nc)?; return Ok(Upsert::Superseded { old: open.id, new: new_id }); } - // A previously rejected identity must not be re-raised. if sql::rejected_before_in(tx, pkgbase_id, &nc.identity_hash)? { return Ok(Upsert::PreviouslyRejected); } -- cgit v1.2.3