Skip to content

feat: Phase 3 label validation enforcement - #1613

Open
ashleyshaw wants to merge 2 commits into
developfrom
feat/phase-3-label-validation-enforcement
Open

feat: Phase 3 label validation enforcement#1613
ashleyshaw wants to merge 2 commits into
developfrom
feat/phase-3-label-validation-enforcement

Conversation

@ashleyshaw

Copy link
Copy Markdown
Member

Phase 3: Enforce Validation — Add Workflow-Level Validation

Status: Implementation complete, ready for review

Summary

Implements pre-creation label validation to prevent new bare-label violations. All issues/PRs will now be validated against the canonical label system.

Changes

  1. Validation Script (new): .github/scripts/validation/validate-labels-before-creation.cjs

    • Loads 158 canonical labels from .github/labels.yml
    • Validates family prefixes (type:, status:, priority:, area:, meta:, etc.)
    • Enforces one-hot per family constraint
    • Requires type:* label for all issues/PRs
  2. Unit Tests (new): .github/scripts/validation/__tests__/validate-labels-before-creation.test.cjs

    • 12+ test cases covering all validation rules
    • Tests for bare labels, non-existent labels, one-hot constraint, etc.
  3. Validation Workflow (new): .github/workflows/validate-issue-labels.yml

    • Triggers on issue/PR creation and labeling
    • Posts helpful comment on validation failure
    • References canonical labels and documentation
    • Uses safe environment variables (no command injection)

Related


🤖 Generated with Claude Code

- Validates labels before issue/PR creation
- Enforces canonical prefixed labels (type:, status:, priority:, area:, meta:, etc.)
- Enforces one-hot per family (except meta:, comp:, lang: which allow multiple)
- Requires type:* label for all issues/PRs
- Provides clear error and warning messages
- Includes comprehensive unit tests (12+ test cases)
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ce88bd9e-d147-4174-b3c0-a96b0f6bd87a

📥 Commits

Reviewing files that changed from the base of the PR and between 6c6342f and 344dd40.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • scripts/validation/__tests__/validate-labels-before-creation.test.cjs
  • scripts/validation/validate-labels-before-creation.cjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

*/

const fs = require('fs');
const path = require('path');
// ============================================================================

const FAMILIES_ALLOW_MULTIPLE = ['meta', 'comp', 'lang'];
const REQUIRED_FAMILIES = ['type'];

for (const label of labels) {
if (bareLabels.includes(label)) {
const family = getFamily(label);
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🚫 This PR description is missing required template content.

Missing required section(s): Linked issues, Changelog, Global DoD checklist

Please update the PR body using one of the repository PR templates:

Empty placeholders, unchecked checklist boxes, and stub issue references do not count.

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