diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:09:59 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:09:59 +0000 |
| commit | e757979f1a2afdbe7146066345bb9acd19d3b151 (patch) | |
| tree | 30d5f5fbccd25ea7bf01c5202684af463b74e7d3 /tests/notices.rs | |
| parent | 94c318f13264bb3c00a9f3057ba2e1aafb57c9e4 (diff) | |
| download | aur-build-e757979f1a2afdbe7146066345bb9acd19d3b151.tar.gz aur-build-e757979f1a2afdbe7146066345bb9acd19d3b151.zip | |
comments: say why, not what
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.
Diffstat (limited to 'tests/notices.rs')
| -rw-r--r-- | tests/notices.rs | 17 |
1 files changed, 4 insertions, 13 deletions
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", |
