Skip to content

chore(coderabbit): enable proplus review config - #123

Closed
ANcpLua wants to merge 1 commit into
mainfrom
dev/coderabbit-proplus-20260516155428
Closed

chore(coderabbit): enable proplus review config#123
ANcpLua wants to merge 1 commit into
mainfrom
dev/coderabbit-proplus-20260516155428

Conversation

@ANcpLua

@ANcpLua ANcpLua commented May 16, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replace or add the repo-root CodeRabbit v2 config with a Pro+ / Enterprise-grade setup.
  • Enable request-changes workflow, failing commit status, expanded review details, linked issues/PRs, sequence diagrams, cross-repository knowledge, web search, MCP knowledge, code generation guidance, issue enrichment, slop detection, and custom finishing-touch recipes.
  • Add repo-aware path instructions while preserving existing bespoke guidance where present.
  • Enable relevant security/static-analysis tools and explicit pre-merge checks for generated-file drift, secrets/PII, async/cancellation safety, public contract drift, CI/release safety, test risk, dependency hygiene, observability, hidden fallbacks, and copy-paste tables.

Why

We have the paid CodeRabbit capacity; this makes CodeRabbit spend it on review depth instead of staying on the old advisory baseline.

Validation

  • Generated from the current CodeRabbit v2 schema reference (https://coderabbit.ai/integrations/schema.v2.json, docs last updated 2026-05-10).
  • Validated .coderabbit.yaml locally against the live schema before pushing this branch.

@github-actions

Copy link
Copy Markdown

@coderabbitai autofix

@github-actions
github-actions Bot enabled auto-merge (squash) May 16, 2026 13:58
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7843321-c009-4240-bbbf-524f5b276b0f

📥 Commits

Reviewing files that changed from the base of the PR and between 7b8ca5c and 648aa93.

📒 Files selected for processing (1)
  • .coderabbit.yaml

Cache: Disabled due to Reviews > Disable Cache setting

Knowledge base: Disabled due to data retention organization setting


Behavior Changes

Review Workflow: Enabled request-changes workflow for hard-fail pre-merge checks. Auto-review triggered on @coderabbitai review keyword or PR description prefix. Auto-pause-after-reviewed-commits set to 0 (no pausing between incremental reviews). Title-placeholder ignores [skip review] keyword.

Finishing Touches: Enabled automated docstring generation (XML docs/TSDoc), unit test generation, code simplification, plus five custom passes: architecture hardening (deduplication/fallback path refactoring), security pass (secrets/injection/authz scanning), test gap closure (edge case + regression test generation), docs/changelog alignment (user-visible behavior updates), and performance/allocation analysis on changed hot paths.

Pre-merge Custom Checks (Error Mode):

  • No Secrets Or PII (hardcoded block on tokens, keys, real user data, sensitive logs)
  • Generated Files Regenerated (schema/template changes must regenerate all downstream artifacts in same PR; flags hand-edits without source change)
  • Async And Cancellation Safe (blocks sync-over-async, unobserved fire-and-forget, missing CancellationToken/AbortSignal propagation, sleep-based synchronization)
  • Public Contract Documented (requires matching docs/tests/changelog for API, endpoint schema, CLI flag, config key, or storage format changes)
  • CI Release Safety (blocks workflow changes reducing required validation, adding admin bypasses, broadening token permissions, leaking secrets, or allowing failed checks to be ignored)
  • DateTime.Now/UtcNow, .Result/.Wait() blocking calls, and ISourceGenerator usage (explicit C# pattern blocks)
  • Sources-only types must be internal (prevents accidental public re-export from source packages)

Path Filters & Instructions: Excluded generated files (*.g.cs, *.Designer.cs, Generated/, bin/, obj/, dist/, node_modules/, lock files, .sarif, .trx). Expanded per-path guidance for C#, .NET tests, Python, GitHub Actions, Markdown, generated outputs, Roslyn utilities, sources-only packages, polyfills, test infrastructure, AOT reflection, examples, and MSBuild files. Each includes specific architectural constraints (e.g., value-equatable records for incremental pipelines, no Roslyn mutable state in pipeline data, netstandard2.0 compatibility for analyzer projects, no external dependencies in source-only packages).

Tools: Enabled security/static scanners (gitleaks, trufflehog, checkov, trivy, osvScanner, presidio for secrets/PII; semgrep, opengrep for code patterns). Enabled linters: ast-grep (essential rules), shellcheck, ruff, flake8, pylint, markdownlint, yamllint, actionlint, psscriptanalyzer. GitHub checks timeout increased to 900000ms. Disabled: biome, hadolint, swiftlint, phpstan, golangci-lint, detekt, eslint, and others.

Knowledge Base: Widened code-guidelines file patterns to include CLAUDE.md, AGENTS.md, .editorconfig, README.md, docs/**/*.md, Directory.Build.props, global.json, package.json, pnpm-workspace.yaml, Version.props. Enabled web search. Enabled MCP (AI agent tool use). Registered 15 linked repositories (ANcpLua.Agents, ANcpLua.Analyzers, ANcpLua.NET.Sdk, ANcpLua.OtelConventions.Api, Arqio, ErrorOrX, dotcov, and others) for cross-repo API, package, build, telemetry, and agent workflow context.

Code Generation: Auto-generates XML docs for C# public/protected APIs (intent, contracts, cancellation, exceptions, compatibility) and TSDoc for TS/TSX exports (reusable components, hooks, schemas). Auto-generates xUnit v3 unit tests for C#, frontend tests for TS/TSX, pytest-style tests for Python. Auto-enriches issues with planning labels and auto-labeling (area:*, breaking, review:slop).

Risk Surface

Hard Merge Blocks: Error-mode checks can block PRs on: undeclared secrets/PII (including sensitive request/response logs), missing generated-file regeneration after source changes, sync-over-async or unobserved fire-and-forget work, undocumented public contract changes, CI token permission expansion or admin bypasses, hardcoded DateTime.Now, blocking async patterns (.Result/.Wait()), new ISourceGenerator (must use IIncrementalGenerator), and public types in source-only packages.

Cross-repo Knowledge Blast: 15 linked repositories registered; CodeRabbit will reference ANcpLua.Agents, ANcpLua.Analyzers, ANcpLua.NET.Sdk, and related repos for context on every PR. Risk: expanded surface for detecting breaking API/package contract drift, but also dependency on those repos' accuracy in CodeRabbit's knowledge base.

Broad Secret/PII Scanning: Gitleaks, trufflehog, and presidio enabled simultaneously; may create false-positive friction if not tuned to repo conventions. Blocking on secrets requires PR author intervention.

Generated File Discipline: Any change to schemas, templates, or generator inputs must be paired with regenerated outputs in the same PR. Tight coupling enforces consistency but increases PR scope.

Async/Cancellation Enforcement: Blocks CancellationToken drift, sync-over-async, and fire-and-forget patterns at merge time. Impacts all C# changes; requires explicit propagation on public/internal async boundaries.

No ISourceGenerator: Enforced at merge, not suggestion. Requires IIncrementalGenerator adoption; breaking for any ongoing ISourceGenerator work.

Validation Evidence

PR description notes YAML syntax validated: ruby -e "require 'yaml'; YAML.load_file('.coderabbit.yaml'); puts 'yaml ok'". File is schema-backed per schema URL in header (https://coderabbit.ai/integrations/schema.v2.json). No evidence of review against actual repo structure (e.g., confirming 15 linked repos are accessible or that path patterns match existing directory layout).

Generated Artifacts

  • Auto-generated XML documentation for public C# APIs
  • Auto-generated TSDoc for TypeScript exports
  • Auto-generated unit tests (xUnit for C#, pytest for Python, frontend test suite for TS/TSX)
  • Auto-generated/updated changelog entries for user-visible behavior changes
  • Auto-applied labels (area:*, breaking, review:slop)
  • Auto-suggested reviewer: ANcpLua (for architecture, public API, security-sensitive, release automation, generated artifacts, cross-repo contracts)
  • Auto-applied planning labels and enriched issues with auto-planning for enhancement/bug/good-first-issue/help-wanted

Cross-repo Implications

Linked repositories (ANcpLua.Agents, ANcpLua.Analyzers, ANcpLua.NET.Sdk, ANcpLua.OtelConventions.Api, Arqio, ErrorOrX, dotcov, nhmw-digital-collection, Paperless, BSc_2025_Alexander_Nachtmann, C64AIToolChain, ancplua-claude-plugins, Nuke.OpenTelemetry.Conventions, qyl, safe-autoresearch, typespec-otel-semconv, yt-transcript) are now pulled into CodeRabbit review context for this repo. PRs touching public APIs, package surfaces, build/telemetry workflows, or agent instructions will be evaluated against those repos' patterns and contracts. Expands review scope for detecting breaking changes but also increases dependency on those repos' visibility in CodeRabbit's knowledge base. No enforcement of mutual configuration across linked repos (e.g., if linked repo changes, this repo's PR review automatically reflects it, but no coordination required for merge).

Walkthrough

CodeRabbit Pro configuration rewritten to enable request-changes workflow, expand labeling and path-specific review policies, introduce multiple pre-merge quality gates (secrets/PII, async safety, public contracts, CI release), activate security scanners, and extend cross-repository knowledge-base and code generation automation for enhanced code review rigor and merge safety.

Changes

CodeRabbit Pro Configuration Automation and Quality Gate Expansion

Layer / File(s) Summary
Review workflow defaults and request-changes gating
.coderabbit.yaml
Core review toggles enabled: request-changes workflow, expanded review detail/status reporting, language/tone defaults, and inheritance behavior configured.
Labeling automation and issue routing
.coderabbit.yaml
Labeling switched to larger category set with updated labeling_instructions, auto-application enabled, and reviewer assignment and path-filtering strategy adjusted.
Per-language and area-specific review policies
.coderabbit.yaml
Path-based instructions defined for C#/.NET, C# tests, Python, GitHub workflows, markdown/docs, generated outputs, and multiple src/* subtree areas with targeted review focus.
Finishing touches and pre-merge quality gate expansion
.coderabbit.yaml
Finishing-touches automation enabled (docstrings, unit tests, simplification) with named custom passes (architecture, security, test gaps, docs, performance). Pre-merge checks expanded with hard-fail criteria for secrets/PII, regenerated-file detection, async/cancellation safety, public contract documentation, and CI release safety.
Analysis tool enablement and security scanner configuration
.coderabbit.yaml
Security-focused scanners activated (gitleaks, trufflehog, checkov, trivy, osvScanner, presidio); broader linters kept disabled. GitHub checks timeout adjusted.
Knowledge-base, code generation, and issue enrichment automation
.coderabbit.yaml
Knowledge-base scope widened with extensive linked-repository entries for cross-repo review context. Code generation guidance added for docstrings and unit tests per file type. Issue enrichment extended with auto-planning and labeling behavior.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

This single-file configuration rewrite spans nine major functional areas—review workflow, labeling, path policies, quality gates, tooling, and automation—each with distinct semantics and cross-cutting concerns. The complexity lies in understanding the compounded effects of quality gate rules (secrets, async safety, public contracts, CI safety), path-based instruction routing, and cross-repository knowledge linking. Although mechanically a single YAML file, the density and diversity of decision points across quality gates, security enforcement, tooling activation, and automation behavior demands careful verification of rule interactions and side effects on CI/merge workflows.


Possibly related PRs

  • ANcpLua/ANcpLua.Agents#25: Direct .coderabbit.yaml modification with overlapping review automation and workflow gating configuration.
  • ANcpLua/ANcpLua.Roslyn.Utilities#92: Substantive rewrite of the same CodeRabbit configuration with path-specific review instructions and Pro automation enablement.
  • ANcpLua/ANcpLua.NET.Sdk#96: Introduction of CodeRabbit Pro configuration governing CI review/autofix behaviors, directly related to this PR's automation expansion.

Suggested labels

area:infra, area:agents

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev/coderabbit-proplus-20260516155428
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch dev/coderabbit-proplus-20260516155428
  • 🛠️ architecture hardening
  • 🛠️ security pass
  • 🛠️ test gap closure
  • 🛠️ docs and changelog alignment
  • 🛠️ performance and allocation pass

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@ANcpLua

ANcpLua commented May 16, 2026

Copy link
Copy Markdown
Owner Author

Closed by branch-hygiene-sweep: the branch content is already present on main at 2983098, so this PR is duplicate.

@ANcpLua ANcpLua closed this May 16, 2026
auto-merge was automatically disabled May 16, 2026 13:59

Pull request was closed

@ANcpLua
ANcpLua deleted the dev/coderabbit-proplus-20260516155428 branch May 16, 2026 13:59

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR successfully implements the CodeRabbit Pro+ review posture and aligns with the defined acceptance criteria. Codacy analysis indicates the changes are 'up to standards' with no new quality issues detected.

However, there is a critical logical conflict in the configuration: several file patterns (like generated files) are excluded via path_filters but also have specific review instructions assigned to them. Because exclusions take precedence, the intended 'Generated-output discipline' checks will not execute. Additionally, significant duplication of the labeling configuration exists between the reviews and issue_enrichment sections, which should be consolidated to prevent configuration drift.

Test suggestions

  • Verify the .coderabbit.yaml file is syntactically valid via YAML parser.
  • Verify that 'request_changes_workflow' is set to true to support Pro+ assertive posture.
  • Check that path_instructions for C# files include checks for sync-over-async and CancellationToken usage.
  • Verify that slop_detection is enabled and configured with the 'review:slop' label.
  • Ensure that security tools such as gitleaks, trufflehog, and checkov are enabled in the tools configuration.
  • Confirm that custom pre-merge checks for 'No Secrets' and 'Async Safe' code are enabled with 'error' mode.
Low confidence findings
  • The configuration for labeling instructions is duplicated across the 'reviews' and 'issue_enrichment' sections. This redundancy makes the file harder to maintain and prone to configuration drift.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread .coderabbit.yaml
Comment on lines +110 to +116
- "!**/*.g.cs"
- "!**/*.g.ts"
- "!**/*.g.sql"
- "!**/*.g.tsp"
- "!**/*.Designer.cs"
- "!**/Generated/**"
- "!**/generated/**"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

The exclusions in path_filters (lines 110-116) prevent CodeRabbit from reviewing generated files. This conflicts with the path_instructions for generated files on line 170. To enable the 'Generated-output discipline' checks, remove these exclusions from the path_filters list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant