-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
175 lines (165 loc) · 5.54 KB
/
Copy path.coderabbit.yaml
File metadata and controls
175 lines (165 loc) · 5.54 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
# yaml-language-server: $schema=https://www.coderabbit.ai/integrations/schema.v2.json
language: "en-US"
tone_instructions: "Be direct and specific. Prefer concise, actionable feedback. Skip style notes already handled by ruff or pyright."
early_access: false
reviews:
profile: "assertive"
# Set request_changes_workflow: true once the team is comfortable with assertive reviews
request_changes_workflow: false
high_level_summary: true
high_level_summary_in_walkthrough: false
commit_status: true
fail_commit_status: false
collapse_walkthrough: true
changed_files_summary: true
sequence_diagrams: true
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true
suggested_labels: true
labeling_instructions:
- label: "enhancement"
instructions: "Apply when the PR title starts with 'feat:' or adds new user-visible functionality."
- label: "bug"
instructions: "Apply when the PR title starts with 'fix:' or resolves a defect."
- label: "documentation"
instructions: "Apply when the PR title starts with 'docs:' or only changes documentation files."
- label: "dependencies"
instructions: "Apply when the PR updates package versions or modifies dependency declarations in pyproject.toml or uv.lock."
auto_apply_labels: false
suggested_reviewers: true
poem: false
slop_detection:
enabled: true
label: "ai-slop"
auto_review:
enabled: true
auto_incremental_review: true
drafts: false
base_branches:
- "main"
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
path_filters:
- "!dist/**"
- "!build/**"
- "!**/*.pyc"
- "!**/__pycache__/**"
# Prose and working-notes paths: keeps bot reviews focused on shipped
# code and large branches under the per-PR reviewed-file limit.
- "!docs/**"
- "!tasks/**"
path_instructions:
- path: "**/*.py"
instructions: |
Python uses snake_case for variables, functions, and methods per PEP 8; this is the
established convention across the entire codebase. Do NOT suggest renaming Python
identifiers to camelCase — such suggestions contradict the repo standard and are out of
scope. The camelCase convention applies only to TypeScript/JavaScript sources, never to
.py files.
- path: "src/pythinker_code/telemetry/**"
instructions: |
Flag any changes that could inadvertently capture PII, secrets, or sensitive user data.
Verify that all telemetry events respect the PYTHINKER_DISABLE_TELEMETRY opt-out path.
- path: "src/**/*.py"
instructions: |
Flag missing type annotations on public functions and methods.
Flag use of eval, exec, subprocess with shell=True, or os.system.
Flag exception handlers that silently swallow errors without logging or re-raising.
- path: "tests/**/*.py"
instructions: |
Flag tests that mock internal implementation details rather than observable behavior.
Flag tests missing assertions, or with trivially-true assertions.
- path: ".github/workflows/**"
instructions: |
Flag third-party actions that are not pinned to a full commit SHA.
Flag pull_request_target triggers without explicit permission restrictions.
Flag hardcoded secrets, tokens, or sensitive values.
- path: "pyproject.toml"
instructions: |
Flag any new entries under [project].dependencies — new runtime dependencies require explicit justification per the zero-new-bundled-deps policy.
Flag version pins that downgrade or remove security constraints.
finishing_touches:
docstrings:
enabled: true
unit_tests:
enabled: true
simplify:
enabled: false
# Pre-merge checks — all in warning mode to gather signal before tightening.
# Promote individual checks to mode: "error" + request_changes_workflow: true
# once the team has calibrated expectations.
pre_merge_checks:
title:
mode: "warning"
requirements: "Follow conventional commits: type(scope)?: description. Valid types: feat, fix, test, refactor, chore, style, docs, perf, build, ci, revert."
description:
mode: "warning"
issue_assessment:
mode: "warning"
docstrings:
mode: "warning"
threshold: 70
tools:
# Python — ruff covers pycodestyle, flake8-bugbear, isort, etc.
# Disable flake8/pylint to eliminate duplicate noise.
ruff:
enabled: true
flake8:
enabled: false
pylint:
enabled: false
# Security
semgrep:
enabled: true
trufflehog:
enabled: true
gitleaks:
enabled: true
trivy:
enabled: true
osvScanner:
enabled: true
zizmor:
enabled: true
# Infrastructure / CI
actionlint:
enabled: true
hadolint:
enabled: true
shellcheck:
enabled: true
yamllint:
enabled: true
# Docs
markdownlint:
enabled: true
# Language tool adds noise in code-heavy repos; leave off by default
languagetool:
enabled: false
chat:
auto_reply: true
knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- "CONTRIBUTING.md"
- "AGENTS.md"
learnings:
scope: "local"
issues:
scope: "local"
pull_requests:
scope: "local"
code_generation:
docstrings:
language: "en-US"
unit_tests:
path_instructions:
- path: "src/**/*.py"
instructions: "Use pytest. Follow patterns in tests/. Mock external HTTP calls. Avoid patching internals."