Skip to content

ci: add codecov carryforward flag for shielded tests#3287

Merged
QuantumExplorer merged 1 commit into
v3.1-devfrom
ci/codecov-carryforward-flags
Mar 15, 2026
Merged

ci: add codecov carryforward flag for shielded tests#3287
QuantumExplorer merged 1 commit into
v3.1-devfrom
ci/codecov-carryforward-flags

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Mar 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Add two Codecov flags in .codecov.yml:
    • rust — main test coverage (always runs, no carryforward)
    • rust-shielded — ZK/shielded test coverage (carryforward: true)
  • When a PR doesn't trigger ZK tests, Codecov carries forward the last known shielded coverage instead of treating it as zero
  • Fixes misleading negative coverage diffs on PRs that don't touch shielded code
  • Adds cargo-llvm-cov instrumentation to the ZK tests job with rust-shielded flag upload

Test plan

  • Verify PR coverage diffs no longer show negative from missing shielded coverage
  • Verify ZK tests upload coverage with rust-shielded flag when they run
  • Verify carryforward works when ZK tests don't run

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Enhanced code coverage reporting infrastructure with updated CI/CD pipeline configuration.
    • Improved test coverage tracking for Rust workspace components.

Add two Codecov flags:
- rust: main test coverage (always runs)
- rust-shielded: ZK/shielded test coverage (carryforward: true)

When a PR doesn't trigger ZK tests, Codecov carries forward the
last known shielded coverage instead of treating it as zero. This
fixes the misleading negative coverage diff on PRs that don't
touch shielded code.

Also adds coverage instrumentation (cargo-llvm-cov) to the ZK
tests job and uploads with the rust-shielded flag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added this to the v3.1.0 milestone Mar 15, 2026
@coderabbitai

coderabbitai Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32eca784-9eef-42c1-a537-567618286844

📥 Commits

Reviewing files that changed from the base of the PR and between d82ca97 and 6c98451.

📒 Files selected for processing (2)
  • .codecov.yml
  • .github/workflows/tests-rs-workspace.yml

📝 Walkthrough

Walkthrough

Configuration updates to improve code coverage tracking: .codecov.yml now specifies separate flags for general rust and rust-shielded coverage with different carryforward settings, while the CI workflow in .github/workflows/tests-rs-workspace.yml integrates cargo-llvm-cov for coverage generation with updated test commands.

Changes

Cohort / File(s) Summary
Codecov Configuration
.codecov.yml
Added codecov flags (rust with carryforward disabled and rust-shielded with carryforward enabled) and expanded ignore patterns for test/package directories.
CI Workflow
.github/workflows/tests-rs-workspace.yml
Switched codecov flag from rust-mac to rust, added llvm-tools component and cargo-llvm-cov setup, updated ZK/Shielded tests to use cargo-llvm-cov for coverage generation, and added dedicated step for uploading shielded coverage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With coverage flags now clear and bright,
Our shielded tests bask in LCOV light,
Llvm-tools bring precision true,
Codecov flows with carryforward cue,
CI pipelines sparkle, coverage review!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change—adding codecov carryforward flags for shielded tests to prevent misleading coverage diffs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/codecov-carryforward-flags
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@QuantumExplorer QuantumExplorer merged commit 658d02d into v3.1-dev Mar 15, 2026
24 checks passed
@QuantumExplorer QuantumExplorer deleted the ci/codecov-carryforward-flags branch March 15, 2026 09:21
@codecov

codecov Bot commented Mar 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.28%. Comparing base (d82ca97) to head (6c98451).
⚠️ Report is 1 commits behind head on v3.1-dev.

Additional details and impacted files
@@             Coverage Diff              @@
##           v3.1-dev    #3287      +/-   ##
============================================
- Coverage     70.42%   68.28%   -2.15%     
============================================
  Files          3293     3293              
  Lines        262598   262598              
============================================
- Hits         184935   179314    -5621     
- Misses        77663    83284    +5621     
Components Coverage Δ
dpp 56.61% <ø> (-1.82%) ⬇️
drive 74.76% <ø> (-3.44%) ⬇️
drive-abci 81.44% <ø> (-1.49%) ⬇️
sdk 30.34% <ø> (-0.91%) ⬇️
dapi-client 39.08% <ø> (ø)
platform-version ∅ <ø> (∅)
platform-value 39.35% <ø> (ø)
platform-wallet 60.40% <ø> (ø)
drive-proof-verifier ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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