[PR #34] [MERGED] fix: make .coderabbit.yaml valid so the repo config is actually used #42

Closed
opened 2026-10-31 22:00:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/34
Author: @wei-hai
Created: 7/30/2026
Status: ✅ Merged
Merged: 7/30/2026
Merged by: @wei-hai

Base: main ← Head: fix/coderabbit-config-schema


📝 Commits (1)

  • 1759f9f fix: make .coderabbit.yaml valid so the repo config is actually used

📊 Changes

1 file changed (+12 additions, -8 deletions)

View changed files

📝 .coderabbit.yaml (+12 -8)

📄 Description

The bug

tone_instructions is capped at 250 characters by the CodeRabbit schema. This file held 539, so the entire config failed validation — and CodeRabbit silently fell back to org-level UI settings rather than erroring. Evidence: recent reviews on this repo report

Configuration used: Organization UI

So none of the reviewer guidance in this file has ever taken effect.

I verified this rather than taking the bot's word for it — fetched https://coderabbit.ai/integrations/schema.v2.json and validated the file with jsonschema:

tone_instructions                         maxLength:   250
reviews.path_instructions[].instructions  maxLength: 20000
before: 1 schema error  (tone_instructions: 539 > 250)
after:  0 schema errors (tone_instructions: 136)

That single field was the only error in the file.

The fix

The schema describes tone_instructions as a persona field — "Set the tone of reviews and chat. Example: 'You must talk like Mr. T.'" — not a place for substantive review rules. So rather than deleting ~290 characters of guidance to squeeze under the cap, the repo-wide rules move to a path: "**" entry, which has 20000 characters of room.

No guidance is lost:

Old tone_instructions clause Where it lives now
Don't repeat ruff/mypy findings, don't nitpick style new ** path_instruction
Only flag issues this PR introduces, not pre-existing code new ** path_instruction
Public API stability / breaking signature changes already in src/comfy_sdk/** (unchanged)
Correct error handling for network calls already in src/comfy_sdk/** (unchanged)
Accurate, exported type hints already in src/comfy_sdk/** (unchanged)

The last three were already duplicated verbatim in path_instructions, so moving only the two genuinely cross-cutting rules keeps the diff minimal.

tone_instructions now carries actual tone direction, which is what the field is for.

How to confirm it worked

The next CodeRabbit review on this repo should stop saying Configuration used: Organization UI. This PR is itself the first test.

The sibling fix for comfy-typescript-sdk is in that repo's PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-python-sdk/pull/34 **Author:** [@wei-hai](https://github.com/wei-hai) **Created:** 7/30/2026 **Status:** ✅ Merged **Merged:** 7/30/2026 **Merged by:** [@wei-hai](https://github.com/wei-hai) **Base:** `main` ← **Head:** `fix/coderabbit-config-schema` --- ### 📝 Commits (1) - [`1759f9f`](https://github.com/Comfy-Org/comfy-python-sdk/commit/1759f9fc2d132c6c71291c2a1b39e8056a7b6095) fix: make .coderabbit.yaml valid so the repo config is actually used ### 📊 Changes **1 file changed** (+12 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `.coderabbit.yaml` (+12 -8) </details> ### 📄 Description ## The bug `tone_instructions` is capped at **250 characters** by the CodeRabbit schema. This file held **539**, so the entire config failed validation — and CodeRabbit silently fell back to org-level UI settings rather than erroring. Evidence: recent reviews on this repo report > `Configuration used: Organization UI` So none of the reviewer guidance in this file has ever taken effect. I verified this rather than taking the bot's word for it — fetched `https://coderabbit.ai/integrations/schema.v2.json` and validated the file with `jsonschema`: ``` tone_instructions maxLength: 250 reviews.path_instructions[].instructions maxLength: 20000 ``` ``` before: 1 schema error (tone_instructions: 539 > 250) after: 0 schema errors (tone_instructions: 136) ``` That single field was the *only* error in the file. ## The fix The schema describes `tone_instructions` as a persona field — *"Set the tone of reviews and chat. Example: 'You must talk like Mr. T.'"* — not a place for substantive review rules. So rather than deleting ~290 characters of guidance to squeeze under the cap, the repo-wide rules move to a `path: "**"` entry, which has 20000 characters of room. **No guidance is lost:** | Old `tone_instructions` clause | Where it lives now | |---|---| | Don't repeat ruff/mypy findings, don't nitpick style | new `**` path_instruction | | Only flag issues this PR introduces, not pre-existing code | new `**` path_instruction | | Public API stability / breaking signature changes | already in `src/comfy_sdk/**` (unchanged) | | Correct error handling for network calls | already in `src/comfy_sdk/**` (unchanged) | | Accurate, exported type hints | already in `src/comfy_sdk/**` (unchanged) | The last three were already duplicated verbatim in `path_instructions`, so moving only the two genuinely cross-cutting rules keeps the diff minimal. `tone_instructions` now carries actual tone direction, which is what the field is for. ## How to confirm it worked The next CodeRabbit review on this repo should stop saying `Configuration used: Organization UI`. This PR is itself the first test. The sibling fix for `comfy-typescript-sdk` is in that repo's PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:00:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-python-sdk#42
No description provided.