← Back to Pull requests

CI: port cuda-python's PR preview deploy and cleanup #471

Merged
leofang merged 5 files (262 lines) on Nov 17, 2026 19:30 UTC
View on GitHub
leofang leofang commented on Nov 17, 2026 15:42 UTC
Author

The nightly "Cleanup: PR Preview Documentation" workflow has failed every night since late May because it sets no git identity, so 38 of the 53 previews on gh-pages belong to closed PRs. Supersedes #464.

This brings the preview deploy and cleanup in line with cuda-python (NVIDIA/cuda-python#2914). The first commit copies ci/cleanup-pr-previews, the cleanup workflow and the doc_preview and get_pr_number actions unchanged from NVIDIA/cuda-python@b80866b3556717c6e702b9a9d11a7fc4ba62097d; the second adapts them to this repo. With that:

  • The nightly job is the only one that removes previews, including those of PRs closed without merging; pushes to main no longer delete the merged PR's preview.

  • build-docs.yml builds and deploys in separate jobs, and the deploy job shares a queued concurrency group with the cleanup, so writes to gh-pages no longer race.

  • The cleanup rebases and retries if gh-pages moved, and updates the sticky preview comment of each closed PR.
  • Run locally against this repo, the script finds 38 previews to remove and keeps the 15 of open PRs. After merging, a workflow_dispatch run with dry-run checks the workflow before the next nightly run.

    The last commit carries NVIDIA/cuda-python#3485, not yet merged there.

    -- Leo's bot

    Diff: 262 lines (+163 / -99) across 5 files Reviewer: jpascucci-nv Review duration: 228m
    All Vouch review confidence checks passed
    Residual risk 0.08 = Change Risk (0.65) × (1 − Review Confidence (0.88)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 262 lines diff across 5 files
    0.65
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.85 · 5 substantive comment(s)
    0.85
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    88%
    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.333
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    17 items
    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 17, 2026 15:42 UTC
    Bot

    This pull request requires additional validation before any workflows can run on NVIDIA's runners.

    Pull request vetters can view their responsibilities here.

    Contributors can view more details about this message here.

    leofang leofang commented on Nov 17, 2026 15:49 UTC
    Author

    /ok to test dc9bd1500a491c9a40e8f472f79a20a2172fe1ee

    coderabbitai[bot] coderabbitai[bot] commented on Nov 17, 2026 15:54 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/numba-cuda-mlir/pull/471?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 -->
    <!-- This is an auto-generated comment: review paused by coderabbit.ai -->

    [!NOTE]

    ## Reviews paused

    > It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

    > - Last reviewed commit: db185dd42c65158f5ee60945f55686aeeaabc277

    > Use the following commands to manage reviews:

    - @coderabbitai resume to resume automatic reviews.

    - @coderabbitai review to trigger a single review.

    > Use the checkboxes below for quick actions:

    - [ ] <!-- {"checkboxId":"7f6cc2e2-2e4e-497a-8c31-c9e4573e93d1"} --> Resume reviews

    - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review

    <!-- end of auto-generated comment: review paused by coderabbit.ai -->
    <!-- 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>

    Important: The documentation workflow now builds and deploys PR previews through a deployment artifact. Cleanup runs share a publishing lock, restrict remote pushes to scheduled or manually dispatched workflow runs, retry rejected pushes, and update comments for closed PR previews.

    Changes: Documentation preview publishing and cleanup

    |Layer / File(s)|Summary|
    |:---|:---|
    |Build and deploy PR previews <br> .github/actions/get_pr_number/action.yml, .github/actions/doc_preview/action.yml, .github/workflows/build-docs.yml|The build workflow records deployment metadata and uploads generated documentation as an artifact. A deploy job uses that artifact for previews on pull-request/ refs. The actions extract PR information and limit preview deployment to those refs.|
    |Serialize cleanup and update closed-PR comments <br> .github/workflows/cleanup-pr-previews.yml, ci/cleanup-pr-previews|The cleanup workflow shares a concurrency group with publishing and passes its lock value to the script. The script restricts remote pushes, retries rejected pushes, and updates comments for closed PR previews after a successful push.|

    Possibly related issues

  • Issue 467: The cleanup workflow checkout uses fetch-depth: 1. The build workflow still uses fetch-depth: 0, so the requested checkout change is only partly present.
  • Suggested labels: github_actions

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

    <!-- walkthrough_end -->
    <!-- change_assessment_start -->
    <!-- change_assessment_commit:"db185dd42c65158f5ee60945f55686aeeaabc277" -->
    <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} -->
    Change: Bug fix
    <!-- change_assessment_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>db185</code></summary>
    <dl>
    <dd>
    <br>

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

    This change moves PR preview deploys and cleanup onto a shared queued lock and restricts remote pushes to the scheduled or manually dispatched cleanup workflow. No merge-blocking risk was identified. A dry run after merge, as planned, would confirm the workflow in practice.
    <!-- final_review_risk_end -->

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

    <details>
    <summary><strong>Security architecture 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>db185</code></summary>
    <dl>
    <dd>
    <br>

    <!-- architecture_review_start -->
    <!-- architecture_review_label

    Security Architecture Review

    Security architecture risk: ⚪ Minimal · up to db185
    -->

    The inspected changes improve coordination of documentation publishing and constrain cleanup invocations. The added comment permission serves a bounded cleanup operation. No introduced or worsened risk materially affecting security, failure containment, rollback, or ownership was established.

    Retained concerns
    No architecture-level concerns identified.

    <details>
    <summary><strong>Security review details</strong></summary>
    <dl>
    <dd>
    <br>

    Security Blast Radius

  • _observed_ — The cleanup token's declared authority covers repository contents and pull requests, while the script's operations target NVIDIA/numba-cuda-mlir, the gh-pages branch, and selected PR comments. Content-write authority predates this PR; PR-comment write authority is new.
  • Trust Boundaries and Controls

  • _observed_ — Cleanup accepts only directory names matching pr-[0-9]+ before deriving API targets. Removal messages are static, and existing comments are selected by both the github-actions[bot] identity and the preview marker. These controls bound folder-derived input before the new comment-write sink.

  • _inferred_ — The script's event and lock-name checks are invocation safeguards, not an authentication boundary: matching environment values do not prove workflow identity or lock ownership. Actual access depends on token permissions and platform dispatch controls; synchronization depends on matching concurrency declarations.
  • Resilience and Maintainability Implications

  • _observed_ — Cleanup already treated any failed PR-status API request as not_found and selected that preview for removal. The PR preserves this behavior rather than adding it; transient API failures remain a pre-existing failure-containment limitation.
  • Hardening Proposals

  • _proposed_ — Consider an automated consistency check for the shared concurrency-group literals so future workflow edits cannot silently remove a publisher from serialization. The inspected declarations match today.
  • </dd>
    </dl>
    </details>
    <!-- architecture_review_end -->

    </dd>
    </dl>
    </details>
    <!-- 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/numba-cuda-mlir](<https://github.com/NVIDIA/numba-cuda-mlir>)

  • Branch: [main](<https://github.com/NVIDIA/numba-cuda-mlir/tree/main>)

  • File: [.coderabbit.yaml](<https://github.com/NVIDIA/numba-cuda-mlir/blob/f77f83017b381a9000357e4b24bd907e7f737c12/.coderabbit.yaml>)

  • Commit: [f77f830](<https://github.com/NVIDIA/numba-cuda-mlir/commit/f77f83017b381a9000357e4b24bd907e7f737c12>)

  • Layers: Repository YAML

  • Review profile: CHILL

  • Plan: Enterprise

  • Run ID: d0f1d1ab-10bf-4ea7-9f22-204e64a19ea4
  • </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 dc9bd1500a491c9a40e8f472f79a20a2172fe1ee and db185dd42c65158f5ee60945f55686aeeaabc277.

    </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: 1</strong></summary>
    <dl>
    <dd>
    <br>

  • ci/cleanup-pr-previews
  • </dd>
    </dl>
    </details>

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

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

    <!-- recent_review_end -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Nov 17, 2026 15:54 UTC
    Code Review
    .github/workflows/build-docs.yml:1
    @@ -149,20 +154,54 @@ jobs:
               path: docs/build/html/
               retention-days: 7
     
    -      - name: Deploy or clean up doc preview
    -        if: ${{ !inputs.is-release }}
    +      - name: Upload docs deployment payload
    +        uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9  # v7.0.2
    +        with:
    +          name: ${{ steps.deployment-metadata.outputs.deployment-artifact-name }}
    +          path: docs/build/html/
    +          retention-days: 3
    +          include-hidden-files: true
    +          if-no-files-found: error
    +
    +  deploy:
    +    name: Deploy docs
    +    # GitHub discards prerequisite artifacts on a new run attempt. If only this
    +    # job fails, use "Re-run all jobs" so the build recreates its payload.
    +    needs: build
    +    if: ${{ needs.build.result == 'success' }}

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

    <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor · Performance & Scalability · Quick win

    Gate deploy on the publishing refs.

    The job-level if checks only needs.build.result. The numba-cuda-mlir-gh-pages-publish group applies to the whole job. A run on a non-publishing ref therefore still takes a queue slot, even though every publish step is skipped. Push triggers in ci.yaml and tag pushes in publish.yaml already run only on publishing refs. A workflow_dispatch run of ci.yaml can select any branch, so it can reach this job from a non-publishing ref. With queue: max and cancel-in-progress: false, that no-op job can delay later publishers and the nightly cleanup.

    Add the publishing-ref condition to the job if:

    <details>
    <summary>Suggested fix</summary>
    <dl>
    <dd>
    <br>

    -    if: ${{ needs.build.result == 'success' }}
    +    if: ${{ needs.build.result == 'success' && (inputs.is-release || github.ref_name == 'main' || startsWith(github.ref_name, 'pull-request/')) }}
    

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

    <!-- suggestion_start -->

    <details>
    <summary>Committable suggestion</summary>
    <dl>
    <dd>
    <br>

    <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg" width="20" height="20" align="absmiddle" alt=""></picture> IMPORTANT

    Review the replacement and indentation, then test before committing.

        needs: build
        if: ${{ needs.build.result == 'success' && (inputs.is-release || github.ref_name == 'main' || startsWith(github.ref_name, 'pull-request/')) }}
    

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

    <!-- suggestion_end -->

    <!-- fingerprinting:phantom:medusa:beignet55 -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:e8172f0701f6727eaa5c9057 -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on Nov 17, 2026 15:54 UTC
    Reviewer

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

    Actionable comments posted: 1

    <details>
    <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off.svg" width="16" height="16" align="absmiddle" alt=""></picture> Additional comments: 1</summary><blockquote>
    <dl>
    <dd>
    <br>

    <details>
    <summary>.github/workflows/build-docs.yml-146-148: 1</summary><blockquote>
    <dl>
    <dd>
    <br>

    146-148: <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial · Maintainability & Code Quality · Low value

    <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg" width="20" height="20" align="absmiddle" alt=""></picture> Unverified finding
    Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

    suggestion: Group the three >> "$GITHUB_OUTPUT" redirects into one block.

    Problem: the actionlint hint SC2129 flags these lines. The same file already writes GITHUB_ENV with one { ...; } >> "$GITHUB_ENV" block at lines 79-83. Using the same form here keeps the file uniform and clears the lint finding.

    Smallest fix: wrap the three echo commands in { ...; } >> "$GITHUB_OUTPUT".

    Overall verdict: needs-small-fixes. The one open question is the checkout depth in the cleanup workflow. queue: max is a valid concurrency key on GitHub.com, so the actionlint queue error is a false positive.

    <!-- cr-comment:v1:f3ec7e42b91308861f454f77 -->

    _Sources: Path instructions, Linters/SAST tools_

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

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

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

    <details>
    <summary><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</summary>
    <dl>
    <dd>
    <br>

  • Source mode: Auto

  • Repository: [NVIDIA/numba-cuda-mlir](<https://github.com/NVIDIA/numba-cuda-mlir>)

  • Branch: [main](<https://github.com/NVIDIA/numba-cuda-mlir/tree/main>)

  • File: [.coderabbit.yaml](<https://github.com/NVIDIA/numba-cuda-mlir/blob/f77f83017b381a9000357e4b24bd907e7f737c12/.coderabbit.yaml>)

  • Commit: [f77f830](<https://github.com/NVIDIA/numba-cuda-mlir/commit/f77f83017b381a9000357e4b24bd907e7f737c12>)

  • Layers: Repository YAML

  • Review profile: CHILL

  • Plan: Enterprise

  • Run ID: ca1e4c0f-7152-4599-8ceb-7c150ec042c3
  • </dd>
    </dl>
    </details>

    <details>
    <summary><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</summary>
    <dl>
    <dd>
    <br>

    Reviewing files that changed from the base of the PR and between f77f83017b381a9000357e4b24bd907e7f737c12 and dc9bd1500a491c9a40e8f472f79a20a2172fe1ee.

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

    <details>
    <summary><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: 5</summary>
    <dl>
    <dd>
    <br>

    .github/actions/doc_preview/action.yml
    .github/actions/get_pr_number/action.yml
    .github/workflows/build-docs.yml
    .github/workflows/cleanup-pr-previews.yml

  • ci/cleanup-pr-previews
  • </dd>
    </dl>
    </details>

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

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

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    <!-- coderabbit-review-publication v1 publication=8e6ded77-3a6d-469b-84ca-c8f886a9859d attempt=5184e253-aca2-43c5-b56e-d55c733f87fd batch=1/1 -->

    jpascucci-nv jpascucci-nv commented on code on Nov 17, 2026 15:56 UTC
    Code Review
    ci/cleanup-pr-previews:1
    @@ -98,6 +113,31 @@ fi
     
     echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
     
    +update_preview_comment() {
    +    local pr_number="$1"
    +    local status_message="$2"
    +    local comment_body
    +    local comment_id
    +
    +    printf -v comment_body 'Doc Preview CI\n:---:\n%s\n<!-- Sticky Pull Request Commentpr-preview -->' "$status_message"
    +    if ! comment_id=$(gh api --paginate repos/"${REPOSITORY}"/issues/"${pr_number}"/comments \
    +        --header "Accept: application/vnd.github+json" \
    +        --jq '.[] | select(.body | contains("<!-- Sticky Pull Request Commentpr-preview -->")) | .id' \
    +        | tail -n 1); then

    [P2] Filter preview comments by bot author

    The marker-only query followed by tail -n 1 can select a contributor's comment quoting the raw preview message. A mocked reproduction with bot comment 101 followed by contributor comment 202 makes the helper PATCH comment 202, leaving the real preview comment unchanged. Match the expected bot author as well as the marker, consistent with the sticky-comment action's lookup.
    replace the jq line with:
    --jq '.[] | select(.user.login == "github-actions[bot]" and (.body | contains("<!-- Sticky Pull Request Commentpr-preview -->"))) | .id' \

    leofang leofang commented on code on Nov 17, 2026 15:59 UTC
    Code Review
    .github/workflows/build-docs.yml:1
    @@ -149,20 +154,54 @@ jobs:
               path: docs/build/html/
               retention-days: 7
     
    -      - name: Deploy or clean up doc preview
    -        if: ${{ !inputs.is-release }}
    +      - name: Upload docs deployment payload
    +        uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9  # v7.0.2
    +        with:
    +          name: ${{ steps.deployment-metadata.outputs.deployment-artifact-name }}
    +          path: docs/build/html/
    +          retention-days: 3
    +          include-hidden-files: true
    +          if-no-files-found: error
    +
    +  deploy:
    +    name: Deploy docs
    +    # GitHub discards prerequisite artifacts on a new run attempt. If only this
    +    # job fails, use "Re-run all jobs" so the build recreates its payload.
    +    needs: build
    +    if: ${{ needs.build.result == 'success' }}

    Keeping this identical to cuda-python's build-docs.yml, which has the same gate. The only cost is a no-op deploy job holding the lock for about a minute when someone manually runs CI on a branch that isn't main or pull-request/*.

    -- Leo's bot

    leofang leofang commented on code on Nov 17, 2026 16:00 UTC
    Code Review
    ci/cleanup-pr-previews:1
    @@ -98,6 +113,31 @@ fi
     
     echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
     
    +update_preview_comment() {
    +    local pr_number="$1"
    +    local status_message="$2"
    +    local comment_body
    +    local comment_id
    +
    +    printf -v comment_body 'Doc Preview CI\n:---:\n%s\n<!-- Sticky Pull Request Commentpr-preview -->' "$status_message"
    +    if ! comment_id=$(gh api --paginate repos/"${REPOSITORY}"/issues/"${pr_number}"/comments \
    +        --header "Accept: application/vnd.github+json" \
    +        --jq '.[] | select(.body | contains("<!-- Sticky Pull Request Commentpr-preview -->")) | .id' \
    +        | tail -n 1); then

    Thanks, @jpascucci-nv, would you mind raising a PR to cuda-python too?

    github-actions[bot] github-actions[bot] commented on Nov 17, 2026 16:01 UTC
    Bot

    Doc Preview CI
    :---:
    Preview removed because the pull request was closed or merged.
    <!-- Sticky Pull Request Commentpr-preview -->

    jpascucci-nv jpascucci-nv commented on code on Nov 17, 2026 16:22 UTC
    Code Review
    ci/cleanup-pr-previews:1
    @@ -98,6 +113,31 @@ fi
     
     echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
     
    +update_preview_comment() {
    +    local pr_number="$1"
    +    local status_message="$2"
    +    local comment_body
    +    local comment_id
    +
    +    printf -v comment_body 'Doc Preview CI\n:---:\n%s\n<!-- Sticky Pull Request Commentpr-preview -->' "$status_message"
    +    if ! comment_id=$(gh api --paginate repos/"${REPOSITORY}"/issues/"${pr_number}"/comments \
    +        --header "Accept: application/vnd.github+json" \
    +        --jq '.[] | select(.body | contains("<!-- Sticky Pull Request Commentpr-preview -->")) | .id' \
    +        | tail -n 1); then
    jpascucci-nv jpascucci-nv commented on code on Nov 17, 2026 16:36 UTC
    Code Review
    ci/cleanup-pr-previews:1
    @@ -98,6 +113,31 @@ fi
     
     echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
     
    +update_preview_comment() {
    +    local pr_number="$1"
    +    local status_message="$2"
    +    local comment_body
    +    local comment_id
    +
    +    printf -v comment_body 'Doc Preview CI\n:---:\n%s\n<!-- Sticky Pull Request Commentpr-preview -->' "$status_message"
    +    if ! comment_id=$(gh api --paginate repos/"${REPOSITORY}"/issues/"${pr_number}"/comments \
    +        --header "Accept: application/vnd.github+json" \
    +        --jq '.[] | select(.body | contains("<!-- Sticky Pull Request Commentpr-preview -->")) | .id' \
    +        | tail -n 1); then

    @leofang FYI, that --jq line got corrupted in the copy-paste. It's fine until the contains() section, but use the original string for contains argument and after.

    jpascucci-nv jpascucci-nv approved these changes on Nov 17, 2026 16:45 UTC
    Approved Reviewer

    Approved these changes.

    leofang leofang commented on code on Nov 17, 2026 16:47 UTC
    Code Review
    ci/cleanup-pr-previews:1
    @@ -98,6 +113,31 @@ fi
     
     echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
     
    +update_preview_comment() {
    +    local pr_number="$1"
    +    local status_message="$2"
    +    local comment_body
    +    local comment_id
    +
    +    printf -v comment_body 'Doc Preview CI\n:---:\n%s\n<!-- Sticky Pull Request Commentpr-preview -->' "$status_message"
    +    if ! comment_id=$(gh api --paginate repos/"${REPOSITORY}"/issues/"${pr_number}"/comments \
    +        --header "Accept: application/vnd.github+json" \
    +        --jq '.[] | select(.body | contains("<!-- Sticky Pull Request Commentpr-preview -->")) | .id' \
    +        | tail -n 1); then

    Applied in commit db185dd

    leofang leofang commented on Nov 17, 2026 16:48 UTC
    Author

    /ok to test db185dd3

    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 17, 2026 16:48 UTC
    Bot

    /ok to test db185dd3

    @leofang, there was an error processing your request: E2

    See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

    leofang leofang commented on Nov 17, 2026 16:49 UTC
    Author

    /ok to test db185dd42c65158f5ee60945f55686aeeaabc277

    Reviewers
    Assignees
    leofang leofang
    Labels
    risk: low confidence: 88.4% reviewed sensitive_module
    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: 65.4% (HIGH) · Higher = larger blast radius
    65.4%
    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: 88.4% · Lower = rushed or shallow review
    88.4%
    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: 7.6% · Safe to merge
    7.6%