You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(labels): recover missing issue types from form headings - #1973
Extend the issue-open fallback to recover a missing type:bug, type:feature, type:docs or type:question only when current API body headings uniquely match a complete current form signature.
Preserve every existing label; recover status and type independently. Ignore fenced code, unknown/incomplete/ambiguous structures, issue titles and answer prose.
Keep all four forms, minimum permissions, pinned action and existing event scope unchanged; update docs and regression coverage.
📂 Changes
File
Change
.github/workflows/issue-status-fallback.yml
Conservative required-heading signatures; independent additive status/type recovery from current API metadata
.github/scripts/issue-status-fallback.test.mjs
All four forms, namespace independence, current body, ambiguity/incomplete/unknown bodies, code fences, API errors and form-signature drift guard
CONTRIBUTING.md
Document recovery rules, exclusions and inherited API race limitation
git diff --check — clean; exactly three authorized paths and clean candidate worktree.
Ephemeral differential — worker compared 90 identical-input paths against the previous workflow; existing status behavior/original labels preserved, allowing only requested type additions and associated write failures. Probe is not a committed Git-history-dependent test.
Independent verifier PASS — 56 additional mocked probes with fixtures derived from current forms, including optional fields, malicious-looking answer text, ambiguity, fences and line endings.
Native risk/readability/reliability review approved for 4b41e1c; exact acknowledgement completed (review-fd4f682b5bed1403).
GitHub CI full unit/E2E/lint and applicable checks — pending actual hosted results.
No Go code changes. Local mocked API execution does not prove hosted event delivery/token capability. No live issue mutation was used for these tests; updated issue-open behavior requires default-branch integration. Historical worker RED/differential evidence was reported by the writer, not independently re-created.
✅ Contributor Checklist
Linked an approved issue with an actual assignee.
Exactly one type label.
Recorded focused regression, affected suite and additional verification evidence.
Identified missing hosted/CI proof.
Contributor docs updated alongside behavior.
Conventional commit without Co-Authored-By trailers.
All changed paths comply with the Transient Artifact Policy.
💬 Notes for Reviewers
Risk: item 5 — write-capable GitHub Actions workflow; shared existing status fallback also warrants regression protection (item 3).
This is a recovery fallback, not a diagnosis of missing native form labels. A complete heading match is not proof of web-form origin; manually copied form structure intentionally matches too. Existing types/statuses always win. No backfill, edit/unlabeled events, title/prose classifier, AI, priority/effort/approval inference or form changes.
GET and addLabels remain non-atomic: a concurrent maintainer label addition can produce multiple namespace labels. This inherited limitation is documented, not hidden or expanded into broad reconciliation.
Published through the documented fork workflow. No upstream rule changes, bypass or merge.
Summary by CodeRabbit
Bug Fixes
Improved issue label recovery for newly opened issues.
Adds status:needs-review only when no existing status label is present.
Infers a type label only when exactly one valid form signature matches the current issue body.
Preserves existing labels and avoids classification for incomplete, ambiguous, or fenced content.
Documentation
Clarified issue status fallback behavior, supported classifications, and cases that remain for manual triage.
Reviewing files that changed from the base of the PR and between e7bac81 and 4b41e1c.
📒 Files selected for processing: 3
.github/scripts/issue-status-fallback.test.mjs
.github/workflows/issue-status-fallback.yml
CONTRIBUTING.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.
📝 Walkthrough
The issue-open workflow now adds a missing review-status label and can infer a type label from a uniquely matching current issue-form structure. Tests and contributor documentation cover the rules, boundaries, and limitations.
Changes: Issue label recovery
Layer / File(s)
Summary
Additive status and type recovery .github/workflows/issue-status-fallback.yml
The workflow independently adds status:needs-review when no status label exists and infers a type only when exactly one supported form signature matches. It writes collected labels once and only when additions exist.
Policy tests and documentation .github/scripts/issue-status-fallback.test.mjs, CONTRIBUTING.md
Tests cover supported forms, ambiguous or incomplete bodies, current-body classification, label preservation, and API errors. The documentation describes the policy and its limits.
sequenceDiagram
participant IssueOpenedEvent
participant FallbackWorkflow
participant GitHubIssueAPI
IssueOpenedEvent->>FallbackWorkflow: Start issue-label fallback
FallbackWorkflow->>GitHubIssueAPI: Read current labels and issue body
GitHubIssueAPI-->>FallbackWorkflow: Return labels and current body
FallbackWorkflow->>FallbackWorkflow: Collect missing status and unique type labels
FallbackWorkflow->>GitHubIssueAPI: Add collected labels when present
The change adds missing type labels to newly opened issues when the issue body matches exactly one current form, and it keeps the existing status fallback. No merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: recovering missing issue type labels from form headings.
Linked Issues check
Issue #1972 coding requirements are met. The workflow still runs only for issues: opened, keeps issues: write permissions, and uses the existing pinned actions/github-script action. It reads cur…
Out of Scope Changes check
The changed paths are limited to the issue fallback workflow, its regression tests, and contributor documentation. Each change supports issue #1972. The diff does not change issue forms, event scope, …
Full details: Linked Issues check
Explanation
Issue #1972 coding requirements are met. The workflow still runs only for issues: opened, keeps issues: write permissions, and uses the existing pinned actions/github-script action. It reads current API labels and body, adds status:needs-review only when no status:* label exists, and independently adds one type label only for a unique complete signature from the four current forms. Existing labels remain in place. Fenced code, incomplete, ambiguous, and unknown structures do not produce a type. The workflow does not classify titles or ordinary answer text. Regression tests cover all four forms, label independence, edge cases, API failures, line endings, and form-signature drift. CONTRIBUTING.md documents the behavior and the inherited non-atomic API limitation.
Full details: Out of Scope Changes check
Explanation
The changed paths are limited to the issue fallback workflow, its regression tests, and contributor documentation. Each change supports issue #1972. The diff does not change issue forms, event scope, permissions, label removal handling, backfills, title or semantic classification, AI inference, or unrelated label namespaces.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked Issue
Closes #1972
🏷️ PR Type
type:chore— Maintenance, dependencies, tooling📝 Summary
📂 Changes
.github/workflows/issue-status-fallback.yml.github/scripts/issue-status-fallback.test.mjsCONTRIBUTING.md🧪 Test Plan
node --test .github/scripts/issue-status-fallback.test.mjs— worker observed 7 pass / 4 fail, exit 1, before implementation.node --test .github/scripts/*.test.mjs— 400 pass, exit 0, independently repeated.git diff --check— clean; exactly three authorized paths and clean candidate worktree.No Go code changes. Local mocked API execution does not prove hosted event delivery/token capability. No live issue mutation was used for these tests; updated issue-open behavior requires default-branch integration. Historical worker RED/differential evidence was reported by the writer, not independently re-created.
✅ Contributor Checklist
💬 Notes for Reviewers
Risk: item 5 — write-capable GitHub Actions workflow; shared existing status fallback also warrants regression protection (item 3).
This is a recovery fallback, not a diagnosis of missing native form labels. A complete heading match is not proof of web-form origin; manually copied form structure intentionally matches too. Existing types/statuses always win. No backfill, edit/unlabeled events, title/prose classifier, AI, priority/effort/approval inference or form changes.
GET and addLabels remain non-atomic: a concurrent maintainer label addition can produce multiple namespace labels. This inherited limitation is documented, not hidden or expanded into broad reconciliation.
Published through the documented fork workflow. No upstream rule changes, bypass or merge.
Summary by CodeRabbit
Bug Fixes
status:needs-reviewonly when no existing status label is present.Documentation