Repository navigation
ci(coderabbit-config): refresh the vendored CodeRabbit schema - #438
Open
cloud-code-bot[bot] wants to merge 2 commits into
Open
cloud-code-bot[bot] wants to merge 2 commits into
cloud-code-bot[bot] wants to merge 2 commits into
Conversation
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
cloud-code-bot
Bot
force-pushed
the
ci/refresh-coderabbit-schema
branch
from
October 26, 2026 15:30
b3aa428 to
4ea2b54
Compare
…uld drop The refreshed schema adds `reviews.auto_approvals.overrides`, an array of closed objects with no `maxItems`. That breaks the premise the invariant suite pinned: `islice(iter_errors(...), MAX_FINDINGS + 1)` is FIFO in schema order, so 150 overrides each carrying one unknown key fill the slice with stripped errors before a `maxLength` violation in a later property is ever emitted -- 100 warnings and exit 0 on a config CodeRabbit rejects whole. Reproduced against the vendored schema before this change. When the cap is hit, the rejecting errors are now re-collected from a second, equally bounded pass over a copy of the schema with the strip-only `additionalProperties: false` / `unevaluatedProperties: false` removed (outside combinators, where opening a branch would change what it accepts), and replace whatever subset of them the first pass kept. `_apply_cap` then ranks them ahead of the warnings as before. Tests: a regression case that fails without the second pass, a unit case for the schema rewrite, and the census updated deliberately -- `explicit` 5 -> 7 (both new objects closed with `additionalProperties: false`, now asserted per member, so no new opener keyword), and the maxItems-before-items fact keeps holding for every other array, with `overrides` named as the one exception rather than dropped. The five/103 counts in the checker, tests and README follow the schema (seven/105). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
This updates our copy of CodeRabbit's settings rulebook to the latest version, which adds new auto-approval settings. The new rules opened a loophole: a config stuffed with many repeated entries could hide a real, file-breaking mistake, so the check would pass a config CodeRabbit refuses to load. This PR also closes that loophole.
Upstream's CodeRabbit config schema has drifted from the copy vendored here, which is what
coderabbit-config-validate.ymlgrades every enrolled repo against.Added properties (12):
reviews.auto_approvalsreviews.auto_approvals.allow_author_approvalreviews.auto_approvals.enabledreviews.auto_approvals.max_merge_riskreviews.auto_approvals.max_security_riskreviews.auto_approvals.overridesreviews.auto_approvals.overrides[].enabledreviews.auto_approvals.overrides[].max_merge_riskreviews.auto_approvals.overrides[].max_security_riskreviews.auto_approvals.overrides[].pathsreviews.auto_approvals.overrides[].teamsreviews.review_infoBefore merging, check the tightened-cap section above if there is one: a lowered
maxLengthretroactively invalidates configs nobody has touched, and merging this makes their next PR red. Landing the cleanup alongside is usually the right order.Note
The invariant unit suite failed against this schema, and the checker has been adapted in this PR. The new
reviews.auto_approvals.overridesis an array of closed objects with nomaxItems. That broke the premise the suite pinned: the checker's pre-rankisliceoveriter_errorsis FIFO in schema order, so ~150 overrides each carrying an unknown key could push a file-rejectingmaxLengtherror out of the slice. The result was 100 warnings and exit 0 on a config CodeRabbit rejects whole. This was reproduced against the refreshed schema. Now, when the cap is hit, the checker re-collects rejecting errors from a second, equally bounded pass over a copy of the schema that has the strip-onlyadditionalProperties: falseremoved (outside combinators). The census moved on purpose:explicitwent 5 → 7, and both new objects are closed withadditionalProperties: false, which is now asserted per member, so no new opener keyword was added.overridesis named as the one array exempt from the maxItems-before-items fact, and every other array still has to satisfy it. The README and checker comments now give the schema's current object counts (seven explicitly closed, 105 by omission).Merging this touches
.github/coderabbit-config/**, which triggersbump-coderabbit-config-callers.ymland rolls the SHA-pinned caller fleet forward.Opened by the
refresh-coderabbit-schemaworkflow.Provenance
Verified:
unittestsuite for.github/coderabbit-config(pinned requirements,--require-hashes): 101 tests pass at the current head.overrideswith unknown keys plus an over-longpath_instructionsentry now exit 1; before the fix this exited 0.check_workflow_pins.py,check_agents_md.py --root .andcheck-org-repo-literals.shall exit 0.Deviations:
check_coderabbit_config.py(the rejecting-only second pass), its tests, and README counts.