Skip to content

Change protected-files policy to 'allowed' for labelops-pr-maintenance workflow#19783

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/gh-aw-honor-nowarn-option
Draft

Change protected-files policy to 'allowed' for labelops-pr-maintenance workflow#19783
Copilot wants to merge 2 commits into
mainfrom
copilot/gh-aw-honor-nowarn-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

The labelops-pr-maintenance workflow merges from main to resolve conflicts, which naturally includes upstream changes to protected files in the merge commit. The fallback-to-issue policy was treating these as agent-invented modifications and blocking the push.

  • Changed protected-files: fallback-to-issueprotected-files: allowed in safe-outputs config
  • Recompiled lock file

The prompt-level hard rule ("Never modify .github/**") remains the guardrail against the agent inventing changes to protected files. The safe-outputs enforcement is the wrong layer for this — merge commits from upstream are not agent decisions.

…e workflow

The workflow resolves merge conflicts by merging from main, which naturally
includes changes to protected files. The previous 'fallback-to-issue' policy
blocked these normal merge operations. The prompt still has "Never modify
.github/**" as a hard rule to prevent the agent from inventing changes.

Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/504efc52-c37e-4a2c-9492-b496e7061d77

Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix command-line option warnings for protected files Change protected-files policy to 'allowed' for labelops-pr-maintenance workflow May 21, 2026
Copilot finished work on behalf of T-Gro May 21, 2026 09:26
Copilot AI requested a review from T-Gro May 21, 2026 09:26
Copy link
Copy Markdown
Member

@T-Gro T-Gro left a comment

Choose a reason for hiding this comment

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

Review

The change itself is mechanically correct — allback-to-issue was indeed blocking merge commits that carry upstream .github/** changes, and �llowed unblocks that.

One issue: stale documentation in the same file.

Line 63 of labelops-pr-maintenance.md still says:

  1. Never modify .github/**. Protected by fallback-to-issue.

This is now inaccurate since the enforcement layer was removed. It should be updated to reflect the current guardrail (prompt-level hard rule only), e.g.:

  1. Never modify .github/**. (prompt-enforced; safe-outputs allows it for merge commits from upstream)

Otherwise the next person reading the workflow source will assume there's still a compile-time policy backing that rule.

Minor security note: moving from policy enforcement to prompt-only enforcement reduces defense-in-depth. If there's ever a protected-files: allow-from-merge option (or similar), that would be the ideal middle ground. For now, the tradeoff seems acceptable given the workflow's limited scope.

LGTM with the doc fix above.

@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label May 25, 2026
@T-Gro T-Gro self-requested a review May 25, 2026 11:36
@github-actions
Copy link
Copy Markdown
Contributor

✅ No release notes required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-reviewed PR reviewed by AI review council

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

[gh-aw] Protected Files: Honor --nowarn for command-line option warnings

2 participants