From 2001b7070f73e1870d41b6ad2a4d694150bf4c8b Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 29 Sep 2026 18:18:43 +0200 Subject: [PATCH] test: enforce ninety percent coverage floor --- .run_status.toml | 8 ++++---- badges/coverage.svg | 2 +- docs/development.md | 9 +++++---- tarpaulin.toml | 7 +++---- tasks.md | 7 ++++++- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.run_status.toml b/.run_status.toml index a60e0e1..cb4259b 100644 --- a/.run_status.toml +++ b/.run_status.toml @@ -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 diff --git a/badges/coverage.svg b/badges/coverage.svg index ab00d78..e241ff1 100644 --- a/badges/coverage.svg +++ b/badges/coverage.svg @@ -1 +1 @@ -test-coverage: 81%test-coverage81% \ No newline at end of file +test-coverage: 92%test-coverage92% \ No newline at end of file diff --git a/docs/development.md b/docs/development.md index 7d2acd7..528c6ca 100644 --- a/docs/development.md +++ b/docs/development.md @@ -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: diff --git a/tarpaulin.toml b/tarpaulin.toml index 8f490ee..533d9df 100644 --- a/tarpaulin.toml +++ b/tarpaulin.toml @@ -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. diff --git a/tasks.md b/tasks.md index 4eec696..b3a2b03 100644 --- a/tasks.md +++ b/tasks.md @@ -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.