Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
language: en-US
early_access: false
enable_free_tier: false
reviews:
profile: chill
request_changes_workflow: false
high_level_summary: true
poem: false
in_progress_fortune: false
review_status: true
collapse_walkthrough: false
path_filters:
- "!**/vendor/**"
- "!vendor/**"
- "!**/zz_generated*"
- "!boilerplate/**"
auto_review:
enabled: true
drafts: true
pre_merge_checks:
custom_checks:
- name: "Stable and Deterministic Test Names"
mode: error
instructions: |
Ginkgo test names MUST be stable and deterministic. They must never contain dynamic
information that changes between runs.

Flag any test title (It(), Describe(), Context(), When(), etc.) that includes:
- Pod names with generated suffixes (e.g., "test-pod-abc123")
- Timestamps or dates
- Random UUIDs or generated identifiers
- Node names
- Namespace names with random suffixes
- IP addresses
- Any value that could change between test runs

Do not apply subjective style judgments (for example, "overly specific").
Only flag deterministic violations of the dynamic-data rules above.

Test names should use descriptive, static strings that clearly indicate what
the test validates.

❌ Bad examples:
- `It("should create pod test-pod-xyz123 with custom security context")`
- `It(fmt.Sprintf("should run on node %s", nodeName))`
- `It("should create namespace " + ns.Name)`
- `It(fmt.Sprintf("should complete initialization within %s", timeout))`

✅ Good examples:
- `It("should create a pod with custom security context")`
- `It("should schedule workloads to labeled nodes")`
- `It("should enforce network policy between namespaces")`
- `It("should complete initialization within 30s")`

Dynamic values belong in test BODIES (assertions, setup), never in test TITLES.

- name: "Test Structure and Quality"
mode: warning
instructions: |
Review Ginkgo test code for these quality requirements:

1. **Single responsibility**: Each test (It block) should test one specific behavior.
Flag tests that assert multiple unrelated behaviors.

2. **Setup and cleanup**: Tests should use BeforeEach/AfterEach for setup and cleanup.
Flag tests that create resources without cleanup, especially cluster-scoped resources.

3. **Timeouts**: Operations that interact with the cluster (pod creation, deployments,
waiting for conditions) must include appropriate timeouts. Flag indefinite waits
or missing timeouts on Eventually/Consistently calls.

4. **Assertion messages**: Assertions should include meaningful failure messages
that help diagnose what went wrong.
❌ `Expect(err).NotTo(HaveOccurred())`
✅ `Expect(err).NotTo(HaveOccurred(), "failed to create test pod")`

5. **Consistency with codebase**: Tests should follow existing patterns in the
repository for how fixtures are created, how clients are obtained, and how
waits are structured.
chat:
auto_reply: true
art: false
Loading