Skip to content

Rust: Allow rust-analyzer update workflow to change any file - #23332

Open
paldepind wants to merge 1 commit into
mainfrom
rust/workflow-perm
Open

paldepind wants to merge 1 commit into
mainfrom
rust/workflow-perm

Conversation

@paldepind

@paldepind paldepind commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

It has happened a bunch of times that the rust-analyzer update workflow failed with "Cannot create pull request: patch modifies files outside the allowed-files list".

Iterating on these failures is slow as we need to create a PR and get it merged for every iteration.

Keeping the list of paths in sync with whatever an update ends up touching isn't worth it, since the workflow is only run manually and the resulting PR is reviewed anyway. This replaces the list with **.

Once the workflow is being changed less and when we later begin running the workflow more automatically (say every week) then we can reinstate this list if we feel it's important.

The workflow failed to create a pull request because the update touched
files outside the allowed-files list. The workflow is only run manually
and its output is reviewed, so allow changes anywhere in the repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 87066ae7-ba95-48f2-83cf-d25ede554366
- "rust-toolchain.toml"
- "rust/**"
- "misc/bazel/3rdparty/**"
- "**"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My understanding is that this will allow the agent to edit any files in the PR it creates. This is not much different from running an agent locally which can also edit any file. We and CCR will still review the PR.

@paldepind
paldepind marked this pull request as ready for review December 2, 2026 14:31
@paldepind
paldepind requested a review from a team as a code owner December 2, 2026 14:31
Copilot AI adaptive review requested due to automatic review settings December 2, 2026 14:31

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.

🔵 Needs a closer look

Expanding the agent’s patch scope from Rust-specific paths to the entire repository requires maintainer judgment on whether manual dispatch and draft-PR review provide sufficient safeguards.

No open issues 🎉

What changed in this PR

Removes the rust-analyzer update workflow’s explicit file allowlist to prevent update PRs from failing when additional paths change.

Changes:

  • Replaces the allowlist with **, documenting the manual-run and review rationale.
  • Updates the generated workflow configuration while preserving existing protection settings.
File Description
.github/​workflows/​update-rust-analyzer.md Broadens allowed paths and explains why.
.github/​workflows/​update-rust-analyzer.lock.yml Synchronizes generated settings and metadata.

Review effort: Balanced (adaptive)

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.

🔵 Needs a closer look

Replacing the Rust-specific allowlist with a repository-wide wildcard expands the agent’s permitted changes and requires human confirmation that the remaining review and protected-file safeguards are sufficient.

No open issues 🎉

Review effort: Balanced (adaptive)

This branch has not been deployed

No deployments
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