← Back to Pull requests

TheRock : Code Coverage - add the Linux coverage CI entry workflow #8605

Open
unknown opened this pull request with 589 lines diff across 7 files
View on GitHub
unknown unknown commented on Sep 29, 2026 17:24 UTC
Author

Motivation

GitHub issue: https://github.com/ROCm/TheRock/issues/6572

This is the workflow part of TheRock's code coverage support. This PR adds the CI entry point and the coverage CI docs, and the matrix script and the per-project test and report workflow are in #10335 and #10334. The entry point builds an instrumented stack, runs each selected project's tests against it, and publishes the project's coverage report.

It depends on five other PRs:

  • #8598 (build): passes -D<PROJECT>_ENABLE_COVERAGE through to subprojects and adds the THEROCK_COVERAGE_* group options.

  • #8602 (report): merge_coverage_report.py.

  • #9717: the extra_cmake_options input of multi_arch_build_portable_linux_artifacts.yml.

  • #10335: configure_coverage_ci.py, which computes the job matrix and the coverage CMake options.

  • #10334: multi_arch_ci_coverage_report.yml, which runs one project's tests and builds its report.
  • All six PRs form a GitHub stack, which from the bottom is #9717, #8602, #10334, #8598, #10335 and this PR. This PR is the top layer and targets #10335's branch, so the diff here shows only this PR's changes. When the PRs below it merge, GitHub rebases it and, once it is at the bottom, retargets it to main.

    Technical Details

  • .github/workflows/multi_arch_ci_coverage_linux.yml (new): the entry point, run by workflow_dispatch or, from another repository, by workflow_call.

  • - setup_coverage_matrix runs configure_coverage_ci.py, which outputs the report matrix and the CMake options that instrument the selected projects.
    - build_compiler_runtime builds the compiler-runtime stage normally. build_instrumented_math_libs builds math-libs with those options passed as extra_cmake_options.
    - coverage_report runs multi_arch_ci_coverage_report.yml once per project and GPU family, and ci_summary collects the results.
    - Its inputs are projects_to_test, amdgpu_families (default gfx94X-dcgpu), test_type, the three group inputs, quartz_tracking_id (reserved for release tracking and passed to the builds), and repository and ref, which tell the workflow where its scripts are when another repository calls it. The group inputs, coverage_rocm_libraries_all, coverage_rocm_systems_all and coverage_all, also instrument whole groups through #8598's options. Reports still cover only projects_to_test, although an instrumented dependency's inline code can add to a report's counts, as code_coverage.md explains. coverage_rocm_libraries_all and coverage_all leave hipCCL out, since its instrumented build doesn't link yet, and coverage_rocm_systems_all has no effect for now: the rocm-systems projects build in comm-libs, which this workflow doesn't build yet.
    - The build calls keep secrets: inherit, as main's callers do, because the build workflow reads Quartz notification secrets it doesn't declare. The report call passes only CODECOV_TOKEN.
  • Docs: code_coverage.md gains sections on producing a report locally, the coverage CI run, selecting projects, adding a project and adding a stage. ci_overview.md describes the coverage entry point, and the docs index links the Coverage CI section.
  • Test Plan

  • pre-commit run on the changed files, including actionlint, which checks every reusable-workflow call against the called workflow's inputs.

  • Unit tests for the stack: configure_coverage_ci_test.py and merge_coverage_report_test.py.

  • zizmor on both coverage workflows, with the repository's config (build_tools/scan_tools/zizmor.yml).

  • End to end through draft #10016, which runs the whole coverage flow on a pull request.

  • CI on this PR.
  • Test Result

  • pre-commit: all hooks pass.

  • Unit tests: 37 passed.

  • zizmor 1.30.1: no high, medium or low findings. The 2 informational template-injection notes are for the checkout's commit SHA and toJSON(needs) in the entry workflow; neither is an input.

  • End to end: run 45937528507 on #10016, with all three group inputs on, passed every job in 58 minutes: setup, the compiler-runtime and instrumented math-libs builds, hipDNN's tests, and its report at 83.80% line coverage. That run used the same files as this stack; the split moved them between PRs without changing them.

  • CI on this PR: pre-commit, Unit Tests (Linux and Windows), the security scan and Multi-Arch CI pass. Multi-Arch CI builds nothing for changes to workflows and docs, so the end-to-end run above is what exercises the entry workflow.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • Diff: 589 lines (+441 / -148) across 7 files Reviewer: endurthiabhilash Review duration: 90723m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.57) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 589 lines diff across 7 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    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.382
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #8605"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% 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: 57.0% (MEDIUM) · Higher = larger blast radius
    57.0%
    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: 44.7% · Lower = rushed or shallow review
    44.7%
    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: 31.5% · Safe to merge
    31.5%
    Repository