fix(ci-coach): fallback to issue when PR touches protected files#21333
Merged
fix(ci-coach): fallback to issue when PR touches protected files#21333
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [aw] Fix CI Optimization Coach workflow failure
fix(ci-coach): fallback to issue when PR touches protected files
Mar 17, 2026
pelikhan
approved these changes
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the CI Optimization Coach workflow to gracefully handle cases where the generated patch touches protected paths (e.g., .github/workflows/ci.yml) by falling back to creating a review issue instead of failing.
Changes:
- Added
protected-files: fallback-to-issueto thecreate-pull-requestsafe-output configuration inci-coach.md. - Recompiled the workflow lockfile so the generated safe-outputs handler config includes
protected_files_policy: "fallback-to-issue".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/ci-coach.md |
Configures create-pull-request safe-output to fall back to an issue when protected files are touched. |
.github/workflows/ci-coach.lock.yml |
Regenerates compiled workflow so the runtime handler config reflects the protected-files fallback policy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The CI Optimization Coach was hard-blocked when it generated a PR touching
.github/workflows/ci.yml, a protected path, with no recovery path.Changes
ci-coach.md: Addedprotected-files: fallback-to-issuetocreate-pull-requestsafe-outputs — when the proposed patch touches protected files, the workflow creates a review issue instead of failing outrightci-coach.lock.yml: Recompiled —protected_files_policy: fallback-to-issuenow present in the safe-outputs handler configWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw C7xplU3lnCWr(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .visibility(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha(http block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.