Add daily main to release/14.0 synchronization - #20039
Add daily main to release/14.0 synchronization#20039Jose Perez Rodriguez (joperezr) wants to merge 1 commit into
Conversation
Create snapshot sync PRs with merge-commit auto-merge, preserve conflict resolutions, and document release branch policy and lifecycle. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d8e5f532-f8b5-41e2-a2a3-d7d35623be79
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20039Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20039" |
Tests selector1 / 99 PR test projects · 0 PR jobs · 0 advisory-only targets, from 5 changed files. Selected PR test projects (1 / 99)
Selected PR jobs (0)none Advisory workflow impact (0)none How these were chosen — grouped by what changed📄 📄 📄 🧪 🧪 Job reasonsnone Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The App token cannot merge workflow-file changes, and two immediately mergeable states are handled incorrectly.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
.github/workflows/sync-main-to-release-14.yml — This token cannot reliably synchronize all of main: the first batch created by this PR already… |
|
.github/workflows/sync-main-to-release-14.yml — This ready-state check is narrower than the gh pr merge --auto behavior cited above: GitHub CLI… |
What changed in this PR
Adds automated daily synchronization from main into release/14.0.
Changes:
- Adds snapshot-branch PR creation and auto-merge.
- Adds workflow contract and scenario tests.
- Documents operations and registers watchdog monitoring.
| File | Description |
|---|---|
.github/workflows/sync-main-to-release-14.yml |
Implements synchronization. |
.github/workflows/README.md |
Documents lifecycle and policies. |
.github/workflows/monitor-scheduled-workflows.config.json |
Registers watchdog monitoring. |
tests/Infrastructure.Tests/WorkflowScripts/SyncMainToRelease14Tests.cs |
Adds workflow tests. |
tests/Infrastructure.Tests/WorkflowScripts/sync-main-to-release-14.harness.mjs |
Simulates API scenarios. |
| permission-contents: write | ||
| permission-pull-requests: write |
| // Like `gh pr merge --auto`, merge an already-ready PR normally: | ||
| // GitHub rejects enabling auto-merge when its state is already clean. | ||
| // Pin the reviewed head; do not request an administrative bypass. | ||
| if (pull.mergeable_state === 'clean') { |

Description
Keep the advance
release/14.0integration branch current whilemaindevelops 13.6, without introducing 14.0-only changes into 13.6.main, using the existing Aspire repository App.mainintorelease/14.0, requesting native auto-merge with a merge commit. Preserve ancestry, leave conflicts in an actionable PR, and never overwrite a pending branch or a maintainer's conflict resolution.gh pr merge --autobehavior. No CI-completion merge handler or administrative override is added.mainafter cuttingrelease/13.6.Repository configuration
Repository merge commits must be enabled, while a separate
mainruleset can remain squash-only. Merge commits must be allowed forrelease/14.0, and branch push restrictions must permit the App.For approval-free bot merges, scope an approval-only ruleset to
release/14.0and grant the App pull-request-only bypass there; retain required CI in a separate ruleset without App bypass. Overlapping classic branch protection currently requires one approval and must also be accounted for. Native auto-merge has reported limitations honoring approval bypass; keep a manual approval fallback rather than bypassing CI. This PR changes no repository settings.The separate version-only PR is #20037, targeting
release/14.0and setting 14.0.0-preview.1.Validation
Passed 51 targeted
Infrastructure.Testscases acrossSyncMainToRelease14TestsandMonitorScheduledWorkflowsIntegrationTests, including API behavior, mergeability retries, conflicts, settings, idempotency, identity changes, and failure propagation. Existing.github/workflows/**routing already selectsInfrastructure.Tests; no test-trigger map update is required.Security considerations
The workflow creates an explicitly repository-scoped, short-lived App token with contents and pull-request write permissions. It runs only from
maininmicrosoft/aspire, never checks out or executes branch code, validates the synchronization PR's identity before merge requests, and does not modify protection settings. Required CI must remain outside any approval-bypass ruleset configured by maintainers.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?