Skip to content

[ci-scan-feedback] Fix push to existing feedback PR on scheduled runs#7620

Merged
kotlarmilos merged 2 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/ci-scan-feedback-push-target
Jun 9, 2026
Merged

[ci-scan-feedback] Fix push to existing feedback PR on scheduled runs#7620
kotlarmilos merged 2 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/ci-scan-feedback-push-target

Conversation

@kotlarmilos

@kotlarmilos kotlarmilos commented Jun 8, 2026

Copy link
Copy Markdown
Member

Problem

The CI Failure Scanner - Feedback (machinelearning) workflow runs on a daily schedule, so there is no triggering pull request. Its push-to-pull-request-branch and update-pull-request safe-outputs defaulted to target: triggering, which fails at runtime with push-to-pull-request-branch with target "triggering" requires pull request context and cancels the remaining safe outputs.

Step 6 of the prompt instructs the agent to push new edits onto the existing [ci-scan-feedback] PR when one is open. That push can never succeed on a scheduled run. (This is the same defect being fixed in dotnet/runtime#129132.)

Fix

  • Set target: "*" on push-to-pull-request-branch and update-pull-request so they operate on the PR the agent discovers in Step 6 rather than a (nonexistent) triggering PR. This mirrors update-issue, which already uses target: "*".
  • Constrain push-to-pull-request-branch with title-prefix: "[ci-scan-feedback] " so it can only push to the feedback PR.

.lock.yml regenerated with gh aw compile (v0.71.5, matching the committed compiler version).

The feedback workflow runs on a schedule, so there is no triggering pull
request. push-to-pull-request-branch and update-pull-request defaulted to
target: triggering, which fails with "requires pull request context" and
cancels the remaining safe outputs, so the agent can never add commits to
the existing [ci-scan-feedback] PR.

Set target: "*" on both so they operate on the PR discovered in Step 6,
and constrain push-to-pull-request-branch with title-prefix
"[ci-scan-feedback] " so it can only push to the feedback PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 8, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the gh-aw safe-outputs configuration for the CI Failure Scanner - Feedback (machinelearning) agentic workflow so scheduled runs (which have no triggering PR context) can correctly push updates to an already-open [ci-scan-feedback] feedback PR.

Changes:

  • Configure push-to-pull-request-branch to use target: "*" and restrict pushes to PRs whose titles start with [ci-scan-feedback] .
  • Configure update-pull-request to use target: "*" so it can update the discovered feedback PR on scheduled runs.
  • Regenerate the compiled .agent.lock.yml with the updated safe-outputs settings.
Show a summary per file
File Description
.github/workflows/ci-scan-feedback.agent.md Updates safe-outputs configuration to support scheduled runs updating an existing feedback PR.
.github/workflows/ci-scan-feedback.agent.lock.yml Regenerated compiled workflow reflecting the updated safe-outputs configuration.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread .github/workflows/ci-scan-feedback.agent.md
Set title: false so the update-pull-request safe-output can only append
to the feedback PR body, not rename it. Reduces blast radius if the agent
selects the wrong PR under target: "*".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos kotlarmilos enabled auto-merge (squash) June 9, 2026 09:23
@kotlarmilos

Copy link
Copy Markdown
Member Author

/ba-g build analysis is taking too long (>1h)

@kotlarmilos kotlarmilos merged commit 0d91f7f into dotnet:main Jun 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants