Repository navigation
ci: fix Coverage on Rust 1.100 and the logging.rs coverage flake - #452
Merged
Merged
Conversation
…ndependent logging_helpers_cover_remaining_branches poisons PANIC_CLEANUP on purpose, and poison is sticky. When it ran before panic_hook_runs_registered_cleanup, run_panic_cleanup never took its Ok branch and whycodes-core fell to 3011/3012 lines (core/src/logging.rs miss 1). Clear the poison first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rust 1.100 flags the headless resize error arm as unreachable (the test backend's error type is uninhabited) and two if-guard-then-true tails as needless_bool. Lint & Budgets fails on every PR until these are fixed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Also fixes three new Rust 1.100 lints that fail Lint & Budgets on every PR: |
rustc 1.100 reports executed lines as 0 (e.g. whycodes-schema drops from 117/117 to 120/121 with no code change), failing every 100% floor and the workspace floor. Pin only the coverage toolchain until stable measures the same again; lint, test and build stay on stable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Coverage on Rust 1.100 dropped to 94.6% workspace / dozens of 100%-floor crates with no code change. Reproduced locally: |
Formatter tests run rustfmt; under RUSTUP_TOOLCHAIN=1.99.1 the proxy needs that toolchain's rustfmt component. Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
added a commit
that referenced
this pull request
Nov 21, 2026
The stable experiment in the previous commit measured worse on Linux (workspace 94.3%), so the toolchain was not the cause. The last good main run (2026-11-12) used the same rustc 1.99.1 and cargo-llvm-cov 0.9.1 and measured whycodes-schema at 117/117; failing runs report 117/121 on unchanged source, so the line totals grew. The persistent ${CARGO_TARGET_DIR}-llvm-cov dir is never cleaned (by design, for speed), and cargo-llvm-cov reports every test binary it finds there: binaries built by another rustc (the 1.100 runs around #452, and this PR's stable run) have no profile and count as uncovered lines.
coverage.sh now keys that dir by RUSTUP_TOOLCHAIN (${CARGO_TARGET_DIR}-llvm-cov-1.99.1 in CI), which also starts CI on a clean dir once. rustc stays pinned to 1.99.1 and cargo-llvm-cov to 0.9.1. Local runs without RUSTUP_TOOLCHAIN keep the old path.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
added a commit
that referenced
this pull request
Nov 21, 2026
* ci: Coverage back on stable rustc, cargo-llvm-cov pinned to 0.9.1 Coverage has failed on main since #454: every crate drops below its floor (whycodes-schema 117/121, whycodes-function 67/68) although all tests pass. Reproduced locally: with cargo-llvm-cov 0.9.1, rustc 1.99.1 reports lines that ran as 0 (schema/validator.rs 81, 136-137, 156), while stable 1.100 measures those crates at 100%, the unpin condition #452 wrote down. The tool and the compiler drift together, so the Measure step now uses rust-toolchain.toml's stable and installs [email protected]. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: key the llvm-cov cache by toolchain; keep rustc 1.99.1 The stable experiment in the previous commit measured worse on Linux (workspace 94.3%), so the toolchain was not the cause. The last good main run (2026-11-12) used the same rustc 1.99.1 and cargo-llvm-cov 0.9.1 and measured whycodes-schema at 117/117; failing runs report 117/121 on unchanged source, so the line totals grew. The persistent ${CARGO_TARGET_DIR}-llvm-cov dir is never cleaned (by design, for speed), and cargo-llvm-cov reports every test binary it finds there: binaries built by another rustc (the 1.100 runs around #452, and this PR's stable run) have no profile and count as uncovered lines. coverage.sh now keys that dir by RUSTUP_TOOLCHAIN (${CARGO_TARGET_DIR}-llvm-cov-1.99.1 in CI), which also starts CI on a clean dir once. rustc stays pinned to 1.99.1 and cargo-llvm-cov to 0.9.1. Local runs without RUSTUP_TOOLCHAIN keep the old path. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the recurring Coverage flake
FAIL whycodes-core: 3011/3012 lines/core/src/logging.rs: 457/458 miss 1.Cause:
logging_helpers_cover_remaining_branchespoisonsPANIC_CLEANUPon purpose, and mutex poison is sticky. When that test ran beforepanic_hook_runs_registered_cleanup,run_panic_cleanuponly ever saw thePoisonedbranch, so theOk(g) => gline (logging.rs:552) went uncovered.Fix: clear the poison at the start of
panic_hook_runs_registered_cleanup(both tests holdTEST_LOCK, so this is race-free).Verified:
cargo llvm-cov -p whycodes-core --lib -- --test-threads=1 logging_helpers_cover_remaining_branches panic_hook_runs_registered_cleanup— line 552 hit count 0 before, 2 after.🤖 Generated with Claude Code