Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
256 lines (252 loc) · 15.7 KB
/
Copy path.coderabbit.yaml
File metadata and controls
256 lines (252 loc) · 15.7 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
# yaml-language-server: $schema=https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json
language: en-US
early_access: false
reviews:
# Assertive and advisory: CodeRabbit reviews thoroughly but never approves, requests changes or sets a required
# status. The merge requirement is the CI / Gate check; there is no merge queue.
profile: assertive
request_changes_workflow: false
review_details: false
review_progress: true
commit_status: false
fail_commit_status: false
high_level_summary: true
high_level_summary_instructions: >-
Summarize only material SDK contract, native ABI, Lua stack, generator, analyzer, test, packaging, or CI/CD
effects. Keep it concise.
collapse_walkthrough: true
changed_files_summary: false
sequence_diagrams: false
estimate_code_review_effort: false
assess_linked_issues: false
related_issues: false
related_prs: false
suggested_labels: false
suggested_reviewers: false
auto_apply_labels: false
auto_assign_reviewers: false
in_progress_fortune: false
poem: false
enable_prompt_for_ai_agents: false
abort_on_close: true
slop_detection:
enabled: false
pre_merge_checks:
# Every check is a warning: none of them can block a merge.
title:
mode: warning
requirements: >-
Pull requests are squash-merged and the title becomes the commit subject: a short imperative sentence such as
"Fix CI validation findings", at most 72 characters, no trailing period, no Conventional Commit or area prefix,
starting with an uppercase letter.
description:
mode: warning
issue_assessment:
mode: 'off' # pull requests are not required to link an issue
docstrings:
mode: 'off' # CS1591 already fails the build for undocumented public APIs
custom_checks:
- name: Native ABI evidence
mode: warning
instructions: >-
Applies only when the pull request changes files under libs/CheatEngine.SDK.Abi/, native/ or
tests/native-abi-fixture/, or changes a StructLayout, FieldOffset, function-pointer signature,
UnmanagedCallersOnly or LibraryImport declaration anywhere; otherwise pass. Pass when the description or the
changed documentation names the upstream Cheat Engine source (file and symbol, pinned to a commit or tested
release), the Cheat Engine version, the x64 architecture and the calling convention, and the change adds or
updates size, offset or export tests in tests/CheatEngine.SDK.Abi.Tests or tests/native-abi-fixture. Fail
when a layout, export or signature changes without that evidence, or when fixture evidence is presented as
live Cheat Engine host qualification.
- name: Lua stack balance tests
mode: warning
instructions: >-
Applies only when the pull request changes code that pushes, pops, calls or references values on a Lua stack
in libs/CheatEngine.SDK.Lua/, libs/CheatEngine.SDK.Lua.Interop/,
source-generators/CheatEngine.SDK.SourceGenerators.LuaBindings/ or native/cheatengine-sdk-lua-bridge/;
otherwise pass. Pass when tests assert that the stack top is restored on success and on every touched failure
path (conversion failure, callback exception, protected-call error) and that registry references and
callbacks are released. Fail when such code changes without those assertions, or when a raw Lua call that
can raise is added outside a protected boundary.
- name: Lua concurrency contract
mode: warning
instructions: >-
Applies only when the pull request changes libs/CheatEngine.SDK.Lua/Runtime/**; otherwise pass. Fail when
worker-thread Lua admission is widened, exposed or defaulted to on without staying behind
`[Experimental("CESDK5001")]`, when a comment or doc claims worker-thread admission is qualified before the
Q19 C3 and C4 receipts both pass, or when new code assumes the SDK serializes two plugins or two SDK copies
against each other (ADR-07: admission protects only this copy's attach/reset/detach transitions, never the
shared Lua heap). Otherwise pass.
- name: Native host emulator evidence
mode: warning
instructions: >-
Applies only when the pull request changes tests/native-host-emulator/** or
tests/CheatEngine.SDK.Hosting.Tests/Coexistence/**; otherwise pass. Fail when a description, comment or test
name presents the emulator's facts as live Cheat Engine host behavior or as a C4 (two-copy) qualification
receipt, rather than C2 hostfxr component-route evidence; or when an absolute path can reach the emitted
`--facts` output. Otherwise pass.
- name: Public API documentation and changelog
mode: warning
instructions: >-
Applies when public or protected API in libs/, src/, analyzers/ or source-generators/ is added, removed or
changes signature or behavior, or when an analyzer diagnostic identifier or message changes; otherwise pass.
Pass when every new public member has XML documentation, the owning project's sibling README.md is updated
where it documents the contract, CHANGELOG.md has a matching entry under [Unreleased] (removals and behavior
changes marked as breaking), and diagnostic changes also update analyzers/docs and analyzer release tracking.
Fail otherwise.
- name: Dependency direction
mode: warning
instructions: >-
Fail when any project, source file or package reference references CheatEngine.Client, CheatEngine.Mcp or
their namespaces or packages, when Client-level policy (fluent APIs, dependency-injection registration,
application workflows) is added to this SDK, or when a shipping project under src/ or libs/ gains a new
PackageReference without a reason stated in the description. Otherwise pass.
- name: Workflow hygiene
mode: warning
instructions: >-
Applies only to changes under .github/; otherwise pass. Fail when an action is referenced by tag or branch
instead of a full 40-character commit SHA with a version comment; pull_request_target or a merge_group
trigger is used; a job runs on a -latest label or on any label other than windows-2025 or ubuntu-24.04, or
has no timeout-minutes; actions/checkout omits persist-credentials: false; a permission is widened without a
comment giving the reason; a PowerShell step runs a native command (dotnet, xmake, git, gh, tar, actionlint)
without checking $LASTEXITCODE; a restore is not locked, or a job of ci.yml, sonar.yml, codeql.yml or
release.yml enables a package cache; SONAR_TOKEN or NUGET_USER can reach fork or Dependabot runs; a job added
to ci.yml is missing from the Gate's needs (WorkflowContractTests also fails; only the advisory client-canary
job may stay out); a zizmor finding is ignored in .github/zizmor.yml without a reason; or NuGet/login moves
out of the release.yml publish job that uses environment nuget. scorecard.yml is exempt from the pwsh
defaults and run-step rules, because Scorecard's publication verifier rejects them. The advisory workflows
(codeql, scorecard, zizmor-online, dependency-submission) stay outside the Gate. Otherwise pass.
- name: Public API and compatibility
mode: warning
instructions: >-
Applies when the pull request changes public or protected API under libs/ or src/, a PublicAPI.Shipped.txt
or PublicAPI.Unshipped.txt file, src/CheatEngine.SDK/CompatibilitySuppressions.xml, or a packages.lock.json
file; otherwise pass. Pass when every public API change is recorded in the owning library's
PublicAPI.Unshipped.txt (a changed or removed shipped declaration also gets a *REMOVED* line);
PublicAPI.Shipped.txt changes only in a release pull request that moves Unshipped into it;
CompatibilitySuppressions.xml changes only together with an intentional break that the description and the
CHANGELOG declare; and every packages.lock.json change comes from a CLI restore (never a hand edit)
together with the package, project or global.json change that caused it. Fail otherwise.
finishing_touches:
docstrings:
enabled: false
unit_tests:
enabled: false
autofix:
enabled: false
fix_ci:
enabled: false
resolve_merge_conflict:
enabled: false
auto_review:
enabled: true
auto_incremental_review: true
drafts: false
base_branches: [ main ]
ignore_usernames: [ 'dependabot[bot]' ]
# Exclude only generated outputs and non-reviewable binary payloads. Source, specifications, tests, CI and docs stay in scope.
path_filters:
- '!artifacts/**'
- '!TestResults/**'
- '!**/bin/**'
- '!**/obj/**'
- '!**/*.dll'
- '!**/*.exe'
- '!**/*.pdb'
- '!**/*.coverage'
- '!**/*.nupkg'
- '!**/*.snupkg'
path_instructions:
- path: 'libs/CheatEngine.SDK.Abi/**'
instructions: >-
This is the low-level Cheat Engine ABI boundary. Treat layouts, offsets, packing, signatures, calling
conventions and marshalling as compatibility contracts. Require x64 fixture evidence and never infer live-host
qualification from a fixture-only test.
- path: 'native/**'
instructions: >-
Review native bridge changes for exported symbol names, x64 ABI stability, deterministic builds and source
fingerprints. Do not weaken reproducibility or substitute fixture evidence for interaction with a live Cheat
Engine process.
- path: 'libs/CheatEngine.SDK.Lua/**'
instructions: >-
Preserve Lua stack balance, native error boundaries, callback lifetime and explicit ownership. Protected Lua
operation invariants are enforced by C# contract tests; do not propose restoring retired script-only CI gates.
- path: 'libs/CheatEngine.SDK.Lua.Interop/**'
instructions: >-
Preserve generated binding names, P/Invoke shapes, callback lifetime and protected Lua boundary behavior.
Flag changes that silently alter the public native contract or move Cheat Engine mappings into the Client.
- path: 'analyzers/**'
instructions: >-
Analyzer diagnostics and fixes are consumer-facing contracts. Review generated-code compatibility, diagnostic
identifiers, Roslyn version constraints and focused regression tests.
- path: 'source-generators/**'
instructions: >-
Generators define SDK contracts. Require synchronized changes to parsing, emitted source, public API shape and
generator tests; do not accept Client-specific Cheat Engine mappings here.
- path: 'src/**'
instructions: >-
This package is the low-level SDK boundary. Preserve direct-consumer packaging semantics, native bridge assets
and binary compatibility. Fluent developer workflows and application policy belong in CheatEngine.Client.
- path: 'tests/**'
instructions: >-
Tests use xUnit v3 with Microsoft.Testing.Platform. CI runs the whole solution once in Debug and once in
Release with --fail-skips on, so a skipped test fails both. Debug excludes the packaging tests by the trait
Category=Packaging (never by Skip); Release runs them against the exact nupkg it packed
(CESDK_PACKAGED_UMBRELLA_NUPKG). A test that evidences a qualification scenario carries
[Trait("Qualification", "Qxx")] naming the C0-C4 level it reaches; a C1/C2 success is never presented as
host-qualified. Distinguish fixture, package and NativeAOT probes from actual live Cheat Engine host
qualification.
- path: 'CHANGELOG.md'
instructions: >-
Keep a Changelog 1.1.0. The release workflow publishes the body of the "## [X.Y.Z]" section (or [Unreleased]
for a prerelease) as the GitHub release notes, so keep version headings exact and link references at the end.
- path: '.github/**'
instructions: >-
pull-request-ci.yml and main-ci.yml are thin callers of the reusable ci.yml (native, build-test matrix
Debug/Release, aot, sonar through sonar.yml, lint, format, dependency-review, lock-files, gate) and must stay
thin. Jobs exchange artifacts instead of redoing work: lua-protection-bridge and classic-abi-fixture-facts from
native; nuget-package, coverage and test-results-<configuration> from build-test.
The Release leg packs before it tests, and the packaging tests consume that exact nupkg. Do not reintroduce
per-project test matrices, a second test run of the same configuration, or rebuilds of what an upstream job
produced. NativeBridgePeAuditTests asserts the native job text, and WorkflowContractTests freezes job ids and
names, gate.needs, runners, pins, locked restores and the reserved artifact names. Every job runs on
windows-2025 or ubuntu-24.04 (never -latest) with a timeout, restores with --locked-mode, and no job of ci.yml,
sonar.yml, codeql.yml or release.yml uses a package cache. The Gate evaluates toJSON(needs): every job must
succeed, and sonar must match SONAR_EXPECTED (it runs exactly when expected and is skipped only for forks,
Dependabot, the dormant merge_group clause and release runs); no other job may be skipped. The required check
is CI / Gate. CodeQL, Scorecard, zizmor-online and dependency-submission are advisory and stay out of the
Gate; scorecard.yml keeps no defaults, env or run steps. release.yml is draft-first (verify, ci, attest,
draft-release, publish, verify-publication, finalize-release); publication jobs run only for v* tags of this
repository, never upload to a published release, and keep NuGet/login in the publish job with environment
nuget (trusted publishing binding). Require SHA-pinned actions, least privilege, persist-credentials: false,
user-controlled values only through env, and $LASTEXITCODE checks. actionlint and zizmor already run in the
lint job; do not ask for a duplicate CodeRabbit run. Never use pull_request_target. Sonar secrets must stay
unavailable to forks and Dependabot. No custom PowerShell/Python/JSON governance or evidence tooling under
eng/: a genuine build necessity currently wrapped in a bespoke script gets inlined as direct run: lines using
standard actions and CLI calls instead.
- path: '**/*.md'
instructions: >-
Never restore or link the retired documentations/ tree. Narrative documentation (qualification protocol,
catalogues, migration guides) lives outside both repositories, under the maintainer's local docs/ tree, not
in a repository docs/ folder: flag a pull request that recreates one. Relative links keep the exact case of
the target; READMEs packed into the NuGet package use absolute links only.
tools:
# CodeRabbit is used as the GitHub App; pipeline failures are surfaced through its GitHub Checks integration.
github-checks:
enabled: true
# actionlint and zizmor run in the lint job of ci.yml, the deterministic owner of both.
actionlint:
enabled: false
chat:
auto_reply: true
knowledge_base:
code_guidelines:
enabled: true
filePatterns:
- CONTRIBUTING.md
automatic_linking_mode: disabled
linked_repositories:
- repository: CheatEngineNet/CheatEngine.Client
instructions: >-
This is the high-level developer-focused Client. It depends on this SDK for ABI, native Lua and Cheat Engine
contracts, but owns fluent APIs, application policy, dependency injection and user workflows. Flag accidental
duplication or inversion of that boundary.