Skip to content

chore: add coderabbit configuration and coding guidelines for coderabbit#1145

Merged
chtruong814 merged 3 commits intomainfrom
tk/coderabbit
Sep 18, 2025
Merged

chore: add coderabbit configuration and coding guidelines for coderabbit#1145
chtruong814 merged 3 commits intomainfrom
tk/coderabbit

Conversation

@terrykong
Copy link
Collaborator

@terrykong terrykong commented Sep 17, 2025

Adds a coderabbit configuration and some basic rules for coderabbit to make review more relevant to our repo. In the future it can pick up the project wide cursor rules.

One notable review change is it will do a pre merge check and check if the change warrants the author posting a summary of the perf change or if they shared convergence results if the change is substantial or will affect either of those two categories.

This is based on TRTLLM's coderabbit configuration: https://github.com/NVIDIA/TensorRT-LLM/blob/e3117731b3a86251ab28f45c36f48db6edba2e29/.coderabbit.yaml

Summary by CodeRabbit

  • Documentation

    • Added comprehensive CODING_GUIDELINES covering style, naming, docstrings, error handling, headers, testing, and project conventions.
  • Chores

    • Introduced CodeRabbit configuration files to standardize automated reviews, summaries, titles, and pre-merge checks.
    • Configured auto-review behavior, labeling/reviewer suggestions, and basic chat/integration settings.
    • Enabled knowledge-base usage for guidelines and issues to improve review context.
    • Established defaults for automated tooling and checks to improve consistency and quality across pull requests.

@github-actions
Copy link

ℹ️ File Consistency Check

