Uh oh!
There was an error while loading. Please reload this page.
ci: enforce the coverage floor instead of only measuring it - #230
Conversation
Stub commit to anchor the lane. Measuring real coverage next. Co-Authored-By: Claude <noreply@anthropic.com>
`--fail-under-lines 80` was carried in ci.yml as prose, so the coverage job computed a real number and acted on none of it. A job that reports without enforcing reads as enforcement downstream: the PR shows a coverage check, it goes green, and a reviewer concludes the floor held. Every merge into this repo has passed a check that could not fail. Measured before turning it on: 87.67% lines, 82.00% functions, 86.46% regions across the workspace (2015 tests). The repo is already above the floor, so the gate is set at the CLAUDE.md 2.3 value of 80 rather than a number tuned to today's run, and no exclusions are needed. ClosesDIG-Network/dig_ecosystem#3033 Co-Authored-By: Claude <noreply@anthropic.com>
aa77ec6 to
4d5d632CompareMichaelTaylor3d
commented
Aug 16, 2026
The gate is load-bearing — proven from both sides on identical coverage data. Same profile, two floors, exit codes captured before any pipe (piping into So the flag genuinely fails below its floor and genuinely passes at it; a floor tested only from the passing side would confirm nothing but itself. CI is green with the flag live. Run 31964180875, job All other required checks pass (Clippy, Rustfmt, CodeQL/Analyze x3, version increment, commitlint, all four package builds). |
Uh oh!
There was an error while loading. Please reload this page.
Closes DIG-Network/dig_ecosystem#3033.
What changed
ci.ymlcarried--fail-under-lines 80as a comment. The coverage job measured, printed, andignored the number, so a PR below the floor still went green. CLAUDE.md §2.3 requires every repo
CI-gated at ≥80% with a build below the floor FAILING. The flag is now on the actual command, and the
job-summary heading no longer says
measure-only.Worse than no gate: the machinery being present is exactly what made its absence invisible. A
reviewer seeing a green coverage check concludes the floor held.
The real number (measured BEFORE enabling anything)
cargo llvm-cov nextest --workspace --locked --retries 2 --summary-only, full workspace, 2015 tests,exit 0:
The repo is above the contract floor, so the gate is set at 80 — the contract's value, not a
number tuned to whatever passes today. Headroom is 7.67 points of lines.
Note on reading that table: llvm-cov's summary columns run Regions, then Functions, then Lines, and
the leftmost pair is the largest, which invites reading the region number as the line number. The
gated metric here is the third block, 87.67%.
Exclusions
None. No
--ignore-filename-regexwas added. Nothing had to be excluded to reach green, sonothing was; an exclusion list is only honest when each entry carries a reason, and here there are no
reasons to state. (Sibling repos do exclude bin targets — dig-app and dig-installer both ignore
main.rs/src/bin— but dig-node clears the floor with those files counted, so it stays stricter.)Blast radius
CI configuration plus a patch version bump; no library or binary code is touched. The changed-symbol
set is empty — the diff is
.github/workflows/ci.yml,Cargo.toml,Cargo.lock(the lock entryfor
dig-node-servicefollows the workspace version, so--lockedstill resolves). The real blastradius is every future PR to this repo, which is the point: from here a PR that drops line coverage
below 80% fails a required check.
No overlap with the sibling lane on
crates/dig-wallet/src/sage/peer_reads.rs+ the DB layer(dig_ecosystem#3035) — this branch touches none of those files.
Version
0.121.0 → 0.121.1 (patch — CI/chore, no behaviour change).
How verified
The full instrumented workspace run above is the same invocation CI runs, now with the flag appended;
it completed exit 0 at 87.67% lines.
--fail-under-linesis llvm-cov's own exit-code mechanism, sothe enforcing form differs from the measured form only in that a sub-floor total exits non-zero.