← Back to Pull requests

Seed pre-commit cache from main builds #2289

Merged
bdice merged 2 files (17 lines) on Nov 06, 2026 20:08 UTC
View on GitHub
bdice bdice commented on Nov 06, 2026 17:27 UTC
Author

Run the shared checks workflow as a style-only job on main builds so it writes the pre-commit cache, and make PR checks restore that cache read-only.

Today pre-commit cache entries are scoped to each PR's merge ref, which other PRs cannot read. The first style check on every PR runs cold, and the per-PR entries fill the repository's GitHub Actions cache quota.

Mirrors https://github.com/NVIDIA/cudf/pull/24093.

Part of https://github.com/rapidsai/build-planning/issues/332.

Diff: 17 lines (+17 / -0) across 2 files Reviewer: cryos Review duration: 161m
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.22) × (1 − Review Confidence (0.72)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.22 · 17 lines diff across 2 files
0.22
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.55 · 3 substantive comment(s)
0.55
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
71%
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.173
Real PR Conversation Timeline
6 items
coderabbitai[bot] coderabbitai[bot] commented on Nov 06, 2026 17:30 UTC
Bot

<!-- coderabbit-ai-generated:v1 -->

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- review_stack_entry_start -->

<a href="https://app.coderabbit.ai/change-stack/NVIDIA/cuopt/pull/2289?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a>

<!-- review_stack_entry_end -->
<!-- recent_review_status_start -->

No actionable comments were generated in the recent review.

<!-- recent_review_status_end -->
<!-- walkthrough_start -->

<details>
<summary><strong>Walkthrough</strong></summary>
<dl>
<dd>
<br>

The build workflow adds a main-only checks job that uses the shared checks workflow and seeds the pre-commit cache. The PR workflow configures the cache as read-only.

Changes: Checks Workflow

|Layer / File(s)|Summary|
|:---|:---|
|Checks workflow and cache behavior <br> .github/workflows/build.yaml, .github/workflows/pr.yaml|The build workflow adds a checks job that runs only on main, uses read-only Actions and contents permissions, and seeds the pre-commit cache with base-branch: main. It disables five checks. The PR workflow sets pre-commit-cache-read-only: true and adds comments about cache use by PR merge refs and avoiding duplicate archives.|

<!-- change_assessment_start -->
Estimated code review effort: 2 (Simple) | ~8 minutes

<!-- change_assessment_commit:"cbfb311b6d99e032c02ebf0c1138856707a091a3" -->
<!-- change_assessment_priority:{"version":1,"urgency":"p3","manual":false} -->
Change: Other
<!-- change_assessment_end -->

Suggested labels: improvement, non-breaking

Suggested reviewers: ramakrishnap-nv

</dd>
</dl>
</details>

<!-- walkthrough_end -->
<details>
<summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>cbfb3</code></summary>
<dl>
<dd>
<br>

<!-- final_review_risk_start -->
<!-- final_review_risk_label
Merge Risk: ⚪ Minimal · up to cbfb3
-->
<!-- final_review_risk_coverage:{"sourceCommitId":"cbfb311b6d99e032c02ebf0c1138856707a091a3","coveredCommitId":"cbfb311b6d99e032c02ebf0c1138856707a091a3","kind":"reviewed"} -->

No actionable merge-blocking issue was found; cache reuse depends on a matching main-branch archive being available.
<!-- final_review_risk_end -->

</dd>
</dl>
</details>
<!-- pre_merge_checks_walkthrough_start -->

<details>
<summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 5</strong></summary>
<dl>
<dd>
<br>

| Check name | Status | Explanation |
| :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title check | !Passed | The title identifies the main change: seeding the pre-commit cache from main builds. |
| Description check | !Passed | The description matches the cache-seeding and read-only PR workflow changes. |
| Docstring Coverage | !Passed | No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
| Linked Issues check | !Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | !Passed | Check skipped because no linked issues were found for this pull request. |

<details>
<summary><strong>Full details: Docstring Coverage</strong></summary>
<dl>
<dd>
<br>

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

</dd>
</dl>
</details>

</dd>
</dl>
</details>

<!-- pre_merge_checks_walkthrough_end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary><strong>Finishing Touches</strong></summary>
<dl>
<dd>
<br>

<details open>
<summary><strong>Generate unit tests (beta)</strong></summary>
<dl>
<dd>
<br>

  • <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create a new PR
  • </dd>
    </dl>
    </details>

    </dd>
    </dl>
    </details>

    <!-- finishing_touch_checkbox_end -->

    <!-- autopilot:start -->

  • <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

  • <!-- autopilot:end -->
    <!-- recent_review_start -->

    <h6>
    <details>
    <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary>
    <dl>
    <dd>
    <br>

    <!-- review_info_content -->
    <details>
    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary>
    <dl>
    <dd>
    <br>

  • Source mode: Auto

  • Repository: [NVIDIA/cuopt](<https://github.com/NVIDIA/cuopt>)

  • Branch: [main](<https://github.com/NVIDIA/cuopt/tree/main>)

  • File: [.coderabbit.yaml](<https://github.com/NVIDIA/cuopt/blob/1af75d9e60a6137813f40a175157fe683f06ea1b/.coderabbit.yaml>)

  • Commit: [1af75d9](<https://github.com/NVIDIA/cuopt/commit/1af75d9e60a6137813f40a175157fe683f06ea1b>)

  • Layers: Repository YAML

  • Review profile: CHILL

  • Plan: Enterprise

  • Run ID: 67a4f501-d17b-42e7-86bb-255fd25ab474
  • </dd>
    </dl>
    </details>

    <details>
    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary>
    <dl>
    <dd>
    <br>

    Reviewing files that changed from the base of the PR and between 1af75d9e60a6137813f40a175157fe683f06ea1b and cbfb311b6d99e032c02ebf0c1138856707a091a3.

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</strong></summary>
    <dl>
    <dd>
    <br>

    .github/workflows/build.yaml
    .github/workflows/pr.yaml

    </dd>
    </dl>
    </details>

    Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

    </dd>
    </dl>
    </details>
    </h6>

    <!-- recent_review_end -->

    cryos cryos approved these changes on Nov 06, 2026 17:30 UTC
    Approved Reviewer

    Approved these changes.

    github-actions[bot] github-actions[bot] commented on Nov 06, 2026 18:31 UTC
    Bot

    <!-- pr-test-summary -->

    CI Test Summary

    1 failed · 27 passed · 0 skipped

    <details>
    <summary><code>conda-cpp-tests-mathopt / 13.0.3, 3.12, amd64, linux, ubuntu24.04, rtxpro6000, latest-driver, latest-deps</code> — 1 failed test</summary>

  • INCUMBENT_CALLBACK_TEST (crashed: SIGABRT)
  • </details>

    KyleFromNVIDIA KyleFromNVIDIA approved these changes on Nov 06, 2026 19:32 UTC
    Approved Reviewer

    Approved these changes.

    cryos cryos commented on Nov 06, 2026 20:08 UTC
    Contributor

    /merge

    Reviewers
    Assignees
    bdice bdice
    Labels
    risk: low confidence: 71.9% 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: 21.8% (LOW) · Higher = larger blast radius
    21.8%
    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: 71.9% · Lower = rushed or shallow review
    71.9%
    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: 6.1% · Safe to merge
    6.1%
    Repository