Check based on commit: ba5a5b3 (PR #1145 from tk/coderabbit)

This is a test comment


This check ensures that related file implementations remain synchronized across the codebase. If you believe this warning is incorrect or the files should intentionally differ, please add a comment explaining the reasoning.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

📝 Walkthrough

Walkthrough

Adds two CodeRabbit configuration files defining review workflows, tooling, pre-merge checks, and knowledge-base settings, plus a new CODING_GUIDELINES.md outlining coding, documentation, testing, and licensing conventions.

Changes

Cohort / File(s) Summary
CodeRabbit configs
./.coderabbit-current.yaml, ./.coderabbit.yaml
Introduces comprehensive default config and a project-specific config for CodeRabbit: language, review workflow toggles, auto-review settings, pre-merge checks (including a custom check), tools enablement, chat/integrations, knowledge base, and code generation settings.
Documentation guidelines
./CODING_GUIDELINES.md
Adds detailed coding, documentation, testing, and copyright header guidelines specific to the project, including naming conventions, docstring style, error handling, and test/recipe structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately reflects the primary changes in the PR—adding CodeRabbit configuration and coding guidelines—and is concise and relevant to the changeset, so it effectively signals the main intent to reviewers. It is slightly redundant in phrasing ("for coderabbit" repeated) but remains on-topic and clear.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Test Results For Major Changes ✅ Passed Based on the provided summaries, this PR only adds CodeRabbit configuration files (.coderabbit.yaml and .coderabbit-current.yaml) and a CODING_GUIDELINES.md document, with no runtime code, numerics, or performance-affecting changes. The PR description contains a checklist but no concrete test results; however, since these changes are documentation/configuration-only and do not alter execution behavior, they qualify as minor. Therefore, the requirement to include test results for major or performance-critical changes does not apply here.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tk/coderabbit

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
CODING_GUIDELINES.md (3)

13-15: Fix heading hierarchy to satisfy markdownlint (MD001).

Adjust h4→h3 and h5→h4 where appropriate.

-#### Use uv run instead of python
+### Use uv run instead of python

-#### Python Standard
+### Python Standard

-#### Indentation
+### Indentation

-#### Imports
+### Imports

-#### Naming
+### Naming

-##### Identifier Format
+#### Identifier Format

-##### Identifier Guidelines
+#### Identifier Guidelines

-#### Comments
+### Comments

-#### Docstring Syntax
+### Docstring Syntax

-##### Classes and Functions
+#### Classes and Functions

-#####  Attributes and Variables
+#### Attributes and Variables

-#### Avoid Reflection
+### Avoid Reflection

-#### Error Handling
+### Error Handling

-#### Ensure docs/index.md is up to date
+### Ensure docs/index.md is up to date

Also applies to: 33-41, 36-38, 39-41, 61-63, 63-83, 83-86, 87-92, 92-95, 93-96, 96-111, 111-113, 129-131, 175-181


96-109: Remove extra space in heading (MD019).

-#####  Attributes and Variables
+#### Attributes and Variables

221-224: Add languages to fenced code blocks (MD040).

Use "text" for patterns, filenames, and directory trees.

-```
+```text
 <algo>-<model>-<nodes>n<gpus>g-<strategy-and-params>[-modifiers][-long][.vN].(yaml|sh)

- +text
sft-llama3.1-8b-1n8g-fsdp2tp1-long.yaml
dpo-llama3.1-8b-instruct-4n8g-fsdp2tp4.yaml
grpo-llama3.1-8b-instruct-1n8g-megatron-fp8.yaml
grpo-qwen2.5-7b-instruct-4n8g-fsdp2tp4sp.v3.yaml


-```
+```text
vlm_<algo>-<model>-<nodes>n<gpus>g-<strategy>[-modifiers][.vN].(yaml|sh)

- +text
vlm_grpo-qwen2.5-vl-3b-instruct-clevr-1n2g-dtensor2tp1.v1.yaml
vlm_grpo-smolvlm2-2.2b-instruct-clevr-1n2g-dtensor2tp1.v1.sh


-```
+```text
examples/configs/recipes/
  llm/
    <name>.yaml
  vlm/
    <name>.yaml

tests/test_suites/
  llm/
    common.env
    <name>.sh
  vlm/
    common.env
    <name>.sh
  nightly.txt


Also applies to: 235-240, 244-247, 250-253, 261-276

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 5a9f7acc59ed70e6eb52dd065a55ec015c895204 and ba5a5b33f95133538dc8080ce67d028a97725259.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.coderabbit-current.yaml` (1 hunks)
* `.coderabbit.yaml` (1 hunks)
* `CODING_GUIDELINES.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>CODING_GUIDELINES.md</summary>

13-13: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

---

33-33: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

---

96-96: Multiple spaces after hash on atx style heading

(MD019, no-multiple-space-atx)

---

177-177: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

---

221-221: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

235-235: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

244-244: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

250-250: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

261-261: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>
<details>
<summary>🪛 YAMLlint (1.37.1)</summary>

<details>
<summary>.coderabbit-current.yaml</summary>

[error] 13-13: duplication of key "tone_instructions" in mapping

(key-duplicates)

---

[error] 14-14: duplication of key "early_access" in mapping

(key-duplicates)

---

[error] 15-15: duplication of key "enable_free_tier" in mapping

(key-duplicates)

---

[error] 376-376: syntax error: expected '<document start>', but found '<block mapping start>'

(syntax)

---

[error] 457-457: no new line character at the end of file

(new-line-at-end-of-file)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary>

* GitHub Check: Lint check
* GitHub Check: Post submodule check comment / Comment on PR

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>CODING_GUIDELINES.md (1)</summary><blockquote>

`84-86`: **Typo: “memberes” → “members”.**
[raise_nitpick_refactor]

```diff
-2. Initialize all externally visible memberes of a class in the constructor.
+2. Initialize all externally visible members of a class in the constructor.
.coderabbit.yaml (2)

22-62: Config looks consistent with schema; KB guidelines integration is correctly wired.


35-41: Confirm intent for disabled commit/review status and poem.

  • commit_status: false and review_status: false will suppress CodeRabbit status checks/comments.
  • poem: false disables the walkthrough poem.

Would you like these on or off for this repo?

Also applies to: 58-63, 36-39

.coderabbit-current.yaml (1)

457-457: Add newline at EOF (yamllint new-line-at-end-of-file).
[raise_nitpick_refactor]

@github-actions
Copy link

ℹ️ File Consistency Check

Check based on commit: 711bcd3 (PR #1145 from tk/coderabbit)

This is a test comment


This check ensures that related file implementations remain synchronized across the codebase. If you believe this warning is incorrect or the files should intentionally differ, please add a comment explaining the reasoning.

Signed-off-by: Terry Kong <terryk@nvidia.com>
@github-actions
Copy link

ℹ️ File Consistency Check

Check based on commit: b4934d9 (PR #1145 from tk/coderabbit)

This is a test comment


This check ensures that related file implementations remain synchronized across the codebase. If you believe this warning is incorrect or the files should intentionally differ, please add a comment explaining the reasoning.

@terrykong terrykong added this pull request to the merge queue Sep 17, 2025
@chtruong814 chtruong814 removed this pull request from the merge queue due to the queue being cleared Sep 18, 2025
@chtruong814 chtruong814 merged commit eef47b8 into main Sep 18, 2025
27 checks passed
@chtruong814 chtruong814 deleted the tk/coderabbit branch September 18, 2025 02:16
yfw pushed a commit that referenced this pull request Sep 23, 2025
…bit (#1145)

Signed-off-by: Terry Kong <terryk@nvidia.com>
PrinsYin pushed a commit to PrinsYin/RL that referenced this pull request Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants