[copilot-opt] Retry-blocked: repeated failed 'fix failing GitHub Actions job' PRs on copilot/fix-github-actions-job
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 541
- Avg merge
- 5h 48m
- Merged PRs (30d)
- 773
Description
### Problem
The recurring task "fix the failing GitHub Actions job" is dispatched to Copilot as a generic, low-context prompt each time a CI job fails, repeatedly producing PRs that are closed without merging on unrelated root causes. This is a retry-blocked topic: four separate Copilot PRs under the `copilot/fix-github-actions-job*` branch family were closed without merging.
### Evidence
- Analysis window: 2026-08-31 to 2026-09-14 (14-day scope); duplicate-pattern detection scanned the full available PR dataset (2026-08-18 to 2026-09-14)
- Sessions analyzed: 50 GitHub Actions runs in `sessions-list.json`
- Key metrics/examples:
- Branch-normalized grouping of CLOSED/not-merged PRs shows `copilot/fix-github-actions-job` with 4 closed attempts: ``#54732`` (2026-08-22), ``#54912`` (2026-08-22), ``#60199`` (2026-09-11), ``#60645`` (2026-09-13)
- Each PR addressed a completely different root cause (Codex auth 401, Docker sbx filesystem policy, Jira smoke-test credentials, and an unstarted "[WIP]" stub) — confirming the prompt gives the agent only a job URL with no persisted context on prior fixes in this family
- ``#54912`` additionally shows the underlying "Threat Detection Engine Failure" tooling error blocking the automated PR reviewers (Ponytail Reviewer, Test Quality Sentinel, Design Decision Gate, Matt Pocock Skills Reviewer, PR Code Quality Reviewer) from completing, likely contributing to its closure without merge
- ``#60645`` was closed less than a minute after creation with an empty "[WIP]" body and no comments, indicating the triggering job failure was transient/already resolved before the agent produced a fix
### Proposed Change
1. Before dispatching a new "fix failing GitHub Actions job" task, check whether an open or recently-closed PR already targeted the same job/workflow name in the last 14 days, and if so, surface that history to the new agent session as prior-attempt context instead of a fresh, context-free prompt.
2. Add a short-circuit: if the triggering job now passes on re-check (transient failure), skip dispatching the agent entirely rather than opening a PR.
### Expected Impact
- Reduces duplicate/wasted agent sessions on the same recurring CI-failure topic
- Avoids opening PRs for already-self-resolved transient failures
- Gives the agent enough context to avoid re-attempting a fix that was already tried and abandoned
### Notes
- Distinct root cause category: duplicate-PR / retry waste reduction
- Data quality caveat: no `events.jsonl`/conversation logs were available for these sessions; findings are based on GitHub PR metadata (Phase 3) rather than per-session tool traces
### Prior Failed Attempts
The following Copilot PRs on this topic were closed without merging before this issue was created:
| PR | Closed (YYYY-MM-DD) | Close reason |
|----|---------------------|--------------|
| ``#54732`` | 2026-08-22 | scope-mismatch (fixed Codex auth env, unrelated to triggering job; no comments) |
| ``#54912`` | 2026-08-22 | ci-failure (blocked by "Threat Detection Engine Failure" tooling error in automated reviewers) |
| ``#60199`` | 2026-09-11 | reviewer-rejected (automated reviewer requested added test coverage before merge) |
| ``#60645`` | 2026-09-13 | scope-mismatch ("[WIP]" stub closed within a minute, empty body, no fix content) |
**Retry count: 4 — human review required before a new implementation attempt.**
Any agent attempting to implement this recommendation MUST read this section and the linked PRs, address all close reasons, and post a plan comment on this issue before opening a new PR.
> Generated by [⚡ Copilot Opt](https://github.com/github/gh-aw/actions/runs/34876283982) · copilot · auto · 85.8 AIC · ⌖ 10.5 AIC · ⊞ 8.5K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+is%3Aissue+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fcopilot-opt%22&type=issues)
Contributor guide
Research direction
Start with the 50 GitHub Actions runs in sessions-list.json and the branch-normalized PR history for #54732, #54912, #60199, and #60645. Trace the Copilot Opt workflow and verify that same-job history is surfaced and passing retries are skipped; done means duplicate or transient-failure PRs are no longer dispatched.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100