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/http.rs | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) (limited to 'tests/http.rs') diff --git a/tests/http.rs b/tests/http.rs index 0ca8a6b..068f999 100644 --- a/tests/http.rs +++ b/tests/http.rs @@ -1,11 +1,3 @@ -//! The web surface (§12, §13): routes render, the CSRF gate holds, and a stale -//! approval comes back as a 409 with the current diff instead of a silent -//! retarget. -//! -//! These drive a real `tiny_http` server on an ephemeral loopback port over a -//! real fixture corpus — no mocked transport, because the transport is part of -//! what we are claiming works. - mod common; use aur_build::review::{candidates, diff}; @@ -37,8 +29,7 @@ fn every_surface_renders() { #[test] fn the_review_detail_shows_the_panels_and_the_hashes() { let web = Web::new("plain-make"); - // Publish a first version so the review has something to diff against; - // every panel compares the accepted release to the candidate (§6). + // Publish a first version so the review has something to diff against. let first = web.open_review("plain-make"); let page = web.get(&format!("/reviews/{}", first.id)); let dd = extract(&page.body, "name=\"diff_digest\" value=\"", "\"").unwrap(); @@ -57,8 +48,7 @@ fn the_review_detail_shows_the_panels_and_the_hashes() { assert!(page.body.contains(want), "missing panel {want}"); } assert!(page.body.contains("previous accepted release"), "no base shown"); - // The approve form carries both hashes (§7.1a) and is a plain POST form, - // so it works with JavaScript switched off. + // The approve form carries both hashes (§7.1a) and works with JavaScript off. assert!(page.body.contains("name=\"identity_hash\"")); assert!(page.body.contains("name=\"diff_digest\"")); assert!(page.body.contains("