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. --- tests/production_surface.rs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/production_surface.rs') diff --git a/tests/production_surface.rs b/tests/production_surface.rs index e4e1346..c5d7353 100644 --- a/tests/production_surface.rs +++ b/tests/production_surface.rs @@ -24,8 +24,6 @@ fn no_production_module_references_the_shim_harness() { let mut offenders: Vec = Vec::new(); for file in files { let rel = file.strip_prefix(&root).unwrap_or(&file).to_string_lossy().replace('\\', "/"); - // The harness itself, and the shim binaries that are its front ends, are - // allowed to know about it. if rel.starts_with("shims") || rel.starts_with("bin/") { continue; } @@ -49,8 +47,6 @@ fn no_production_module_references_the_shim_harness() { #[test] fn the_served_index_has_exactly_one_serialization_lock() { - // §6 M-5: two mutexes in `publish.rs`, each documented as *the* "one publish - // per repo" guarantee, is worse than either answer. There is one lock now. let src = std::fs::read_to_string(Path::new(env!("CARGO_MANIFEST_DIR")).join("src/pipeline/publish.rs")) .expect("read publish.rs"); let mutexes = src @@ -59,7 +55,6 @@ fn the_served_index_has_exactly_one_serialization_lock() { .collect::>(); assert_eq!(mutexes.len(), 1, "publish.rs must declare exactly one serialization mutex, found {mutexes:?}"); assert!(!src.contains("PUBLISH_LOCK"), "the second lock must stay deleted"); - // And both writers of the served index take it, not just one of them. let acquisitions = src .lines() .filter(|l| l.contains("lock_repo()") && !l.trim_start().starts_with("fn ")) @@ -88,8 +83,6 @@ fn the_shim_binaries_are_test_only() { #[test] fn the_test_hooks_are_a_gated_submodule_not_config_fields() { - // §6 M-9: fault injection in the publish hot path, shim environment variables - // and clock pinning were part of the production API surface. let cfg_src = read("src/config.rs"); for field in [ "pub path_prepend", @@ -100,7 +93,6 @@ fn the_test_hooks_are_a_gated_submodule_not_config_fields() { "pub shim_kill_parent", "pub shim_plant_link", ] { - // Each appears exactly once, inside `TestHooks`, never on `Config`. let hits = cfg_src.matches(field).count(); assert_eq!(hits, 1, "{field} must be declared once, on TestHooks — not on Config"); } @@ -113,8 +105,6 @@ fn the_test_hooks_are_a_gated_submodule_not_config_fields() { #[test] fn the_publish_hot_path_has_no_ungated_test_branch() { - // The two fault-injection points in `publish()` must sit behind the feature - // gate. let src = read("src/pipeline/publish.rs"); let lines: Vec<&str> = src.lines().collect(); let mut gated = 0; @@ -134,8 +124,6 @@ fn the_publish_hot_path_has_no_ungated_test_branch() { #[test] fn a_default_config_has_no_hooks_attached() { - // The state every real process runs in: nothing hooked, and nothing written - // to config.json about hooks. let cfg = aur_build::config::Config::default(); assert!(cfg.hooks.is_empty()); let json = serde_json::to_string(&cfg).unwrap(); @@ -144,8 +132,6 @@ fn a_default_config_has_no_hooks_attached() { #[test] fn the_review_modules_do_not_keep_private_copies_of_the_rules() { - // §6 m-2: `hosts` existed twice, verbatim, and the "did the executable part of - // the recipe change" rule existed twice with *different* semantics. for (file, forbidden) in [ ("src/review/diff.rs", ["fn hosts(", "fn body_changed("]), ("src/review/risk.rs", ["fn hosts(", "fn body_changed("]), @@ -163,8 +149,6 @@ fn the_review_modules_do_not_keep_private_copies_of_the_rules() { #[test] fn audit_rows_are_built_by_the_constructors_not_by_hand() { - // §6 m-4: three review sites hand-built `AuditEntry` literals, each with its - // own `detail` shape. let src = read("src/review/approve.rs"); assert!(!src.contains("db::AuditEntry {"), "audit rows must be built by AuditEntry::human/system"); assert_eq!(src.matches("AuditEntry::human(").count(), 3, "approve, reject and withdraw"); -- cgit v1.2.3