← Back to Pull requests

ci: Add opt-in fingerprint-based artifact reuse behind ci:reuse-fprint label #10264

Open
unknown opened this pull request with 391 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 24, 2026 20:47 UTC
Author

[!NOTE]

Do not review, it is only for experiments for now

Some experiments will conducted in this branch and shared/artifact-reuse-integration (#10355) branch

Motivation

RFC0017 selects reusable CI artifacts by the THEROCK_FPRINT fingerprints computed when the build is configured. This branch tries that in CI with a standalone workflow, without changing the multi-arch CI workflows, as requested in review. Once it works, those workflows can call it with uses:.

GitHub issue: #8651
RFC: #9500 (RFC0017)
Builds on: #10026 (static cache index and artifact_cache.py lookup)

Technical Details

  • .github/workflows/multi_arch_setup_artifact_cache.yml (new): fetches and configures one build stage (default compiler-runtime) so CMake writes build/artifacts/*.fprint, then runs setup_artifact_cache.py. Inputs: stage, dist GPU families, artifact patterns, copy_hits (default off: report only), runner label. Uploads the plan.

  • build_tools/artifact_cache/setup_artifact_cache.py (new):

  • 1. Looks up the fingerprints in the index, as artifact_cache.py lookup does.
    2. Checks every hit in the CI run that produced it: the archive must exist and its .sha256sum must match the index. A group with a failed check is not reused.
    3. With copy_hits, copies each hit from its own source run. Hits may come from different runs; there is no single baseline_run_id.
    4. Writes each artifact's result (copied, hit, miss, unverified) and source run to the job summary.

    Missing fingerprints and misses are normal results; real errors fail the job.

  • multi_arch_ci_linux.yml and configure_multi_arch_ci.py are back to their main versions (no ci:reuse-fprint label).
  • Test Plan

  • python -m pytest build_tools/artifact_cache/tests (lookup, per-run checks, copying from two source runs, summary; local directory backend, no network).

  • python -m pytest build_tools/github_actions/tests/configure_multi_arch_ci_test.py (CI configuration unchanged).

  • black, mdformat, actionlint.

  • setup_artifact_cache.py in report-only mode against the prototype index and real S3.

  • A workflow run on this branch.
  • Test Result

  • build_tools/artifact_cache/tests: 61 passed. configure_multi_arch_ci_test.py: 215 passed, 1 skipped. Each of the 7 commits passes on its own.

  • Report-only run against S3: all 5 amd-llvm archives from run 43936062480 exist and match the index checksums.

  • Workflow run: <link to the first run on this branch>.
  • Open items

  • A new workflow can only be dispatched once it is on the default branch, so for now it also runs on pushes to this branch with the default inputs. A small stub on main would allow workflow_dispatch with inputs.

  • Stage-level summary (which stages would be skipped because every artifact hit) is not done yet.

  • Fingerprints only match if the workflow configures like the CI runs in the index (for example the same dist GPU families).
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • Diff: 391 lines (+293 / -98) across 4 files Reviewer: erman-gurses Review duration: 15265m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 391 lines diff across 4 files
    0.43
    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%
    46%
    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.357
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #10264"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.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: 43.1% (MEDIUM) · Higher = larger blast radius
    43.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: 46.7% · Lower = rushed or shallow review
    46.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: 23.0% · Safe to merge
    23.0%
    Repository