[ci-scan-feedback] Read ci-fix head.ref via list/get, not search, to close dedup gap

Open Beginner friendly
#134,305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions
Domain
ci-cd

Research direction

Open .github/workflows/ci-failure-fix.md and read Step 3 on existing-artifact dedup. Verify the guidance uses list_pull_requests for open PRs and pull_request_read get for merged or closed PRs, because search_pull_requests lacks head.ref. Done means the instructions build the dedup map from returned head.ref values and treat an empty map as not yet enumerated.

Written by the indexing model from the issue text.

Description

agentic-workflows untriaged

Triggering signals

  • #134186 / #134134 — help-wanted [ci-fix] PR #134186 (2026-09-18, kind: help, Linked KBE #134061) is an un-deduped twin of confident [ci-fix] PR #134134 (kind: fix, same KBE #134061), both single-file 2-line LibraryImport safe-annotation changes on ci-fix/134061- head branches. #134134 merged 09-18; #134186 remains open. The fixer's Step 3 branch-prefix dedup key never matched. https://github.com/dotnet/runtime/pull/134186
  • #134276 / #132616 — this exact fix orphaned twice: last tick's [ci-scan-feedback] PR failed its git push and orphaned as issue #134276 (2026-09-19); a month earlier the same diagnosis orphaned as #132616 (2026-08-21). The fix never landed, so the failure mode reproduced. https://github.com/dotnet/runtime/issues/134276
  • Empirical confirmationsearch_pull_requests result items expose keys [number, title, state, pull_request, body, labels, ...] with no head/head.ref, whereas list_pull_requests and pull_request_read get both return head.ref (e.g. #134186 -> ci-fix/134061-apple-runner-safety-...). Step 3 instructed the agent to parse head.ref from search results, so the ci-fix/- dedup map was always empty.

Proposed edits

  • .github/workflows/ci-failure-fix.md (Step 3 — Existing-artifact dedup, line ~211) — replace the "enumerate every [ci-fix] PR ... parsing head.ref" instruction with an explicit note that search_pull_requests returns no head field, and direct the fixer to read head branches from list_pull_requests (state: open) for open candidates and pull_request_read get for merged/closed candidates. Add that an empty branch map means "not yet enumerated", not "no open PR".

Expected behavior change

The next fixer run builds the <kbe> -> [PRs] dedup map from head.ref values actually present in the response — list_pull_requests for open PRs and pull_request_read get for merged/closed ones — instead of from search_pull_requests items that never carry a head field. This closes the residual dedup gap that let help-wanted PR #134186 be filed against KBE #134061 while #134134 was already open: the fixer detects the open ci-fix/134061- branch and skips with open fix PR #134134 already exists rather than opening a duplicate. This edit lands directly (not as a re-filed feedback issue) because the identical prompt change has now orphaned twice on failed PR pushes (#132616, #134276).

[!NOTE]
AI/Copilot-generated (ci-scan-feedback). Prompt-only edit to .github/workflows/ci-failure-fix.md.

Resolves dotnet/runtime#134276

Generated by CI Outer-Loop Failure Scanner — Feedback · opus48 · 961.2 AIC · ⌖ 19.2 AIC · ⊞ 18.2K ·


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Original error: The process '/usr/bin/git' failed with exit code 1

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 35511965948 -n agent -D /tmp/agent-35511965948

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-35511965948/aw-ci-scan-feedback-fixer-dedup-headref-listget.bundle refs/heads/ci-scan-feedback-fixer-dedup-headref-listget:refs/bundles/create-pr-ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3-12246dde
git update-ref refs/heads/ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3 refs/bundles/create-pr-ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3-12246dde
git checkout ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3-12246dde

# Push the branch to origin
git push origin ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3

# Create the pull request
gh pr create --title '[ci-scan-feedback] Read ci-fix head.ref via list/get, not search, to close dedup gap' --base main --head ci-scan-feedback-fixer-dedup-headref-listget-7090a0294c34b8a3 --repo dotnet/runtime
Dominant language
C#
Stars
18.3k
Forks
5.6k
Avg merge
2d 19h
Merged PRs (30d)
589

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.