Phase 1: Stop New Label Prefix Violations (Governance Documentation) - #2474
Conversation
…forcement) This commit adds explicit governance rules for label creation to prevent new non-canonical label violations. Labels MUST use required family prefixes (type:, status:, priority:, area:, meta:). Changes: - CLAUDE.md: New 'Label Creation Rules (CRITICAL)' section with valid/invalid examples - AGENTS.md: New 'Label Creation Governance (CRITICAL)' section for programmatic issue creation Reference: .github/projects/active/label-prefix-enforcement-2026-08-05/ Resolves: Issue #2283 Phase 1 (Stop New Label Prefix Violations)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes document canonical label governance and add a Node.js agent that audits GitHub issues, plans bare-label replacements or removals, optionally applies updates, and saves a JSON report. ChangesLabel governance and remediation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant bareLabelFixer
participant GitHubIssuesAPI
participant JSONReport
bareLabelFixer->>GitHubIssuesAPI: Discover issues with configured bare labels
GitHubIssuesAPI-->>bareLabelFixer: Return issues and current labels
bareLabelFixer->>GitHubIssuesAPI: Remove bare labels and add mapped labels
GitHubIssuesAPI-->>bareLabelFixer: Return update results
bareLabelFixer->>JSONReport: Save timestamped remediation report
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
🔍 Reviewer Summary for PR #2474CI Status: ✅ Recommendations
|
|
Tick the box to add this pull request to the merge queue (same as
|
|
Implements automated auditing and fixing of bare labels (e.g., 'bug', 'feature', 'documentation') to their proper prefixed equivalents (e.g., 'type:bug', 'type:feature', 'type:documentation'). Features: - Comprehensive bare label detection across repository - Configurable issue number range filtering - Dry-run mode for safe verification - Detailed reporting of changes - High-confidence auto-mapping with manual review fallback Phase 2: Stop New Label Prefix Violations - Fix Existing Issues Relates to #2283 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JsQ2HQ1m9uzKD8bEQhN9xp
📄 README Validation❌ One or more README checks failed.
|
🔍 Reviewer Summary for PR #2474CI Status: ✅ Recommendations
|
…DE.md label governance conflict
❌ Branch Name Validation FailedThe branch name Required Format
Allowed Branch Types
Valid Examples
Invalid Examples
SolutionRename your branch to follow the pattern and update the PR. For more information, see docs/BRANCHING_STRATEGY.md. |
🔍 Reviewer Summary for PR #2474CI Status: ❌ Recommendations
|
Milestone Allocation |
…ements Implements all 5 priority improvements from CI/CD validation audit: 1. Add blocking PR label validation to pr-validation.yml - Load canonical labels from labels.yml - Detect bare (non-prefixed) labels on PR - Fail check if bare labels found - Provide actionable error messages 2. Create new issue label validation workflow (validate-issue-labels.yml) - Triggers on issue opened/edited/labeled/unlabeled - Detects bare labels on issues - Posts warning comment with canonical label guidance - Skips bot-authored issues (dependabot, renovate) 3. Enhance labeling-governance.yml with bare label detection - Add new detect-bare-labels job - Runs on PR and issue events - Logs warnings for bare labels found - Complements automatic labeling with detection 4. Setup scheduled bare label remediation (weekly) - Add schedule trigger to remediate-bare-labels.yml - Runs every Monday at 08:00 UTC - Enables automatic weekly scanning and reporting - Maintains manual dispatch option 5. Add PR template validation for required structure and labels - Create validate-pr-template-structure.cjs script - Validates required sections (Linked issues, Changelog, etc.) - Checks for canonical label references in template - Add to pr-validation.yml workflow Validation stack now includes: - Automated label assignment (labeler.yml - all canonical) - Template validation (check-template-labels.js) - PR label validation (pr-validation.yml - blocks bare labels) - Issue label validation (validate-issue-labels.yml - warns on bare) - Bare label detection (labeling-governance.yml - logs findings) - Scheduled remediation (remediate-bare-labels.yml - weekly) Relates to #2474 (Phase 1: Governance) Relates to #2524 (Phase 2: Remediation) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZBSsykLxBKFqa5Hxq8xKh
…ements Implements all 5 priority improvements from CI/CD validation audit: 1. Add blocking PR label validation to pr-validation.yml - Load canonical labels from labels.yml - Detect bare (non-prefixed) labels on PR - Fail check if bare labels found - Provide actionable error messages 2. Create new issue label validation workflow (validate-issue-labels.yml) - Triggers on issue opened/edited/labeled/unlabeled - Detects bare labels on issues - Posts warning comment with canonical label guidance - Skips bot-authored issues (dependabot, renovate) 3. Enhance labeling-governance.yml with bare label detection - Add new detect-bare-labels job - Runs on PR and issue events - Logs warnings for bare labels found - Complements automatic labeling with detection 4. Setup scheduled bare label remediation (weekly) - Add schedule trigger to remediate-bare-labels.yml - Runs every Monday at 08:00 UTC - Enables automatic weekly scanning and reporting - Maintains manual dispatch option 5. Add PR template validation for required structure and labels - Create validate-pr-template-structure.cjs script - Validates required sections (Linked issues, Changelog, etc.) - Checks for canonical label references in template - Add to pr-validation.yml workflow Validation stack now includes: - Automated label assignment (labeler.yml - all canonical) - Template validation (check-template-labels.js) - PR label validation (pr-validation.yml - blocks bare labels) - Issue label validation (validate-issue-labels.yml - warns on bare) - Bare label detection (labeling-governance.yml - logs findings) - Scheduled remediation (remediate-bare-labels.yml - weekly) Relates to #2474 (Phase 1: Governance) Relates to #2524 (Phase 2: Remediation) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZBSsykLxBKFqa5Hxq8xKh
Linked issues
Relates to #2283 (Epic: Phase 1 - Stop New Label Prefix Violations)
Changelog
Added
Changed
Fixed
Removed
Milestone
Phase 1: Label Prefix Enforcement - Governance & Documentation
Risk Assessment
Risk Level: Low
Potential Impact:
Mitigation Steps:
.github/scripts/validation/validate-labels-before-creation.cjsscriptHow to Test
Prerequisites
developbranchTest Steps
Review CLAUDE.md changes:
Review AGENTS.md changes:
Verify markdown validation:
```bash
npm run lint:md CLAUDE.md AGENTS.md
```
Expected: 0 errors
Expected Results
Edge Cases to Verify
Checklist (Global DoD / PR)
References
Generated by Claude Code
Summary by CodeRabbit
New Features
Documentation