From 2691bfa1b90ade6ff3bef9df58ebadef23be2466 Mon Sep 17 00:00:00 2001 From: Jason Pascucci Date: Thu, 22 Oct 2026 10:48:18 -0700 Subject: [PATCH 1/5] Update CONTRIBUTING.md to include instructions about coderabbit closes #2137 Added the text from CCCL's coderabbit.rst to our CONTRIBUTING.md --- CONTRIBUTING.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dbb93955aa0..b0ebf3d951a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,10 @@ Thank you for your interest in contributing to CUDA Python! Based on the type of - [Enabling git symlinks](#enabling-git-symlinks) - [Type stubs for cuda.core](#type-stubs-for-cudacore) - [Pre-commit](#pre-commit) + - [CodeRabbit](#coderabbit) + - [Configuration](#configuration) + - [Pull Request Reviews](#pull-request-reviews) + - [Review Guidance](#review-guidance) - [Pixi lockfiles](#pixi-lockfiles) - [Signing Your Work](#signing-your-work) - [Code signing](#code-signing) @@ -235,6 +239,69 @@ between commits, leaving stale headers or out-of-date stubs in the history. If the hook isn't installed, `pre-commit run` will print a visible warning reminding you to run `pre-commit install`. +## CodeRabbit + +This page explains how to configure and use CodeRabbit for CUDA Python pull +request review. For the complete product documentation, see the +[CodeRabbit documentation](https://docs.coderabbit.ai/). + +### Configuration + +CUDA Python configures CodeRabbit through `.coderabbit.yaml` in the repository +root. The configuration in the pull request branch is used for that review. + +When setting up or updating CodeRabbit: + +1. Keep repository-specific settings in `.coderabbit.yaml`. +2. Use `@coderabbitai configuration` on a pull request to inspect the resolved + configuration. This is useful when checking whether CodeRabbit is using the + expected repository settings for that pull request. +3. Use `@coderabbitai generate configuration` to export the resolved + configuration if a new baseline is needed. This is useful when moving + settings into a reviewable repository configuration file. +4. Keep configuration changes small and reviewable. +5. Use `reviews.path_instructions` for path-specific review guidance. +6. Use `knowledge_base.code_guidelines.filePatterns` for CUDA Python guidance + files that CodeRabbit should read as review context. + +The CUDA Python configuration should keep comments focused on correctness, API +stability, performance, security, and other high-impact issues. Avoid enabling +features that add noisy generated comments or code by default. + +### Pull Request Reviews + +Automatic reviews may be disabled or restricted by the repository +configuration. Maintainers can always request review explicitly from a pull +request comment: + +```text +@coderabbitai review +``` + +Use a full review when the pull request should be reviewed again from scratch: + +```text +@coderabbitai full review +``` + +Other useful commands: + +- `@coderabbitai help` shows the current command reference. +- `@coderabbitai configuration` shows the active configuration. +- `@coderabbitai summary` can be placed in the pull request description as a + placeholder for the generated summary. +- `@coderabbitai pause` and `@coderabbitai resume` pause or resume automatic + review behavior. This is useful when a pull request is still being updated + frequently and should not be reviewed again until it is ready. +- `@coderabbitai ignore` can be placed in the pull request description to + disable automatic reviews. + +### Review Guidance + +Treat CodeRabbit feedback as review assistance, not as a merge requirement by +itself. Maintainers remain responsible for deciding whether comments are +actionable and whether a pull request has adequate tests and CI coverage. + ## Pixi lockfiles The repository checks in a `pixi.lock` next to each `pixi.toml`. Those lockfiles From 8ee9fcea75a7b828582a07234bc56261b8bacf2e Mon Sep 17 00:00:00 2001 From: Jason Pascucci Date: Thu, 22 Oct 2026 12:12:54 -0700 Subject: [PATCH 2/5] Correct information about forks. --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0ebf3d951a..07938dd2366 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -249,6 +249,9 @@ request review. For the complete product documentation, see the CUDA Python configures CodeRabbit through `.coderabbit.yaml` in the repository root. The configuration in the pull request branch is used for that review. +Pull requests from forks are an exception: they use the target branch's +configuration, so changes to `.coderabbit.yaml` in a fork do not affect that +review. When setting up or updating CodeRabbit: From d84fbd7b743df2baedc951d477e13ac81e46b2ab Mon Sep 17 00:00:00 2001 From: Jason Pascucci Date: Mon, 26 Oct 2026 09:12:34 -0700 Subject: [PATCH 3/5] Update contributing and move configuring section to its own file --- .github/CODERABBIT.md | 34 ++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 41 +++++++---------------------------------- 2 files changed, 41 insertions(+), 34 deletions(-) create mode 100644 .github/CODERABBIT.md diff --git a/.github/CODERABBIT.md b/.github/CODERABBIT.md new file mode 100644 index 00000000000..9b0cac2b5fc --- /dev/null +++ b/.github/CODERABBIT.md @@ -0,0 +1,34 @@ + + + +# CodeRabbit Configuration + +This document explains how CodeRabbit is configured for CUDA Python. For review +commands and guidance, see the +[CodeRabbit section of the contributing guide](../CONTRIBUTING.md#coderabbit). +For complete product documentation, see the +[CodeRabbit documentation](https://docs.coderabbit.ai/). + +CUDA Python configures CodeRabbit through [`.coderabbit.yaml`](../.coderabbit.yaml) +in the repository root. The configuration in the pull request branch is used +for that review. Pull requests from forks are an exception: they use the target +branch's configuration, so changes to `.coderabbit.yaml` in a fork do not affect +that review. + +When setting up or updating CodeRabbit: + +1. Keep repository-specific settings in `.coderabbit.yaml`. +2. Use `@coderabbitai configuration` on a pull request to inspect the resolved + configuration. This is useful when checking whether CodeRabbit is using the + expected repository settings for that pull request. +3. Use `@coderabbitai generate configuration` to export the resolved + configuration if a new baseline is needed. This is useful when moving + settings into a reviewable repository configuration file. +4. Keep configuration changes small and reviewable. +5. Use `reviews.path_instructions` for path-specific review guidance. +6. Use `knowledge_base.code_guidelines.filePatterns` for CUDA Python guidance + files that CodeRabbit should read as review context. + +The CUDA Python configuration should keep comments focused on correctness, API +stability, performance, security, and other high-impact issues. Avoid enabling +features that add noisy generated comments or code by default. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 07938dd2366..7fc9ede8b50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,9 +29,8 @@ Thank you for your interest in contributing to CUDA Python! Based on the type of - [Type stubs for cuda.core](#type-stubs-for-cudacore) - [Pre-commit](#pre-commit) - [CodeRabbit](#coderabbit) - - [Configuration](#configuration) - - [Pull Request Reviews](#pull-request-reviews) - [Review Guidance](#review-guidance) + - [Pull Request Reviews](#pull-request-reviews) - [Pixi lockfiles](#pixi-lockfiles) - [Signing Your Work](#signing-your-work) - [Code signing](#code-signing) @@ -241,35 +240,15 @@ reminding you to run `pre-commit install`. ## CodeRabbit -This page explains how to configure and use CodeRabbit for CUDA Python pull -request review. For the complete product documentation, see the +This section explains how to use CodeRabbit for CUDA Python pull request review. +For complete product documentation, see the [CodeRabbit documentation](https://docs.coderabbit.ai/). -### Configuration - -CUDA Python configures CodeRabbit through `.coderabbit.yaml` in the repository -root. The configuration in the pull request branch is used for that review. -Pull requests from forks are an exception: they use the target branch's -configuration, so changes to `.coderabbit.yaml` in a fork do not affect that -review. - -When setting up or updating CodeRabbit: - -1. Keep repository-specific settings in `.coderabbit.yaml`. -2. Use `@coderabbitai configuration` on a pull request to inspect the resolved - configuration. This is useful when checking whether CodeRabbit is using the - expected repository settings for that pull request. -3. Use `@coderabbitai generate configuration` to export the resolved - configuration if a new baseline is needed. This is useful when moving - settings into a reviewable repository configuration file. -4. Keep configuration changes small and reviewable. -5. Use `reviews.path_instructions` for path-specific review guidance. -6. Use `knowledge_base.code_guidelines.filePatterns` for CUDA Python guidance - files that CodeRabbit should read as review context. +### Review Guidance -The CUDA Python configuration should keep comments focused on correctness, API -stability, performance, security, and other high-impact issues. Avoid enabling -features that add noisy generated comments or code by default. +We treat CodeRabbit feedback as review assistance, not as a merge requirement by +itself. Maintainers remain responsible for deciding whether comments are +actionable and whether a pull request has adequate tests and CI coverage. ### Pull Request Reviews @@ -299,12 +278,6 @@ Other useful commands: - `@coderabbitai ignore` can be placed in the pull request description to disable automatic reviews. -### Review Guidance - -Treat CodeRabbit feedback as review assistance, not as a merge requirement by -itself. Maintainers remain responsible for deciding whether comments are -actionable and whether a pull request has adequate tests and CI coverage. - ## Pixi lockfiles The repository checks in a `pixi.lock` next to each `pixi.toml`. Those lockfiles From f72a09e1be52267a57e90193a2ef08347098c296 Mon Sep 17 00:00:00 2001 From: Jason Pascucci Date: Mon, 26 Oct 2026 09:43:39 -0700 Subject: [PATCH 4/5] Coderabbit suggestions --- .github/CODERABBIT.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/CODERABBIT.md b/.github/CODERABBIT.md index 9b0cac2b5fc..efde13c8dd8 100644 --- a/.github/CODERABBIT.md +++ b/.github/CODERABBIT.md @@ -11,9 +11,7 @@ For complete product documentation, see the CUDA Python configures CodeRabbit through [`.coderabbit.yaml`](../.coderabbit.yaml) in the repository root. The configuration in the pull request branch is used -for that review. Pull requests from forks are an exception: they use the target -branch's configuration, so changes to `.coderabbit.yaml` in a fork do not affect -that review. +for that review. When setting up or updating CodeRabbit: From 2fd84a6a482ea1c250f4f3c7af2b622a33264082 Mon Sep 17 00:00:00 2001 From: Jason Pascucci Date: Mon, 26 Oct 2026 10:38:25 -0700 Subject: [PATCH 5/5] APply ralf's suggestions --- .github/CODERABBIT.md | 6 ++++-- CONTRIBUTING.md | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/CODERABBIT.md b/.github/CODERABBIT.md index efde13c8dd8..0798042361b 100644 --- a/.github/CODERABBIT.md +++ b/.github/CODERABBIT.md @@ -10,8 +10,10 @@ For complete product documentation, see the [CodeRabbit documentation](https://docs.coderabbit.ai/). CUDA Python configures CodeRabbit through [`.coderabbit.yaml`](../.coderabbit.yaml) -in the repository root. The configuration in the pull request branch is used -for that review. +in the repository root. For pull requests from a branch in the same repository, +the configuration in that branch is used for the review. Pull requests from +forks use the target branch's configuration instead, so changes to +`.coderabbit.yaml` in a fork do not affect that review. When setting up or updating CodeRabbit: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7fc9ede8b50..110c9a09908 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -253,8 +253,8 @@ actionable and whether a pull request has adequate tests and CI coverage. ### Pull Request Reviews Automatic reviews may be disabled or restricted by the repository -configuration. Maintainers can always request review explicitly from a pull -request comment: +configuration. PR authors and maintainers can request a review explicitly by +posting a comment on the pull request: ```text @coderabbitai review