Skip to content

chore(coderabbit): add labeling instructions and code guidelines - #10

Merged
elkaix merged 9 commits into
mainfrom
chore/coderabbit-config
May 28, 2026
Merged

chore(coderabbit): add labeling instructions and code guidelines#10
elkaix merged 9 commits into
mainfrom
chore/coderabbit-config

Conversation

@elkaix

@elkaix elkaix commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds knowledge_base.code_guidelines pointing to CONTRIBUTING.md and AGENTS.md so CodeRabbit enforces project standards (zero-new-bundled-deps policy, agent conventions) automatically during reviews without needing to repeat them in path_instructions
  • Adds labeling_instructions mapping the four existing repo labels (enhancement, bug, documentation, dependencies) to conventional commit prefixes for accurate, consistent label suggestions

Test plan

  • Trigger a PR review and confirm CodeRabbit surfaces zero-deps policy violations from CONTRIBUTING.md
  • Verify label suggestions on a feat: PR show enhancement, fix: shows bug, etc.

Summary by CodeRabbit

  • Documentation

    • Added an “Adding dependencies” guideline enforcing a zero-new-bundled-deps policy and a required approval/justification process for new runtime dependencies.
  • Chores

    • Improved PR review automation rules (auto-labeling and title validation) and enabled targeted code-guideline checks for contributor-facing docs.

Review Change Stack

elkaix added 4 commits May 28, 2026 17:21
Schema-validated .coderabbit.yaml with assertive review profile,
Python-specific tool tuning (ruff on, flake8/pylint off), security
scanners (semgrep, trufflehog, gitleaks, trivy, zizmor), path
instructions for telemetry PII, type safety, CI workflow security,
and the zero-new-runtime-deps policy gate.
Wire CONTRIBUTING.md and AGENTS.md into knowledge_base.code_guidelines so
CodeRabbit enforces project standards (zero-deps policy, agent conventions)
automatically during reviews. Add labeling_instructions to map the four
existing repo labels to conventional commit prefixes for accurate suggestions.
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6616defa-e0d5-44fc-be37-282ab15f996d

📥 Commits

Reviewing files that changed from the base of the PR and between b9b3e98 and 8250b07.

📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

Adds a zero-new-bundled-deps runtime dependency policy to CONTRIBUTING.md and updates .coderabbit.yaml to auto-label dependency-related PRs, allow an optional scope in conventional-commit titles, and enable knowledge-base learning from CONTRIBUTING.md and AGENTS.md.

Changes

Dependency Policy and Review Automation

Layer / File(s) Summary
Zero-new-bundled-deps policy documentation
CONTRIBUTING.md
Documents the policy requiring maintainer-approved exceptions for new runtime dependencies in pyproject.toml, specifies the required issue-first workflow and inline justification comment format, and clarifies that dev-only dependencies under [dependency-groups] are exempt.
CodeRabbit review automation configuration
.coderabbit.yaml, pyproject.toml
Adds labeling instructions mapping PR titles to enhancement/bug/documentation and flags dependency updates in pyproject.toml/uv.lock; relaxes the conventional-commit title pattern to allow an optional (scope); and enables knowledge-base code-guideline learning from CONTRIBUTING.md and AGENTS.md. The pyproject change is an added blank line.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • TechMatrix-labs/pythinker-code#8: Overlaps repository governance and dependency-justification automation changes touching CONTRIBUTING.md and .coderabbit.yaml.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Description clearly explains changes and test plan but omits Related Issue link, checklist items, and other template sections. Add 'Resolve #(issue_number)' section, complete the checklist, and confirm changelog and documentation updates are done.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commits format with valid type 'chore' and scope 'coderabbit', accurately describing the main changes: adding labeling instructions and code guidelines.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/coderabbit-config

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.coderabbit.yaml:
- Line 93: The PR title rule in the requirements field currently enforces
"type(scope): description", which conflicts with your label mapping that expects
prefixes like "feat:", "fix:", and "docs:"; update the requirements value (the
requirements key in .coderabbit.yaml) to a pattern that matches your label
mapping—e.g., require "feat: description | fix: description | docs: description"
or a conventional-commit pattern that allows both "type: description" and
"type(scope): description" so that titles with "feat:", "fix:", and "docs:" pass
without pre-merge warnings.

In `@CONTRIBUTING.md`:
- Around line 31-34: Update the CONTRIBUTING.md phrasing that currently reads
"Use the standard library, or hand-roll what you need, rather than adding a
package" to avoid encouraging custom implementations; change it to instruct
contributors to prefer the standard library or existing internal modules first
and to request an approved exception from a maintainer before adding a new
dependency or implementing a bespoke solution, ensuring the policy still conveys
the zero-new-bundled-deps rule and the approval path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5d759867-f8fc-41b4-9166-25d031b307fc

📥 Commits

Reviewing files that changed from the base of the PR and between 65daa6c and 91e3d10.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • AGENTS.md
  • CONTRIBUTING.md

Comment thread .coderabbit.yaml Outdated
Comment thread CONTRIBUTING.md
elkaix added 3 commits May 28, 2026 18:29
…cy wording

Address CodeRabbit review comments:
- type(scope)?: description — scope is optional in conventional commits
- CONTRIBUTING.md: prefer stdlib/internal modules; request exception rather
  than hand-rolling, to guide contributors toward the approval path
The merge from main into this branch reverted the labeling_instructions
and knowledge_base.code_guidelines additions. Restore them.
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

pyproject.toml touched to satisfy branch protection required status checks
(check, test, release-validate) that only run when tracked paths change.
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@elkaix elkaix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

checked

@elkaix
elkaix merged commit e4e6a1c into main May 28, 2026
38 checks passed
@elkaix
elkaix deleted the chore/coderabbit-config branch July 17, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant