| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The census's 35 `deadonly` items were a lead, not a verdict, and the compiler
answered it: 17 of them are read only inside their own module and were declared
`pub` for no reason, so they are `pub(crate)` now — `db::OpenReview` and its two
queries, `ReviewSubject` and its query, `fetch::Body`, `http`'s `form_get`,
`query_get` and `Page::flash`, `ops::EvictPlan`, `usecase`'s `StageB`… — and two
are read by nobody: `ReleaseState::can_transition` and
`SubscriptionState::can_transition`, both already annotated "nothing consults
this table today", which is the definition of dead rather than the argument for
keeping.
Narrowing them is what made the compiler look harder, and it found three more:
`ReviewSubject::pkgbase` was selected out of the database and never read,
`StageB::cached` was written in three places and never read, and
`StageB::version` was never called. All gone, the SELECT column with them.
The other 18 cannot be narrowed and now say so, once at the declaration and once
in the budget file: a row type the `aur-build` binary binds without naming
(`PackageRow`, `Checked`, `GcPlan`, `Prepared`), a type behind a `pub` fn a test
calls (`Unbuilt`, `BulkItem`, `StageA`, `CheckReport`, `PkgInfo`, `Installed`,
`Subscription`, `Manifest`), a trait a public test provisioner implements
(`Provisioner`, `ProvisionRequest`), and three that a release build never even
compiles because their module is `test-support`-gated (`shims::*`, `VirtualClock`).
`deadonly` therefore means *dead and unargued* now: an allowlisted item leaves the
dead columns, which is the only way the number can be held at zero forever.
448 pub, 49 dead, 0 unargued; 284 tests pass, one ignored, none lost.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The leaf modules were the widest liars. `git` exported 19 names of which 5 were
named by nobody; `hash` exported a constant `EMPTY` that no code had ever
referenced; `time` exported a virtual clock, an `advance` and a `wrap` whose
only caller was a test that turned out not to exist. A leaf's interface is the
whole contract the rest of the crate can rely on, and these interfaces were
mostly decoration.
Nine items were genuinely dead and are gone: `hash::EMPTY`,
`git::{clone_source, count_commits, log_oneline, ls_remote_heads}`,
`recipe::is_diffable`, `pkginfo::values_of`, `time::virtual_now`, and a free
`time::advance` that had been shadowed by the `VirtualClock` method tests
actually call. Eighteen more were used only inside their own module and are now
private — `fetch`'s `Body` aside, which is the return type of a public parser
and so is part of the interface whether or not anyone writes its name.
http went 68 exported names to 27, and its last two glob re-exports
(`pub(crate) use mutations::*; use pages::*;`) are explicit lists now. That
makes the crate's glob count zero, so the allowlist in the architecture test is
empty and can stay that way.
Narrowing surfaced dead code that `pub` had been hiding, because a public item
is presumed used and never questioned: `Req::query` and `Req::body` were parsed
and stored and never read, `Res::found` had no callers, and `sse::FileBody` was
a reader nobody constructed. All four are deleted rather than re-published to
keep the warning quiet.
git 19→14, hash 8→7, recipe 11→7, urlutil 2→1, config 35→31, pkgver 18→14,
time 16→14, pkginfo 7→6, http 68→27. Crate totals: 585→516 pub, 219→115 dead,
4→0 globs.
281 passed / 0 failed, clippy -D warnings clean, release build 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.
|
|
|
(§10.1)
Ingest decides what the index claims about a package and what the world
snapshot records by reading two text files out of a tar inside a zstd stream.
That code was living in src/shims — the test harness — which meant production
depended on the harness for its view of a package's own metadata. Moved to
src/pkginfo.rs, with the shim now delegating to it so the harness and the
production path cannot disagree about what a package says about itself.
Still no libalpm: tar + zstd + eighty lines of key = value parsing. Unknown keys
are ignored rather than rejected, because makepkg adds fields over time and a new
one must not stop us publishing.
**The parser had a real bug.** A .BUILDINFO installed block puts its first entry
on the same line as the key:
installed = glibc 2.39-1 x86_64 -
gmp 6.3.0-1 x86_64 -
The old code skipped the header line, so the first dependency was silently
dropped from every snapshot — exactly the kind of gap that makes staleness
quietly wrong. The header line is parsed now.
tests/world.rs builds real .pkg.tar.zst files and asserts the fields come out of
the archive: repeated keys stay lists, an archive with no .PKGINFO is refused
rather than defaulted from the filename, and the world snapshot contains our own
packages and none of glibc/pacman/binutils. The empty-snapshot case for a first
build is asserted too — nothing of ours existed yet, and recording that honestly
beats inventing a world.
Split pkgbases produce one approval, one release and N index rows each with its
own artifact, asserted directly here. 143 tests pass, clippy clean.
|