Skip to content

Fix release branch version conflict handling - #1666

Open
David Pine (IEvangelist) wants to merge 3 commits into
mainfrom
ievangelist-fix-release-branch-sync
Open

David Pine (IEvangelist) wants to merge 3 commits into
mainfrom
ievangelist-fix-release-branch-sync

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • resolve src/frontend/config/aspire-versions.mjs by taking main's config structure while retaining version assignments already owned by the release branch
  • preserve newly added exports and placeholders such as currentAspirePreviewVersion and %ASPIRE_VERSION_PREVIEW%
  • preserve a release-owned preview assignment when present; fall back to main only when the older release file has no such assignment
  • continue keeping curated documentation content and imagery from the release branch
  • abort explicitly if either config shape no longer contains the expected version assignments

Semantic consumers verified

The simulated merged tree contains functional preview-version consumers in:

  • src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx
  • src/frontend/src/content/docs/integrations/cloud/azure/azure-data-explorer.mdx
  • src/frontend/src/content/docs/integrations/devtools/browser-logs.mdx
  • src/frontend/src/content/docs/reference/cli/commands/aspire-doctor.mdx
  • src/frontend/tests/unit/aspire-version-placeholders.vitest.test.ts

Release pin disposition

The incoming unit test intentionally asserts that the stable and preview config constants match the site AppHost SDK and FrontDoor package. Repository release guidance requires the same alignment and classifies stale or nonexistent values as critical.

release/13.6 currently has currentAspireVersion = 13.6.0, while its AppHost remains on stable 13.5.3 and FrontDoor 13.5.3-preview.1.26425.3. As of September 15, 2026, public NuGet lists no 13.6 AppHost SDK or FrontDoor preview package. Therefore the branch is in a pre-release inconsistent state; this PR does not establish or change those pins, and should not by itself be treated as evidence that release/13.6 is ready to sync.

The smallest final policy-compliant release fix is to update the AppHost SDK, FrontDoor package, stable config assignment, and preview config assignment together once matching published 13.6 versions exist. If the branch must be made internally consistent before then, the release owner must explicitly choose whether to retain the currently published 13.5.3 pair instead of advertising 13.6 package versions.

Validation

  • parsed and formatting-checked the workflow with Prettier
  • extracted the full merge step and passed bash -n
  • confirmed git merge-tree --write-tree upstream/release/13.6 upstream/main reports exactly the version config and two dashboard documentation conflicts
  • ran the updated workflow logic in detached temporary worktrees without mutating release/13.6
  • verified the current older release file falls back to main's newly introduced preview assignment
  • verified a synthetic future release-owned preview assignment is preserved instead of overwritten
  • imported the resolved config and verified the preview placeholder map remains functional

Treat the Aspire version configuration as release-owned so automated main-to-release merges preserve the release branch metadata.

Co-authored-by: Copilot App <[email protected]>
Copilot AI lite review requested due to automatic review settings September 15, 2026 15:56

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.

🟢 Approval recommended

No unresolved issues were identified, and validation confirms the intended conflict handling.

Pull request overview

Updates automated release-branch merges to preserve release-specific version metadata.

Changes:

  • Classifies aspire-versions.mjs as release-owned.
  • Clarifies conflict-resolution comments without broadening curated paths.
File summaries
File Description
.github/workflows/update-release-branch.yml Preserves release version metadata during automated merges.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Merge the version config from main while retaining the release branch's stable documentation pins, so new preview exports and placeholders remain available.

Co-authored-by: Copilot App <[email protected]>
Retain a release branch preview assignment when present while still accepting the newly introduced preview structure from main for older release files.

Co-authored-by: Copilot App <[email protected]>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1666. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1666 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

