fix: implement blocking logic enforcement for issue state validation - #1500
fix: implement blocking logic enforcement for issue state validation#1500ashleyshaw wants to merge 2 commits into
Conversation
Implements comprehensive blocking relationship handling with bidirectional checking and enforcement. When an issue is blocked by other issues, the system now: 1. Parses blocking relationships from issue bodies - "Blocks #XXX" indicates this issue blocks another - "Blocked by #XXX" indicates this issue is blocked by another 2. Prevents closing blocked issues (new workflow) - Blocks closure if unclosed blockers exist - Posts guidance comment on attempted close - Allows force-close with meta:force-close label 3. Manages status:blocked label automatically - Applies label to issues with open blockers - Removes label when all blockers are closed - Runs on issue changes and daily schedule 4. Includes comprehensive test coverage - Tests bidirectional blocking logic - Tests blocking relationship parsing - Tests edge cases and validation Fixes #993 — Blocking logic was parsed but not enforced. Issues that blocked other issues would not prevent closure of blocked issues, leading to inconsistent state. Adds: - .github/workflows/validate-blocking-status-before-close.yml - .github/workflows/manage-blocking-status-labels.yml - scripts/agents/includes/__tests__/blocking-logic.test.js Updates: - scripts/agents/includes/issue-pr-metadata.cjs (bidirectional flag) - scripts/agents/includes/__tests__/issue-pr-metadata.test.js Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Extends blocking relationship enforcement to prevent BLOCKING issues from closing while they still block other open issues. This ensures: 1. Blocked issues cannot close while their blockers are open - validate-blocking-status-before-close.yml 2. Blocking issues cannot close while they block open issues - validate-blocking-issue-before-close.yml (NEW) - Prevents a blocking issue from closing prematurely 3. Automatic status:blocked label management - manage-blocking-status-labels.yml - Applies/removes label based on actual blocking state 4. Both directions properly tested - Comprehensive test coverage for bidirectional blocking - Tests for issues that are both blocked AND blocking Impact: Issue #1324 can now safely block #993 without worrying about closing prematurely. The system enforces that #1324 cannot close while #993 (or any other issues it blocks) remain open. Fixes #993 — Complete bidirectional blocking logic implementation Adds: - .github/workflows/validate-blocking-issue-before-close.yml Updates: - scripts/agents/includes/__tests__/blocking-logic.test.js (additional tests) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 48 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 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 configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
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 |
|
✅ Template check passed after update. Thanks for fixing the PR description. |
⏱️ Aging and SLA annotation
Maintained by project-meta-sync workflow. |
🔍 Reviewer Summary for PR #1500CI Status: ❌ Recommendations
|
|
Tick the box to add this pull request to the merge queue (same as
|
Pull request was closed
Comprehensive audit of label prefix violations in issues #1500-1600 range. ## Findings Summary - Root cause: Code duplication (defective labeling-agent.js applies bare labels) - Impact: 100+ issues with non-canonical labels - Governance gaps: CLAUDE.md/AGENTS.md incomplete ## Audit Reports Created - LABEL_PREFIX_AUDIT_REPORT.md — Complete findings and root cause analysis - WORKFLOW_CONSOLIDATION_ANALYSIS.md — Workflow conflicts and consolidation plan - REMEDIATION_PLAN.md — Step-by-step fixes with code and scripts - README.md — Index and quick reference guide ## Immediate Actions - Update CLAUDE.md with explicit label creation rules - Update AGENTS.md with label governance section - Delete defective scripts/agents/includes/labeling-agent.js - Implement pre-creation label validation Related: #1290 (Phase 1 restructuring), workflows-consolidation-2026-q3 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Comprehensive audit of label prefix violations in issues #1500-1600 range. ## Findings Summary - Root cause: Code duplication (defective labeling-agent.js applies bare labels) - Impact: 100+ issues with non-canonical labels - Governance gaps: CLAUDE.md/AGENTS.md incomplete ## Audit Reports Created - LABEL_PREFIX_AUDIT_REPORT.md — Complete findings and root cause analysis - WORKFLOW_CONSOLIDATION_ANALYSIS.md — Workflow conflicts and consolidation plan - REMEDIATION_PLAN.md — Step-by-step fixes with code and scripts - README.md — Index and quick reference guide ## Immediate Actions - Update CLAUDE.md with explicit label creation rules - Update AGENTS.md with label governance section - Delete defective scripts/agents/includes/labeling-agent.js - Implement pre-creation label validation Related: #1290 (Phase 1 restructuring), workflows-consolidation-2026-q3 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Comprehensive audit of label prefix violations in issues #1500-1600 range. ## Findings Summary - Root cause: Code duplication (defective labeling-agent.js applies bare labels) - Impact: 100+ issues with non-canonical labels - Governance gaps: CLAUDE.md/AGENTS.md incomplete ## Audit Reports Created - LABEL_PREFIX_AUDIT_REPORT.md — Complete findings and root cause analysis - WORKFLOW_CONSOLIDATION_ANALYSIS.md — Workflow conflicts and consolidation plan - REMEDIATION_PLAN.md — Step-by-step fixes with code and scripts - README.md — Index and quick reference guide ## Immediate Actions - Update CLAUDE.md with explicit label creation rules - Update AGENTS.md with label governance section - Delete defective scripts/agents/includes/labeling-agent.js - Implement pre-creation label validation Related: #1290 (Phase 1 restructuring), workflows-consolidation-2026-q3 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* audit: Complete label prefix governance audit and remediation plan Comprehensive audit of label prefix violations in issues #1500-1600 range. ## Findings Summary - Root cause: Code duplication (defective labeling-agent.js applies bare labels) - Impact: 100+ issues with non-canonical labels - Governance gaps: CLAUDE.md/AGENTS.md incomplete ## Audit Reports Created - LABEL_PREFIX_AUDIT_REPORT.md — Complete findings and root cause analysis - WORKFLOW_CONSOLIDATION_ANALYSIS.md — Workflow conflicts and consolidation plan - REMEDIATION_PLAN.md — Step-by-step fixes with code and scripts - README.md — Index and quick reference guide ## Immediate Actions - Update CLAUDE.md with explicit label creation rules - Update AGENTS.md with label governance section - Delete defective scripts/agents/includes/labeling-agent.js - Implement pre-creation label validation Related: #1290 (Phase 1 restructuring), workflows-consolidation-2026-q3 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * chore: re-trigger CI checks after PR template update * fix: Complete frontmatter in audit report files Add missing frontmatter fields (maintainer, status, stability) to ensure proper validation. - README.md: Added maintainer, stability - REMEDIATION_PLAN.md: Added maintainer, status, stability - WORKFLOW_CONSOLIDATION_ANALYSIS.md: Added maintainer, status, stability - LABEL_PREFIX_AUDIT_REPORT.md: Updated status from in-progress to complete, added stability Fixes README validation failures in PR #1591. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Address Copilot feedback on audit reports and PR template - Fixed workflow trigger description for validate-blocking-status-before-close.yml - Corrected relative paths in project links (./.github → ../../../.github) - Replaced jq YAML parsing with grep for label extraction - Removed reference to non-existent npm run list:labels command - Added Global DoD Checklist to PR template Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Correct frontmatter validation errors in audit report files - Changed file_type from 'report' to 'agent-index' for schema compliance - Updated status from 'complete'/'in-progress' to 'active' (allowed values) - Removed unstable/severity fields not in schema - All 4 report files now pass frontmatter validation Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Standardize footers in audit report files - Updated all 4 report files with standard LightSpeed footer format - Uses consistent 'Built with ☕ and 🚀 by Claude Code Audit · LightSpeedWP' format Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Use governance footer format for audit reports - Updated all 4 report files with governance-approved footer - Footer: 'Maintained by the 🤖 LightSpeedWP Automation Team' - Matches footers.config.yaml governance category requirements Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Bugfix Pull Request
Linked issues
Fixes #993
Context
Root Cause
The blocking relationship metadata was parsed but not enforced. Issues could close inappropriately:
Fix Summary
Implemented bidirectional blocking logic enforcement:
validate-blocking-status-before-close.yml — Prevents blocked issues from closing
Blocked by: #XXXfrom issue bodyvalidate-blocking-issue-before-close.yml — Prevents blocking issues from closing prematurely
Blocks: #XXXfrom issue bodymanage-blocking-status-labels.yml — Automatic status label management
status:blockedlabel when blockers existEnhanced parsing with
hasBidirectionalBlockingflag in metadata scriptVerification
Risk & Rollback
Changelog
Added
status:blockedlabel management based on blocker statushasBidirectionalBlockingflag in issue metadata for bidirectional blocking detectionChanged
issue-pr-metadata.cjsto include bidirectional blocking flagFixed
Checklist (Global DoD / PR)
🤖 Generated with Claude Code