-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Labels
Description
Objective
Ensure that fallback issues created when create_pull_request fails (push failure or PR API failure) always include the agentic-workflows label so they are visible to the triage/grouping system.
Context
Reported in issue #18980. When create_pull_request.cjs falls back to creating a GitHub issue (on push failure or PR creation failure), it uses only the workflow-configured labels. However, handle_agent_failure.cjs always adds "agentic-workflows" to failure issues, and ensureParentIssue() searches label:agentic-workflows to group failures under [aw] Failed runs. Without this label, push-failure fallback issues are invisible to the triage system.
Location
actions/setup/js/create_pull_request.cjs:
- ~line 726 — push failure fallback
issues.create()call (labels: labels) - ~line 1003 — PR creation failure fallback
issues.create()call (labels: labels)
Approach
- Add a constant and a helper function near the top of the file (or in the fallback section):
const MANAGED_FALLBACK_ISSUE_LABEL = "agentic-workflows";
function mergeFallbackIssueLabels(labels = []) {
const normalizedLabels = labels
.filter(label => !!label)
.map(label => String(label).trim())
.filter(label => label);
return [...new Set([MANAGED_FALLBACK_ISSUE_LABEL, ...normalizedLabels])];
}- Replace
labels: labelswithlabels: mergeFallbackIssueLabels(labels)at bothissues.create()fallback call sites.
Files to Modify
actions/setup/js/create_pull_request.cjs
Acceptance Criteria
- Push-failure fallback issues include
agentic-workflowslabel - PR-creation-failure fallback issues include
agentic-workflowslabel - The
agentic-workflowslabel is deduplicated if it was already inlabels - Existing labels from workflow config are preserved
- Run
make fmt-cjsandmake lint-cjsafter the change
Related to create_pull_request / push_to_pull_request_branch: push failure misattributed as patch failure + fallback issues missing agentic-workflows label #18980
Generated by Plan Command for issue #18980
- expires on Mar 3, 2026, 4:46 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.