test: enforce ninety percent coverage floor

This commit is contained in:
Dandaedre 2026-09-29 18:18:43 +02:00
parent e33f47e285
commit 2001b7070f
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
5 changed files with 19 additions and 14 deletions

View File

@ -1,8 +1,8 @@
[last_run_clean]
run_status = "Success"
lines_parsed = 322
coverage = 80.51
lines_parsed = 335
coverage = 92.16
[last_run_clean.run_duration]
secs = 33
nanos = 921864525
secs = 34
nanos = 910199784

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="122" height="18" role="img" aria-label="test-coverage: 81%"><title>test-coverage: 81%</title><linearGradient id="bms-133bc2b82810c083" x2="0" y2="100%"><stop offset="0" stop-color="#fff" stop-opacity=".7"/><stop offset=".1" stop-color="#aaa" stop-opacity=".1"/><stop offset=".9" stop-color="#000" stop-opacity=".3"/><stop offset="1" stop-color="#000" stop-opacity=".5"/></linearGradient><clipPath id="bmr-133bc2b82810c083"><rect width="122" height="18" rx="4" fill="#fff"/></clipPath><g clip-path="url(#bmr-133bc2b82810c083)"><rect width="87" height="18" fill="#555"/><rect x="87" width="35" height="18" fill="#97ca00"/><rect width="122" height="18" fill="url(#bms-133bc2b82810c083)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="445" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="770">test-coverage</text><text x="445" y="130" transform="scale(.1)" fill="#fff" textLength="770">test-coverage</text><text aria-hidden="true" x="1035" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">81%</text><text x="1035" y="130" transform="scale(.1)" fill="#fff" textLength="250">81%</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="122" height="18" role="img" aria-label="test-coverage: 92%"><title>test-coverage: 92%</title><linearGradient id="bms-9dc65f7f72910b0a" x2="0" y2="100%"><stop offset="0" stop-color="#fff" stop-opacity=".7"/><stop offset=".1" stop-color="#aaa" stop-opacity=".1"/><stop offset=".9" stop-color="#000" stop-opacity=".3"/><stop offset="1" stop-color="#000" stop-opacity=".5"/></linearGradient><clipPath id="bmr-9dc65f7f72910b0a"><rect width="122" height="18" rx="4" fill="#fff"/></clipPath><g clip-path="url(#bmr-9dc65f7f72910b0a)"><rect width="87" height="18" fill="#555"/><rect x="87" width="35" height="18" fill="#97ca00"/><rect width="122" height="18" fill="url(#bms-9dc65f7f72910b0a)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="445" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="770">test-coverage</text><text x="445" y="130" transform="scale(.1)" fill="#fff" textLength="770">test-coverage</text><text aria-hidden="true" x="1035" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">92%</text><text x="1035" y="130" transform="scale(.1)" fill="#fff" textLength="250">92%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -45,10 +45,11 @@ Run line coverage with Cargo Tarpaulin:
cargo tarpaulin --config tarpaulin.toml
```
The configuration enforces a 30% floor. The current suite measured 80.51%
(1161/1442 lines) on 2026-09-29. The low floor is intentional because CLI
subprocess attribution varies between coverage backends; the tracked badge
still reports the measured result.
The configuration enforces a 90% floor. The current suite measured 92.16%
(1329/1442 lines) on 2026-09-29. The remaining lines are dominated by
platform/I/O failure injection, malformed archive internals, coordinate
overflow, LSP logging/reload failures, and subprocess attribution. Do not add
brittle tests or production seams solely to make Tarpaulin count those paths.
After a clean test and coverage run, refresh the repository-local badges with:

View File

@ -1,13 +1,12 @@
[coverage]
all-features = true
engine = "Llvm"
fail-under = 30.0
fail-under = 90.0
locked = true
run-types = ["Tests"]
[report]
out = ["Stdout"]
# CLI behavior is covered by subprocess integration tests. Tarpaulin may not
# attribute those child-process lines on every backend, so the enforced floor is
# intentionally modest and the badge reports the directly measured result.
# Keep this below the current measurement rather than chasing backend-specific
# subprocess attribution or platform-only failure branches for marginal gains.

View File

@ -248,13 +248,18 @@ line-coverage run.
including unsafe, binary, malformed, and oversized members.
- [x] Cover remaining practical CLI, formatter, and LSP adapter branches without
coupling tests to unreachable platform failures or coverage-tool artifacts.
- [ ] Raise measured Tarpaulin line coverage toward 90%, refresh badges and
- [x] Raise measured Tarpaulin line coverage toward 90%, refresh badges and
development documentation, and record any intentionally uncovered remainder.
Acceptance: the suite exercises at least 90% of measurable source lines when
Tarpaulin can attribute them reliably; remaining misses are documented and do
not justify brittle tests or production changes made solely for instrumentation.
Accepted on 2026-09-29 at 92.16% line coverage (1,329/1,442), with the CI floor
raised to 90%. Remaining misses are primarily hard-to-inject OS/I/O failures,
malformed dependency internals, overflow guards, and asynchronous LSP error
plumbing; pursuing them would add test-only seams or backend-sensitive checks.
## Deferred by design
- Statistical or model-based authorship classification.