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. --- src/http/routes/pages.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/http/routes/pages.rs') diff --git a/src/http/routes/pages.rs b/src/http/routes/pages.rs index dea7de0..f1f3ef8 100644 --- a/src/http/routes/pages.rs +++ b/src/http/routes/pages.rs @@ -1,5 +1,3 @@ -//! The read side of the UI: pages that only ever go through `db.read`. - use crate::db::{self, builds, Db}; use crate::review::{candidates, diff, risk}; use crate::ops; @@ -554,10 +552,9 @@ pub(crate) fn audit(state: &State, req: &Req) -> Res { /// `GET /metrics` in Prometheus text exposition format (§12, §15). /// -/// Everything here is computed from live state on every scrape. There are no -/// counters incremented at event sites, because a counter that has to be -/// maintained by every code path is a counter that quietly drifts the first time -/// a path is added; a query cannot drift. +/// Everything here is computed from live state on every scrape. There are no counters +/// incremented at event sites: a counter every code path has to maintain quietly +/// drifts the first time a path is added; a query cannot drift. pub fn metrics(state: &State) -> Res { match ops::metrics(&state.cfg, &state.db) { Ok(m) => { -- cgit v1.2.3