feat(rust-ci-reusable): real owned coverage gate (llvm-cov + ratcheted floor)#470
Merged
Merged
Conversation
…d floor)
The coverage job was opt-in tarpaulin -> external codecov with NO enforced
threshold (just an upload), so 'covered' claims were unbacked estate-wide.
Now, when enable_coverage is set, it:
- measures line coverage with cargo-llvm-cov (accurate, no external service);
- enforces a caller-supplied coverage_floor (new input, default 0 = report-only)
and FAILS the job below it — a gate we OWN on our own runner;
- reports the % to the job summary.
Ratchet model: set coverage_floor at the repo's honest baseline and raise it
toward target over time; never lower it. First consumer: hybrid-automation-router
(floor 84). This is the banked 'reusable tests for all repos' coverage gate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.



Why
The estate's
rust-ci-reusablecoverage job was opt-incargo tarpaulin→ external codecov with no enforced threshold — an upload, not a gate. So every "covered" claim was unbacked, and coverage was effectively untracked estate-wide (the gap flagged in the next-gen-testing review).What
When
enable_coverage: true, the job now:cargo-llvm-cov(accurate, self-contained — no external service, matching the estate "own your gates" philosophy);coverage_floorinput (default"0"= report-only) and fails below it;Ratchet model: set
coverage_floorat the repo's honest baseline, raise it toward target over time, never lower it.Reuse — "build once, bank it"
This is the banked coverage gate for every Rust repo. First consumer:
hybrid-automation-router(measured baseline 84.45% → floor84, ratcheting to 95%), which will drop its standalonecoverage.ymland call this withenable_coverage: true, coverage_floor: "84".Validated: YAML parses (
yq); job renamedllvm-cov line coverage; no tarpaulin/codecov remain.🤖 Generated with Claude Code