chadtmiller.com/knotless
git that lives in your Atmosphere account
The coverage gate names lines only a function's test build has and misses
MergedThis makes harness/cov.mjs also name the lines missed by the instance with the most lines. That is the instance llvm-cov's table counts, so a failing gate now has something to point at. The change is small and matches the surrounding code. The stated checks and the documented shortcoming (line counts that may be off by one) are reasonable, and the extra output only appears when the table's count exceeds the list's.
One edge I read but didn't run. If the widest instance was never called, lacking becomes all of its lines. Every one of them that isn't in best.miss is then named, including lines the called instance reaches. That could list covered lines, but only when counted > best.miss.length already holds. The PR's warning to check a named line against the code covers it. Subtracting the lines the called instances reach would make the list tighter.
8 passed, 2 skipped
What changes
The coverage gate names every line it counts as missed. When a function is built in more than one shape,
harness/cov.mjsnow also names the lines missed by the copy with the most lines. That happens when the unit tests build it with a#[cfg(test)]arm the library lacks, or when only some builds call a generic's closure. Each such line is listed asfile:line in <function>, in the instance with the most lines.Why
llvm-cov's table counts a function's lines across all its copies: the most lines any copy has, less the most any copy reaches. A copy built only for a crate's own tests can have an arm the library's copy lacks. Then its misses count even though the library's copy, run by the integration tests, reaches them. The gate failed on such a line, and neither the "Uncovered:" list nor llvm-cov's
--show-missing-linesnamed it. The list took the copy with the fewest misses, and--show-missing-linesmerges the copies. So a pull failed at 100% with "1 missed" and nothing to point at: A backfill asks a directory which accounts to read, and reads them from a mirror as STAR-lite did, fromBody::chunkin knotless-serve's archive reader.How it was checked
Body::chunk, as the unit tests and the library built it. Line 109 is now named.testruns the gate itself. A harness change reruns every binary.Shortcomings
An instance's lines are read as every line a code region spans, which is close to how llvm-cov counts them, though not exactly. A count off by one could name a line that is in fact reached. A line named this way is worth checking against the code before writing a test for it.
Changeset: none
🤖 Generated with Claude Code