From e757979f1a2afdbe7146066345bb9acd19d3b151 Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 17:09:59 +0000 Subject: comments: say why, not what MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every module-level `//!` header is gone, and the comments that remained either re-explained the line below them or had grown into paragraphs. Density went from one comment line per 6.7 lines of code to one per 10. 827 insertions against 2194 deletions across 86 files. What survived: the invariants (I1-I12), the design cross-references into DESIGN.md, and the notes recording a bug that was found and fixed — those are the comments that carry weight, because they answer a question the code cannot answer about itself. What did not: restating a function signature in prose, and narration of the statement underneath. --- tests/notices.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'tests/notices.rs') diff --git a/tests/notices.rs b/tests/notices.rs index 7051acf..1f2852e 100644 --- a/tests/notices.rs +++ b/tests/notices.rs @@ -1,11 +1,3 @@ -//! Non-publishable change handling (§5.2, §5.3) and advisory risk scoring (§6). -//! -//! I11 is the invariant here: **a change that cannot be published is still -//! recorded.** The tempting failure mode is "nothing to approve, so nothing to -//! say" — which is exactly how a silently swapped tarball becomes invisible. -//! Every non-publishable change becomes a `notice` row, and the index keeps -//! serving the artifact it has. - mod common; use aur_build::db::{self, model::*}; @@ -125,8 +117,8 @@ fn risk_scoring_compares_against_the_accepted_release() { assert_eq!(c.risk_level, risk::level::LOW, "signals: {:?}", c.risk_signals()); assert!(!c.risk_signals().iter().any(|s| s.starts_with("recipe-code-changed"))); - // Now change the build body and add a fetching makedep: that is the shape of - // a real supply-chain edit and it must say so. + // Now change the build body and add a fetching makedep: the shape of a real + // supply-chain edit. let path = fx.aur.join("PKGBUILD"); let text = std::fs::read_to_string(&path).unwrap(); std::fs::write( @@ -158,9 +150,8 @@ fn a_first_introduction_is_flagged_as_its_own_kind_of_review() { #[test] fn i11_nothing_publishable_is_ever_silently_dropped() { - // Sweep every fixture through detection and assert the outcome is always - // one of: a review, a notice, an explicit no-change, or a recorded failure. - // There is no path where something moved and we said nothing. + // Sweep every fixture through detection and assert the outcome is always a + // review, a notice, an explicit no-change, or a recorded failure. let fixtures = [ "plain-make", "with-patch", "skip-checksum", "split-pkgbase", "epoch-bump", "pkgrel-reset", "downgrade", "git-sourced", "pin-drift", "digest-drift", "missing-dep", "build-fails", -- cgit v1.2.3