forked from NVIDIA/nvcf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
112 lines (112 loc) · 5.35 KB
/
Copy path.coderabbit.yaml
File metadata and controls
112 lines (112 loc) · 5.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# CodeRabbit configuration for NVIDIA/nvcf.
# Docs: https://docs.coderabbit.ai/reference/configuration
language: en-US
early_access: false
reviews:
# "chill" keeps the reviewer focused on substantive issues over nits.
profile: chill
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
auto_review:
enabled: true
drafts: false
base_branches:
- main
# Pre-merge checks consolidate PR-metadata policy into CodeRabbit's single
# status, replacing the standalone pr-title-check and pr-issue-check GitHub
# Actions. Warning mode: they nudge the author, they do not block the merge
# queue (raise to "error" to gate). The title check does both the Conventional
# Commit format and the semantic "type matches the change" judgment a regex
# cannot make.
pre_merge_checks:
title:
mode: warning
requirements: >-
The title must follow Conventional Commits v1.0.0, grammar
`type[(scope)][!]: subject`, with exactly one type prefix (never a
compound like "type1+type2(scope):"). The scope and the breaking-change
`!` are optional, EXCEPT that the customer-impact types feat, fix, and
perf require a scope; docs, build, test, refactor, ci, chore, style, and
revert may omit it. Ignore a leading Draft:/[Draft]/[draft]:/WIP marker
when validating. Beyond format, the <type> must accurately reflect the
primary nature of the diff, not merely be a valid type. Flag mismatches:
a docs-only change (only *.md or
docs/**) titled chore or fix should be docs; a CI/workflow-only change
(.github/**, .gitlab-ci.yml, tools/ci/**) titled chore should be ci; and
especially a bug fix or feature mislabeled as chore/docs/refactor, which
would wrongly hide a customer-facing change from the release notes (feat,
fix, and perf appear in release notes; docs, chore, ci, build, test,
refactor, style do not). Do not flag PRs that legitimately span multiple
types where the chosen type reflects the most significant change. See
AGENTS.md commit conventions.
issue_assessment:
mode: warning
# Skip generated, vendored, and binary-ish files so review focuses on
# human-authored source.
path_filters:
- "!**/vendor/**"
- "!**/testdata/**"
- "!**/*.pb.go"
- "!**/zz_generated.*"
- "!**/*_generated.go"
- "!**/MODULE.bazel.lock"
- "!**/*.tgz"
- "!**/*.png"
- "!**/*.jpg"
- "!**/pnpm-lock.yaml"
- "!tools/ci/generated-release-jobs.yml"
path_instructions:
- path: "src/**/*.go"
instructions: >-
Check Go error wrapping (%w), structured logging with required context
fields (request/function/cluster/org id), and that request-handling
changes add logs, tracing, and RED metrics per AGENTS.md.
- path: "src/**/*.rs"
instructions: >-
Check error handling, tracing spans on cross-service calls, and that
no secrets or full request bodies are logged.
- path: "**/*.sql"
instructions: >-
Cassandra DDL migrations are forward-only and one keyspace per
subdirectory. Flag destructive statements and missing IF NOT EXISTS.
- path: "src/uis/nvcf-ui/ui/src/features/**/*.tsx"
instructions: >-
Suspense hook variants (useGetFooSuspense) are expected when data is prefetched in
a route loader; regular useQuery is fine for secondary or deferred fetches.
Route loaders use ensureQueryData with revalidateIfStale: true for blocking data.
void prefetchQuery is intentional for fire-and-forget child-route cache warming.
No manual fetch calls for endpoints that have generated hooks in ui/src/generated/.
Prefer KUI components from @nvidia/foundations-react-core over plain HTML where a
natural fit exists — flag clear misses but use judgment.
New components should have co-located tests.
- path: "src/uis/nvcf-ui/ui/src/**/*.test.tsx"
instructions: >-
Route-level views must use renderWithRouter from ~/testing/render, not standard render.
Tests should cover happy path, error state, and empty state — not just the happy path.
Prefer accessible queries (getByRole, getByText) over test IDs.
- path: "src/uis/nvcf-ui/ui/src/generated/**"
instructions: >-
This is generated code (from control-plane-openapi.yaml / nvcf-openapi.yaml / sis-openapi.yaml).
Do NOT comment on code style, naming, or general best practices — Biome enforces formatting via CI.
ONLY flag spec-consistency issues: generated code that doesn't match the current spec
(e.g., missing or renamed fields, changed types, endpoints absent from codegen output),
OR generated files that appear to have been manually edited without a corresponding spec change.
- path: "src/uis/nvcf-ui/spec/*.yaml"
instructions: >-
These are the source of truth for the API. Generated output lives in
ui/src/generated/ and must never be edited directly. Flag any PR that touches
ui/src/generated/ without a corresponding spec change that justifies it.
tools:
shellcheck:
enabled: true
yamllint:
enabled: true
golangci-lint:
enabled: true
biome:
enabled: true
chat:
auto_reply: true