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/db/migrations.rs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/db/migrations.rs') diff --git a/src/db/migrations.rs b/src/db/migrations.rs index b1954ab..18e9a4b 100644 --- a/src/db/migrations.rs +++ b/src/db/migrations.rs @@ -1,4 +1,3 @@ -/// One migration: version number + SQL body. pub struct Migration { pub version: u32, pub name: &'static str, @@ -268,17 +267,11 @@ BEGIN END; "#; -/// `artifact.build_id` lets the publish step find what `ingest` recorded without -/// re-scanning the disposable staging directory, so a worker that dies between -/// ingest and publish resumes cleanly (I5). const M_0005_ARTIFACT_BUILD: &str = r#" ALTER TABLE artifact ADD COLUMN build_id TEXT; CREATE INDEX artifact_by_build ON artifact (build_id); "#; -/// §7.2: the approval record is immutable. It is the only proof the system has -/// of *what a human actually looked at*, so editing it would let a later -/// attacker retarget a published artifact onto a clean review. const M_0006_APPROVAL_IMMUTABLE: &str = r#" CREATE TRIGGER approval_no_update BEFORE UPDATE ON approval @@ -293,9 +286,6 @@ BEGIN END; "#; -/// Stage B results, keyed on `(pkgbase, recipe_hash, upstream_tip)` (§5.2). -/// Re-resolving means cloning an upstream repo and running makepkg, so the answer -/// is worth keeping; the same key also implements the per-pkgbase cooldown. const M_0007_STAGE_B_CACHE: &str = r#" CREATE TABLE stage_b_cache ( pkgbase_id INTEGER NOT NULL REFERENCES pkgbase(id), @@ -312,10 +302,6 @@ CREATE TABLE stage_b_cache ( CREATE INDEX stage_b_cache_by_pkgbase ON stage_b_cache (pkgbase_id, resolved_at); "#; -/// Retention (§15). The rows are never compacted — the schema exists so "which -/// bytes produced this installed package" stays answerable — but the bytes on disk -/// cannot be kept forever. So eviction is recorded rather than implied: the -/// artifact row keeps its digest, size and provenance and gains a `purged_at`. const M_0008_RETENTION: &str = r#" ALTER TABLE artifact ADD COLUMN purged_at TEXT; @@ -348,7 +334,6 @@ pub static MIGRATIONS: &[Migration] = &[ Migration { version: 8, name: "retention", sql: M_0008_RETENTION }, ]; -/// Default settings seeded into `settings` (DESIGN.md §11). pub const DEFAULT_SETTINGS: &[(&str, &str)] = &[ ("max_concurrent_builds", "1"), ("build_timeout", "5400"), -- cgit v1.2.3