← Back to Pull requests

feat(ci): add code coverage component test workflow and installer #7828

Closed
unknown closed this pull request without merging on Sep 17, 2026 19:14 UTC
View on GitHub
unknown unknown commented on Sep 02, 2026 06:11 UTC
Author

Motivation


Nightly code-coverage runs need to test a normal (non-instrumented)
TheRock build in which only specific components (e.g. rocBLAS, rocSOLVER)
are swapped for their instrumented counterparts, then collect llvm
profraw files from the test run. This lets coverage be measured for a
targeted component without paying the cost of a fully instrumented build. GitHub Issue: #6572

## Technical Details

  • Add .github/workflows/test_code_coverage_component.yml, a reusable

  • (workflow_call) job mirroring the standard component test workflow with
    coverage-specific additions:
    - Installs the coverage build via install_rocm_code_coverage_build.py
    instead of install_rocm_from_artifacts.py.
    - coverage_enabled input sets LLVM_PROFILE_FILE (with %p/%m so
    forked/multi-lib shards don't overwrite profraw files) and uploads the
    profraw as a workflow artifact, keyed by coverage_artifact_prefix.
    - Uploads coverage even on test failure (partial shard data is still useful).
  • Add build_tools/install_rocm_code_coverage_build.py:

  • - Installs the generic build via install_rocm_from_artifacts.main, then
    downloads instrumented replacement artifacts from the code-coverage run.
    - --replace-rocblas / --replace-rocsolver map to the blas / solver
    artifacts; only library paths matching the keyword are swapped, leaving
    co-packaged libs (e.g. hipBLAS) untouched.
    - Flattens replacement archive members (file/dir/symlink/hardlink) into the
    install tree, preserving exec bits and link structure.

    Test Plan

    <!-- Explain any relevant testing done to verify this PR. -->

    Test Result

    <!-- Briefly summarize test outcomes. -->

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • Diff: 233 lines (+174 / -59) across 2 files Reviewer: endurthiabhilash Review duration: 22382m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 233 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7828"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.1% (MEDIUM) · Higher = larger blast radius
    37.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%
    Repository