| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The repeated explanations go: sixteen copies of why a `pub` under
`test-support` has two declarations, six notes about where a test moved
from, forty-three banner comments naming the section they sit above.
The prose that stays is the prose the code cannot say — a hand-written
Debug that keeps a token out of a log line, a git pipe that would
deadlock if the write came first, an end-of-string check that has to
precede the separator skip. Enum docs in error.rs collapse to the line
that names what the type is; the argument for why it is shaped that way
is in the variants.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rustfmt.toml fixes the shape the tree is written in (120 columns, small
items kept on one line) and one canonical pass makes it the truth.
[lints.clippy] names the idiom lints worth enforcing and leaves out the
two that would add doc-comment boilerplate rather than remove it. The
tree pays them off here: write!/writeln! instead of push_str(&format!()),
let-else instead of match-on-Option, borrows where a thread entry point
only reads what it owns, no `&self` on a Copy state and no `self` nobody
reads.
ops::to_prometheus gains one gauge helper: a metric's HELP, TYPE and
value are now emitted by the same call instead of three.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`main` opened the repository inline before its command match. `serve` opened it
again, four calls in an order that matters. The web routes wrote subscriptions,
toggles, notices and build retries straight through `db::`, so the CLI and the
UI were two independent guesses at the same product, and the guesses had already
drifted: `sub_add` fell back to repo id 1 where the CLI reported the repository
as uninitialised, and `build_retry` remembered to write the audit row while
nothing else did.
`src/usecase/` is the workflow layer now — bootstrap, detect, reviews,
subscriptions, builds, maintenance. A function earns a place here by having more
than one step in an order that matters: `approve` records the decision *and*
queues the build it authorises, because an approval that silently fails to queue
is the exact failure the review queue exists to prevent, and both front ends had
to remember to pair them.
Nothing in the layer formats output or knows a status code exists. Where the two
front ends genuinely disagree, the result carries the disagreement instead of
resolving it: `Approved::queued` is a `Result` because a failed enqueue is fatal
in the CLI — an approved candidate with no build is a stall nobody notices — and
a soft failure in the UI, which has already committed the decision and can retry
from the package page.
`src/http/routes/mutations.rs` now contains no `db::` call at all, and
`main.rs` is 314 lines with no multi-step sequence and nothing exported.
Rank map: usecase 9, http 10, composition roots 11. The layer test enforces
that usecase cannot name http, which is why `serve` starts the scheduler and the
build pool but leaves the HTTP server to `main`.
One user-visible message moves: `aur-build reject <missing>` now says
`not found: candidate N` (the review layer's wording) instead of
`no candidate #N` (main's). Both exit 1; the check moved with the workflow.
280 passed / 0 failed, clippy -D warnings clean, architecture 8/8.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
n-4. `routes.rs` was 1,065 lines with the routing table, twenty-odd page
renderers, every mutating POST, and the size/date formatting helpers in one
file, so finding where a form landed meant scrolling past everything that did
not touch it.
It is a module now: `routes/mod.rs` keeps the gate, the login handlers, the
routing table and the helpers two files share (207 lines); `routes/pages.rs`
holds the read side, which only ever goes through `db.read`; `routes/mutations.rs`
holds the write side, which is where the audit writes and the flash messages
live. The split is by *read versus write*, which is the distinction the crate
actually cares about — the read path uses the thread-local read-only connection
and must never reach the writer — so the file boundary now matches the invariant
rather than being an arbitrary line count.
Behaviour is unchanged: the handlers are the same functions, re-exported into
`routes` so the routing table still reads as one flat list of endpoints.
|