Skip to content

feat(rust-ci-reusable): real owned coverage gate (llvm-cov + ratcheted floor)#470

Merged
hyperpolymath merged 1 commit into
mainfrom
enhance-rust-coverage-reusable
Jul 6, 2026
Merged

feat(rust-ci-reusable): real owned coverage gate (llvm-cov + ratcheted floor)#470
hyperpolymath merged 1 commit into
mainfrom
enhance-rust-coverage-reusable

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

The estate's rust-ci-reusable coverage job was opt-in cargo tarpaulinexternal 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:

  • measures line coverage with cargo-llvm-cov (accurate, self-contained — no external service, matching the estate "own your gates" philosophy);
  • enforces a new coverage_floor input (default "0" = report-only) and fails below it;
  • writes the % to the job summary.

Ratchet model: set coverage_floor at 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% → floor 84, ratcheting to 95%), which will drop its standalone coverage.yml and call this with enable_coverage: true, coverage_floor: "84".

Validated: YAML parses (yq); job renamed llvm-cov line coverage; no tarpaulin/codecov remain.

🤖 Generated with Claude Code

…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>
@hyperpolymath hyperpolymath enabled auto-merge (squash) July 6, 2026 16:24
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@hyperpolymath hyperpolymath disabled auto-merge July 6, 2026 16:45
@hyperpolymath hyperpolymath enabled auto-merge (rebase) July 6, 2026 16:45
@hyperpolymath hyperpolymath disabled auto-merge July 6, 2026 16:45
@hyperpolymath hyperpolymath merged commit c258dc7 into main Jul 6, 2026
20 checks passed
@hyperpolymath hyperpolymath deleted the enhance-rust-coverage-reusable branch July 6, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant