Skip to content

Fix bot-opened inter-branch merge policy matching - #36992

Merged
kubaflo merged 1 commit into
mainfrom
pureween-fix-bot-opened-policy
Aug 1, 2026
Merged

Fix bot-opened inter-branch merge policy matching#36992
kubaflo merged 1 commit into
mainfrom
pureween-fix-bot-opened-policy

Conversation

@PureWeen

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Remove the redundant isActivitySender: { issueAuthor: True } predicate from the inter-branch merge Policy Service rule.

The end-to-end retest after #36875 merged created #36989 with the exact expected github-actions[bot] author, title, head, and base, but Policy Service did not approve it or enable auto-merge. The additional issue-author predicate is the unique difference from the proven policy used by dotnet/vscode-csharp, which successfully auto-approves and enables merge-commit auto-merge for equivalent bot-opened inter-branch merge PRs.

For an Opened event, requiring the activity sender to be github-actions[bot] already binds the event to the bot that opened the PR. The exact target branch and fully anchored title checks remain unchanged, and Synchronize remains excluded.

Verification

  • The branch contains exactly one commit relative to main.
  • .github/policies/resourceManagement.yml parses as YAML.
  • git diff --check passes.
  • The PR diff is exactly one file with two deletions.
  • The inter-branch rule retains the exact bot sender, Opened action, target branches, anchored titles, approval, and merge-method auto-merge actions.
  • Compared against the live known-good dotnet/vscode-csharp Policy Service rule and PR GraphicsView does not call Drawable's Draw() after each Invalidate on iOS #9595, where dotnet-policy-service approved and enabled MERGE auto-merge for a github-actions[bot] inter-branch merge PR.

Issues Fixed

Follow-up to #36875. Replaces #36990, whose branch retained the original squash-merged PR history.

Remove the redundant issue-author predicate that does not match App-authored pull request events. The Opened action and github-actions bot sender already bind the rule to the bot-created PR event.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1b2b2dd6-bf5f-4179-8a8f-c4c85b9bce26
Copilot AI review requested due to automatic review settings July 31, 2026 17:15
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:15 — with GitHub Actions Inactive
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36992

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36992"

@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:16 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:17 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:19 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:20 — with GitHub Actions Inactive
@github-actions github-actions Bot added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Jul 31, 2026
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool July 31, 2026 17:21 — with GitHub Actions Inactive

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adversarial review: no issues found

All 3/3 independent reviewers agreed that removing the extra issueAuthor: True predicate is the correct, narrowly scoped fix.

  • The retained github-actions[bot] sender condition still gates the Opened event.
  • Synchronize remains excluded.
  • Exact target branches and fully anchored title patterns remain unchanged.
  • Approval and auto-merge still use a true merge commit and remain subject to branch requirements.
  • The change matches the proven Policy Service pattern used by an equivalent live inter-branch merge flow.

Test coverage: There is no in-repo execution harness for Policy Service rules. The failed fresh Opened event on #36989 provides the reproduction, and the equivalent working rule/PR provides comparative evidence. A fresh post-merge Opened event remains the definitive end-to-end validation.

Prior review status: No earlier reviews or unresolved review findings were present on this replacement PR.

Methodology: 3 independent reviewers with adversarial consensus. Review event: COMMENT.

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 GitHub Policy Service configuration for automated inter-branch merge pull requests by removing an extra isActivitySender predicate that was preventing the rule from matching/triggering as expected for github-actions[bot]-opened PRs.

Changes:

  • Remove the redundant isActivitySender: { issueAuthor: True } condition from the inter-branch merge PR rule in Policy Service.
  • Keep the existing constraints intact (Opened-only action, exact bot sender, exact target-branch allow-list, fully anchored title regexes, and auto-approve + merge-commit auto-merge actions).
Show a summary per file
File Description
.github/policies/resourceManagement.yml Simplifies the inter-branch merge Policy Service matcher by removing the extra activity-sender predicate so bot-opened merge PRs can be approved/auto-merged as intended.

Copilot's findings

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

@kubaflo kubaflo 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.

Adversarial review — NEEDS_DISCUSSION (low confidence)

Opus 5, GPT-5.6 Sol, Gemini 3.1 Pro, the MAUI expert reviewer, and final GPT-5.6 Terra arbitration found no material, non-duplicate defect attributable to a changed line. This patch contains only two deletions, so there is no valid RIGHT-side inline anchor; the expert findings output was empty.

Cross-pollination confirmed that removing the additional author-equality predicate cannot widen reachable real pull_request.opened events. The retained github-actions[bot], Opened, exact title, and target-branch constraints remain; Synchronize remains excluded, stale approvals are dismissed after a push, and normal merge requirements still gate auto-merge. The previously discussed bot-provenance boundary from #36875 is unchanged and is not duplicated here.

CI/evidence: license/cla and GitOps/YmlSchemaValidation passed. Required maui-pr was skipped by path filtering, no inspectable AzDO build exists, and Policy Service has no pre-merge end-to-end harness. That evidence gap prevents a textual LGTM and caps confidence at low.

Prior review reconciliation: the existing comments-only reviews contain no error findings, and there are no inline comments to reconcile.

Operational caveat: “unique difference” is not literal byte-for-byte policy identity. The next generated bot-authored pull_request.opened event should be checked explicitly for Policy Service approval and merge-method auto-merge; if it still misses, the behavior fails closed and the remaining matcher/config-ingestion assumptions need revisiting.

Methodology: three independent frontier-model reviews, full peer cross-pollination, MAUI expert verification, and final Terra arbitration. Review event: COMMENT only.

@kubaflo
kubaflo merged commit a1521ed into main Aug 1, 2026
13 of 14 checks passed
@kubaflo
kubaflo deleted the pureween-fix-bot-opened-policy branch August 1, 2026 16:53
@github-actions github-actions Bot added this to the .NET 10 SR10 milestone Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants