Fix CI strict coverage surface mismatch #249
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #243 exposed that the strict coverage gate has two different measurement surfaces.
Expected/local strict surface after a clean run:
make coverage-strict COV_MIN=71nightly-2026-08-07cli/pr.rs856 regions,cli/stack.rs3783,client/mod.rs1037CI pull_request surface, same PR head and same pinned toolchain:
cargo +nightly-2026-08-07 llvm-cov clean --workspaceCARGO_ENCODED_RUSTFLAGSand setsRUSTFLAGS="--cfg coverage_nightly"RUSTFLAGS=,CARGO_ENCODED_RUSTFLAGS=,RUSTC_WRAPPER=before the targetcli/pr.rs1417 regions,cli/stack.rs6071,client/mod.rs1956That means CI is not measuring the surface the 71 floor was calibrated against. Until this is fixed, PR coverage enforcement should be treated as suspended/noisy diagnostic output, not a trustworthy merge gate.
To settle it, reproduce the Forgejo runner container locally or on a disposable runner and explain why
#[cfg_attr(coverage_nightly, coverage(off))]changes the report locally but not in CI with the same command. Expected fix is either runner/tooling configuration that makes CI report the 25592-region surface, or recalibration of the floor against the CI surface with intentional coverage additions.Durable note from fj#243: the defect is not simply "PR coverage failed"; it is that CI is not applying
cfg(coverage_nightly)/coverage(off)to the measured surface.Reference measurement: run 465 on PR head
6a316a8. CI printed emptyRUSTFLAGS,CARGO_ENCODED_RUSTFLAGS, andRUSTC_WRAPPER, then ran:CARGO_ENCODED_RUSTFLAGS= RUSTFLAGS="--cfg coverage_nightly" cargo +nightly-2026-08-07 llvm-cov --all --summary-only --no-rustc-wrapper --fail-under-lines 71 ...It still measured the non-strict surface: total 31091 regions / 18924 lines / 68.48%, with
cli/pr.rs1417,cli/stack.rs6071,client/mod.rs1956.Ruled out before the loud suspension:
nightly-2026-08-07.cargo llvm-cov clean --workspacebefore measuring.--no-rustc-wrapper, clearedCARGO_ENCODED_RUSTFLAGS, setRUSTFLAGS="--cfg coverage_nightly", and printed the relevant env vars.Local clean
make coverage-strict COV_MIN=71on the same branch does apply the strict surface and passes at 83.59%: total 25592 regions / 15500 lines, withcli/pr.rs856,cli/stack.rs3783,client/mod.rs1037.