[AI Ops] Close issue #32 child labeling gaps#412
Conversation
|
Warning Review limit reached
More reviews will be available in 43 minutes and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Note
|
🔍 Reviewer Summary for PR #412CI Status: ✅ Recommendations
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new repo-local Markdown instructions file and updates the labeling agent script to map accessibility keywords and branch prefixes to the canonical type:a11y label instead of type:accessibility. It also adds safety checks to ensure detected labels are canonical before applying them. The review feedback highlights three main issues: a potential TypeError in the labeling agent if a PR description is null, incorrect nesting syntax in the Markdown instructions example, and a requirement to document the label migration in /docs/MIGRATION.md.
| const detectedType = detectIssueTypeFromContent(title, body); | ||
|
|
||
| if (detectedType) { | ||
| if (detectedType && canonicalSet.has(detectedType)) { |
There was a problem hiding this comment.
If the issue or pull request has an empty description, body will be null. Since detectIssueTypeFromContent does not handle null values defensively (it calls body.toLowerCase()), this will throw a TypeError: Cannot read properties of null (reading 'toLowerCase') and fail the content-based type detection step.
To prevent this, ensure body and title are guarded or defaulted to empty strings before being passed, or update detectIssueTypeFromContent to handle null/undefined values.
| ```markdown | ||
|
|
||
| ```bash | ||
| npm run lint:md | ||
| ``` | ||
|
|
||
| ``` |
There was a problem hiding this comment.
The example code block is not nested correctly. In Markdown, to nest a fenced code block inside another, the outer block should use more backticks (e.g., four backticks ````) than the inner block (three backticks ```). Otherwise, the first inner closing/opening backticks will prematurely close the outer block.
Update the outer block to use four backticks:
````markdown
```bash
npm run lint:md
```| a11y: "type:a11y", | ||
| accessibility: "type:a11y", | ||
| wcag: "type:a11y", |
There was a problem hiding this comment.
The mapping of type:accessibility to type:a11y represents a label migration. Please ensure this migration is documented in the central /docs/MIGRATION.md file so that contributors can follow the migration rules across the repository.
References
- Document migration maps and notes in a central
/docs/MIGRATION.mdfile to ensure contributors can follow migration rules mentioned in README files across the repository.
Summary
This PR completes the remaining child issue work for parent #32 by fixing live labeling bugs and finishing markdown standards alignment.
Implemented
labeling.agent.js(type:accessibility->type:a11y).ref: developto allow correct event ref context..github/instructions/markdown.instructions.mdwith canonical scope, cross-references, accessibility guidance, validation steps, and contribution/review section.Validation
node scripts/agents/includes/check-template-labels.jsnpm run validate:workflowsnpx markdownlint-cli2 .github/instructions/markdown.instructions.mdnpm run test:js -- scripts/agents/__tests__/labeling.agent.test.jsgit diff --checkCloses #38
Closes #39
Closes #40
Closes #41
Closes #42
Closes #43
Closes #44
Closes #45
Closes #32