Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
416 lines (383 loc) · 19.8 KB
/
Copy path.coderabbit.yaml
File metadata and controls
416 lines (383 loc) · 19.8 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Adapted and modified for AISim from AIConfigurator's .coderabbit.yaml:
# https://github.com/ai-dynamo/aiconfigurator/blob/13b5cf2697876692b0a52098266c81162add11fc/.coderabbit.yaml
# Upstream license: Apache-2.0
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# Active repository-level CodeRabbit policy. The copy under
# python/aisim/ is preserved migration provenance and is not active here.
language: "en-US"
tone_instructions: >-
Be direct, technical, and concise. Report only actionable findings tied to
behavior, contracts, evidence, or risk; skip praise, restatements, and style
nits. Suggest a patch only when the local fix is complete and safe.
early_access: false
reviews:
profile: "assertive"
request_changes_workflow: false
high_level_summary: true
high_level_summary_in_walkthrough: true
high_level_summary_instructions: |
Lead with "Risk: Low/Medium/High" and explain the review route in REVIEW.md.
Align Risk with CodeRabbit's documented Triage concept: review evidence
combined with review effort. Identify the source: a verified current Triage
assessment, or an explicitly labeled review-routing estimate if unavailable.
Never claim an estimate is the native Triage score or invent vendor cutoffs.
Assess the complete PR independently of the author's label; unresolved
uncertainty must not default to Low. Keep Risk separate from Merge Risk.
Name up to three areas needing attention; do not invent concerns to fill
a quota. Identify changed behavior, public contracts, and the reviewed SHA.
Distinguish verified evidence, author-reported results, pending checks,
and unavailable evidence. Use accessible current-head checks and linked
runs before saying CI evidence is missing; older-head evidence is stale.
Full CI normally follows initial reviews in this repository: report it as
pending admission when appropriate, never as passed or as a code defect
solely because it has not run. Reconcile inline findings and pre-merge
warnings; "no inline findings" must not hide a failing custom check.
Show the required next action. Low Risk needs CodeRabbit; Medium also needs
current-head Codex; High also needs human approval even if Merge Risk is Low.
Apply REVIEW.md's combined-review severity floors and repair loop. For High
or Critical remaining risk, require a human update before agent fixes.
Report a Full CI failure as revoking automatic approval and requiring fresh
bot reviews before reapproval; never claim a controller performed an action
without evidence. Keep technical risk, CI state, and approval separate.
merge_risk_instructions: |
Use CodeRabbit's documented Minimal/Low/Moderate/High/Critical meanings for
remaining risk in the whole PR at the reviewed commit. Low/Medium/High Risk
selects reviewers; High Risk alone does not set a floor for Merge Risk.
Do not raise Merge Risk just because important code is touched or lower it
just because no inline comment was posted.
Account for still-applicable review findings, concrete pre-merge-check
failures, and uncovered changes. Trace an apparent failure to the current
code and explain its consequence; an outdated or inapplicable warning is
not an unresolved defect. Explain any disagreement between the rating and
the checks. Material unresolved correctness, numerical, compatibility,
security, or validation gaps preclude Minimal. Reserve High/Critical for
concrete evidence of the serious/severe failures in the vendor definitions.
Use available current-head CI evidence and distinguish a proven pass from
an author's claim. Missing Full CI before review-based admission, missing
CODEOWNER approval, and branch conflicts are separate readiness facts, not
automatically technical defects. A concrete gap in validation of changed
behavior still counts even when Full CI is pending. Never present a low
rating as Full CI success, human approval, or permission to merge.
Apply AISim's combined-review policy in REVIEW.md: an unresolved current-head
Codex P0 finding sets at least High (Critical for demonstrated severe impact);
P1 sets at least Moderate. These are repository escalation floors, not a
claim that the vendors' scales are identical. Neither permits approval.
Reconcile all applicable reviews using the highest supported remaining risk;
never lower a finding's priority to make the PR approvable. After fixes,
rerun required reviews; High Risk still requires human approval even
when remaining Merge Risk becomes Minimal/Low. After Full CI failure, older
reviews cannot restore automatic approval; fresh required bot reviews must
complete after that failure, including when the commit SHA did not change.
changed_files_summary: true
estimate_code_review_effort: true
assess_linked_issues: true
poem: false
in_progress_fortune: false
review_status: true
# Fail on review errors; skips and rate limits still need coverage verification.
fail_commit_status: true
review_details: true
review_progress: true
collapse_walkthrough: true
enable_prompt_for_ai_agents: true
auto_review:
# Review non-draft PRs automatically; no opt-in label is required.
enabled: true
drafts: false
auto_incremental_review: true
# Keep automatic reviews active through repeated fix/review iterations.
auto_pause_after_reviewed_commits: 0
base_branches:
- "release/.*"
ignore_title_keywords:
- "WIP"
- "[skip review]"
- "[no review]"
labels:
- "!wip"
- "!do-not-review"
# Keep current and future source directories eligible without an allowlist.
# CodeRabbit's default binary, generated-file, and lock-file ignores still apply.
# Data/compatibility changes skipped by those defaults need separate evidence.
path_filters: []
path_instructions:
- path: "**/*"
instructions: |
Read REVIEW.md before commenting. Trace each changed input through its
real consumer and output. Prioritize correctness, compatibility,
security, numerical behavior, failure handling, and missing tests.
Ignore formatting and naming preferences already enforced by tools.
Prefer one root-cause comment over repeated symptom comments. State the
concrete failure mode and the smallest adequate validation. Use a
GitHub Suggested Change only for a complete, local, unambiguous fix.
- path: "crates/core/src/perfmodel/**"
instructions: |
Enforce the single-oracle and golden-diff rules in
python/aisim/.claude/rules/rust-core/parity.md. Treat formulas,
table selection, interpolation, quantization, defaults, and fallback
ordering as numerical behavior. Require an explained before/after
golden diff or hand-derived oracle evidence for changed answers. Check
bincode enum ordering and synchronized schema-version changes.
- path: "crates/core/perfmodel/**"
instructions: |
Treat model and performance data as product behavior, not generated
noise. Verify provenance, units, keys, coverage, metadata, and consumer
reachability. Binary parquet changes need machine-readable summaries
and anomaly checks; a clean binary diff is not validation.
- path: "crates/core/parity_tests/perfmodel/**"
instructions: |
Golden changes must be narrow, reproducible, and explained numerically.
Flag bulk refreshes that hide unrelated drift or lack a modeling
rationale. New behavior needs an independent oracle or justified
append-only parity case.
- path: "python/aisim/src/aisim_core/**"
instructions: |
Preserve the Rust single oracle: Python may describe operations, load
raw data, orchestrate, and present results, but must not compute per-op
performance values. Check Python/Rust schema and public import parity,
explicit absence behavior, and loud handling of corrupt or unsupported
inputs. Do not reintroduce public per-call query shims.
- path: "python/aisim/src/aisim/generator/**"
instructions: |
Enforce the mapped generator guidelines. Trace input parsing, defaults,
rules, parameter mapping, rendering, and emitted artifacts. Preserve
Guard and Why annotations in templates and rule files. Check TRT-LLM,
vLLM, and SGLang consistency plus CLI, validator, docs, and tests when a
user-facing parameter or supported backend version changes.
- path: "python/aisim/tools/generator_validator/**"
instructions: |
Verify the validator checks emitted behavior across applicable backends
and versions rather than command success alone. New flags, templates,
or defaults need corresponding output assertions.
- path: "python/aisim/collector/**"
instructions: |
Enforce the mapped collector guidelines (start from overview.md). Each
op has one plan for every backend (collector/op_plans.py), and its
getters are the one-line plan_cases call. A queued case must execute
or raise. Only collector/skips.py entries, each with its reason as a
comment, leave cases out; finer boundaries run and fail. Capacity is
refused at run time, before allocation, with a FIXME(kernel-limit):
does not fit reason. A worker guard is legal only for a case that would
mismeasure, hang or waste significant time. Reject invented geometry
or kernel fallbacks, environment switches that change rows, deviations
without a note at the deviating code, untraceable results, and
undocumented producer to consumer schema changes. Verify runtime
versions, commands, GPU assumptions, and failure evidence.
- path: "crates/core/src/engine/**"
instructions: |
Review scheduler state transitions and event ordering, including cancel,
preempt, drain, retry, duplicate, empty, and terminal paths. Look for
time-unit mistakes, nondeterminism, queue starvation, accounting drift,
and Rust/Python binding mismatches. Require tests that pin transitions,
not only end-state success.
- path: "crates/core/src/replay/**"
instructions: |
Preserve deterministic Replay semantics and explicit validation. Check
schema changes across Rust, Python, CLI, and serialized fixtures. Flag
silent coercion, dropped events, order-dependent behavior, or claims of
predictive accuracy unsupported by production traces.
- path: "python/aisim/src/aisim/**"
instructions: |
Check unified CLI, Replay, Sweeper, and orchestration behavior together.
Preserve documented defaults, plain-output and non-TTY behavior, config
round trips, deterministic seeds, and clear failure messages. Trace new
public options through execution and tests.
- path: "**/pyproject.toml"
instructions: |
Treat these as public and release boundaries. Verify Python imports,
Rust exports, versions, feature flags, bindings, documentation, and the
two-artifact contract stay synchronized. AISim must remain
standalone and must not acquire a hard Dynamo runtime dependency.
- path: "**/Cargo.toml"
instructions: |
Treat these as public and release boundaries. Verify Python imports,
Rust exports, versions, feature flags, bindings, documentation, and the
two-artifact contract stay synchronized. AISim must remain
standalone and must not acquire a hard Dynamo runtime dependency.
- path: "crates/core/src/*.rs"
instructions: |
Treat top-level exports and bindings as public and release boundaries.
Verify Rust exports, Python bindings, feature flags, versions, docs, and
the two-artifact contract stay synchronized.
- path: "python/aisim/src/aisim/__init__.py"
instructions: |
Treat public imports as a compatibility and release boundary. Verify
exports, bindings, versions, docs, and deprecation behavior stay
synchronized.
- path: ".github/workflows/**"
instructions: |
Only root workflows are active. Check least-privilege permissions,
untrusted PR inputs, shell injection, secret exposure, fork behavior,
exact-head coverage, matrices, caches, artifacts, and release effects.
Never accept a nested migrated workflow as evidence that hosted CI ran.
- path: "scripts/ci/**"
instructions: |
Trace workflow callers and consumers, not only the helper's unit tests.
Check complete PR diffs, renames/deletions, exact-head and base identity,
trusted copies, pagination, retries, and missing or stale API evidence.
Validation and admission selectors must fail closed on unknown inputs;
optional cancellation monitors must leave validation running on API errors.
Preserve required check names, fork safety, and runner trust boundaries.
- path: "tests/**"
instructions: |
Require coverage of the changed behavior and its negative or boundary
cases. Flag mocks that bypass the changed consumer, assertions that only
prove construction, unexplained golden refreshes, and tests that confuse
parity with production accuracy.
- path: "docs/**"
instructions: |
Check commands, defaults, supported runtimes, public names, and claims
against executable behavior. Flag predictive-accuracy or compatibility
claims that exceed the supplied evidence.
- path: "README.md"
instructions: |
Check commands, defaults, supported runtimes, public names, and claims
against executable behavior. Flag predictive-accuracy or compatibility
claims that exceed the supplied evidence.
- path: "examples/**"
instructions: |
Check examples against executable public behavior. Flag stale imports,
options, defaults, outputs, or unsupported compatibility claims.
- path: "THIRD_PARTY_NOTICES.md"
instructions: |
Verify upstream provenance, license text, collection and overlay hashes,
local modification notices, and generated derivative records remain
complete and internally consistent.
- path: "python/aisim/collector/**/patches/**"
instructions: |
Verify upstream provenance, license text, collection and overlay hashes,
local modification notices, and generated derivative records remain
complete and internally consistent.
suggested_labels: false
suggested_reviewers: false
sequence_diagrams: false
related_issues: true
related_prs: true
finishing_touches:
docstrings:
enabled: false
unit_tests:
enabled: false
pre_merge_checks:
title:
mode: warning
requirements: >-
State the behavioral change precisely; avoid vague titles such as
update, cleanup, fixes, changes, or improvements.
description:
mode: warning
issue_assessment:
mode: warning
docstrings:
mode: off
override_requested_reviewers_only: true
custom_checks:
- name: "Cross-layer contract"
mode: warning
instructions: |
Pass when every changed public input, schema field, default, or output
is traced through all affected Rust, Python, CLI, serialization,
documentation, and test consumers. Fail when a layer is stale, a new
path is untested, or the PR asserts compatibility without evidence.
For external review configuration or instruction-only changes, use
published vendor-schema validation and matching policy, documentation,
and attribution evidence. Do not require simulator runtime tests or
tests that merely assert prompt wording. If necessary evidence is
inaccessible, return Inconclusive and identify the affected consumer
and missing evidence instead of assuming the path is untested.
- name: "Modeling and data evidence"
mode: warning
instructions: |
For formulas, selection logic, model/performance data, or predicted
outputs, pass only when the PR supplies provenance and reproducible
before/after evidence: an explained golden diff, independent oracle,
held-out comparison, or machine-readable data summary with anomaly
checks. Fail unexplained refreshes and binary-only validation.
- name: "Compatibility boundaries"
mode: warning
instructions: |
Pass when Python and Rust public surfaces, schemas, versions, bindings,
and documented defaults remain synchronized; AISim stays
standalone from Dynamo; and the one-wheel plus one-crate artifact
contract remains intact or is deliberately updated with evidence.
- name: "Review evidence"
mode: warning
instructions: |
Inspect CodeRabbit's review findings and their current applicability,
the PR's evidence, and accessible checks/runs for the reviewed SHA.
Pass when relevant commands and results are supplied, negative or
boundary validation fits the changed behavior, and local, fake-runner,
parity, and production evidence are distinguished. For policy/docs
changes, schema, policy, and link checks can be the relevant evidence;
do not require runtime or GPU tests without an affected consumer.
Fail for a concrete missing validation of changed behavior, stale-head
results claimed as current, inactive nested workflows claimed as hosted
CI, or claims that contradict the available results. If necessary
evidence cannot be accessed, return Inconclusive and name the gap;
do not invent a pass or assume the author omitted it. Pending Full CI
before review-based admission is expected; report it separately and
assess the available pre-admission validation on its own merits.
tools:
ruff:
enabled: true
clippy:
enabled: true
shellcheck:
enabled: true
yamllint:
enabled: true
markdownlint:
enabled: true
actionlint:
enabled: true
zizmor:
enabled: true
hadolint:
enabled: true
github-checks:
enabled: true
gitleaks:
enabled: true
trufflehog:
enabled: true
knowledge_base:
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- files: "REVIEW.md,AGENTS.md"
applyTo: "**/*"
- files: "python/aisim/.claude/rules/generator-development.md,python/aisim/.claude/rules/generator/*.md"
applyTo: "python/aisim/src/aisim/generator/**,python/aisim/tools/generator_validator/**"
- files: "python/aisim/.claude/rules/collector/*.md"
applyTo: "python/aisim/collector/**,python/aisim/tests/unit/collector/**"
- files: "python/aisim/.claude/rules/rust-core/parity.md"
applyTo: "crates/core/src/perfmodel/**,crates/core/perfmodel/**,crates/core/parity_tests/perfmodel/**,python/aisim/src/aisim_core/**,python/aisim/tests/unit/sdk/test_opspec_coverage.py,python/aisim/tests/cross_package/test_single_oracle_contract.py"
learnings:
scope: local
approval_delay: 7
issues:
scope: local
pull_requests:
scope: local
linear:
usage: auto
team_keys:
- "AIC"
- "DGH"
- "OPS"
linked_repositories:
- repository: "ai-dynamo/dynamo"
instructions: >-
Downstream runtime and integration consumer. Check public schemas,
bindings, CLI contracts, Replay inputs, and release compatibility.
- repository: "ai-dynamo/aiconfigurator"
instructions: >-
Frozen migration and compatibility reference. Use it to detect omitted
ports or unintended behavior drift, not as a runtime dependency.
chat:
auto_reply: true