while IFS= read -r f; do
[ -z "$f" ] && continue
if is_generated "$f"; then
if [ "$f" = "src/frontend/config/aspire-versions.mjs" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How often do you think this file is going to change? Is it worth this?

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.

Every time we ship a new rev of Aspire, patches included.

main_version_count++
next
}
/^export const currentAspirePreviewVersion = / {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this need to be updated every time we add a line to the versions.mjs file?

David Pine (IEvangelist) added a commit that referenced this pull request Oct 13, 2026
## Summary

`Update Release Branch` currently fails on every push to `main` once a
merge into `release/X.Y` has a real conflict that the helper can't
auto-resolve (e.g. runs 38433783235 and 38436114463 on
`component-props.contracts.ts`). It stays red until someone notices and
repairs the branch by hand.

- The merge helper now exits `3` for "conflicts need human review"
(merge aborted, release untouched) instead of a generic failure.
- A new `--commit-conflicts` mode commits the merge with conflict
markers left in the unresolved files, keeping both parents, and writes
the conflicted paths to `$RELEASE_SYNC_CONFLICTS_FILE`.
- On exit `3` the workflow pushes a rolling `release-sync/X.Y` branch
and opens a **draft** PR into `release/X.Y` that lists the conflicts and
the "Create a merge commit, never squash" instructions. The run finishes
green with a warning and summary link.
- Before doing any work, the workflow checks for an open PR from
`release-sync/X.Y`. If one exists it skips the sync, so pushes to `main`
no longer repeat the same failure while a human resolves it. After the
repair merges, the next push resumes syncing.
- The app token now requests `pull-requests: write` (already granted for
`update-integration-data.yml`).

Non-conflict failures (push rejection, fatal git errors) still fail the
job as before. This is independent of #1701 (push-race retry) and #1666
(version config conflicts) and composes with them.

## Third-party links and affiliations

None

## Validation

- `bash .github/scripts/test-merge-main-into-release.sh`: all cases
pass, including new exit-code `3`, `--commit-conflicts` with conflicts,
and `--commit-conflicts` on a clean merge.
- `bash -n` on the three workflow `run` blocks (extracted from the
YAML): passed.
- `prettier --check` on the workflow: passed after `--write`.
- Dry run against the real `origin/release/17.0` and `origin/main` in a
temporary worktree: the default mode aborts with exit `3`, and
`--commit-conflicts` produces a two-parent merge listing
`src/frontend/tests/typecheck/component-props.contracts.ts` with a clean
working tree.
- Not run: the workflow end-to-end (PR creation and the skip check need
Actions with the app token).

---------

Co-authored-by: David Pine <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@IEvangelist

Copy link
Copy Markdown
Member Author

Project docs-review applicability

Reviewed PR #1666 targeting main at 088f17d8eb1c40930493613e51cb13d9552242a8 using the repository's doc-pr-reviewer skill and its doc-tester dependency.

Phase A - claim verification: not applicable. The complete change set is one workflow, .github/workflows/update-release-branch.yml (+80/-8). There are no changed documentation pages, examples, or Aspire product/API claims to verify: 0 claims, all verdict counts 0. No Aspire, Community Toolkit, or Azure SDK source repository was needed or consulted.

Phase B - documentation testing: not applicable. No affected documentation routes or rendered content exist in this diff. No docs server, browser, Aspire application, or site build was started; this is not a claim that documentation runtime tests passed. Workflow merge/conflict behavior belongs to the separate code review that follows.

This records the once-per-PR docs stage only; it is not an approval or request-changes verdict.

@IEvangelist

Copy link
Copy Markdown
Member Author

Project code review

Reviewed the complete workflow change at 088f17d8eb1c40930493613e51cb13d9552242a8 against exact base a30b4da0a09ca84a72f57c945ebfcb2d90712c07 (main), following the repository's .agents/skills/code-review/SKILL.md correctness, failure-handling, and coverage guidance. This is a top-level report, not a formal review verdict.

Medium

.github/workflows/update-release-branch.yml:152-212 - The new release-version resolver has no committed regression coverage.

Why it matters: this adds a new automated conflict-resolution policy that decides which version assignments are published on release. The important branches are materially different: preserve an existing release preview, introduce a missing preview from main, retain main's new exports/placeholders, or reject missing/duplicate assignments. The changed-file list contains only the workflow, and the checks/workflow tree at this exact head do not contain a release-merge fixture suite. Green site CI therefore does not exercise this policy.

Suggested fix: add a small disposable-Git-repository shell fixture test and run it in CI. Cover those resolver branches, unsuccessful file reads/staging, and verify that failures leave the release tip unchanged with no merge in progress; successful cases should retain both merge parents and import a working placeholder map. This is internal-logic coverage, not a request for site E2E or accessibility tests.

Behavior verified and scope limits

The normal text-conflict path preserves release stable/major-minor/preview assignments, accepts main's new structure, and supplies main's preview when release has none. Importing the resolved module confirmed functional stable/preview placeholders and the new export. Malformed conflicting assignments and injected mktemp, git show, and staging failures aborted without changing the release tip. Ordinary text-conflict replacement failure was caught by the existing conflict-marker guard. Unknown conflicts still abort; generated-data mirroring and curated-content retention still work. Successful merges retained the exact release/main parents and a clean checkout; already-integrated main remained a no-op.

A clean main-only version bump bypasses this conflict-only helper and takes main's pins. The exact base does the same, so this is an inherited policy limit, not an introduced regression or a second finding. No new production correctness defect was established beyond the missing durable coverage above. Existing maintenance-cadence discussion and release-package alignment caveats in the PR body were not duplicated as findings.

Test coverage

  • Extracted the merge shell from both pinned workflow versions: bash -n passed.
  • Executed 18 paired base/head fixture scenarios, with targeted reruns for malformed shapes and module import. The fixtures ran under Git for Windows Bash/GNU awk, not an Ubuntu Actions runner. They used local repositories without remotes; only the network boundaries were substituted (fetch became a local tracking-ref update, push became a sentinel). No repository workflow was dispatched and no branch was pushed.
  • Confirmed current-head GitHub checks are green, but they are not workflow-behavior coverage. Newer helper scripts in the review workspace are absent from this PR's pinned tree and were not credited as its tests.
  • Site build, frontend unit/E2E, and axe checks were not run locally: no site/UI behavior changes here. These disposable review controls are not committed regression tests and do not close the coverage finding.

Copy link
Copy Markdown
Member Author

docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]

Recommendation: needs human

Source used: n/a — workflow/script change (update-release-branch.yml)
PR status: non-draft, merge conflicts with base, maintainer-authored (IEvangelist), opened 2026-09-15 — STALE (~49 days); 1 file.

Phase A — claims

  • ❓ CI logic for release-branch version merges; not verifiable as docs. Rebase and maintainer review required.

Phase B — doc-tester

Not run; rendering of the changed pages is not browser-checked.

🤖 Posted by aspire.dev - squad (AI Agent)

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