Skip to content

[ci] Preserve release-owned data groups when syncing main - #2195

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

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

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Replace unconditional mirroring of generated main data with merge-base-aware release ownership. Data groups unchanged on release merge normally; groups changed on release retain their complete release snapshot, including deletions and renamed version files.

Each group is declared once as Git pathspecs, and the same list drives both detection and restore. The API group is :(glob)src/frontend/src/data/*/** (every data subdirectory, including future ones) plus the three top-level catalogs generated from the same packages; the glob only matches files inside a subdirectory, so those catalogs are listed explicitly. The samples catalog and assets/samples form a second group. Every other top-level data/*.json file is its own group, so untouched files such as GitHub stats still follow main. Hand-authored top-level TypeScript (for example dev-hub.ts, which release edited in #2177) is not data and merges normally instead of silently keeping the release copy. The same policy applies to repair PRs and subsequent syncs, preserving both merge parents.

Related to #2194. Its Aspire 17 data must not be replaced by main's Aspire 13 data.

Third-party links and affiliations

None

Validation

  • bash -n .github/scripts/merge-main-into-release.sh — passed.
  • bash -n .github/scripts/test-merge-main-into-release.sh — passed.
  • bash .github/scripts/test-merge-main-into-release.sh — passed all 20 scenarios. The new hand-authored data code scenario fails against the previous revision.
  • git diff --check — passed.
  • Real-history dry run in an isolated worktree: bash .github/scripts/merge-main-into-release.sh origin/main release/17.0 --commit-conflicts, then git diff --stat origin/release/17.0 HEAD -- src/frontend/src/data src/frontend/src/assets/samples — no data drift. Only the OG renderer conflict, already resolved in Resolve release sync conflicts for release/17.0 #2194, was flagged.
  • Production build not run locally; this change only affects the sync helper and its regression suite.

Merge untouched data normally, but retain release-modified API and sample groups as consistent snapshots across repeated syncs.

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

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.

🟡 Changes recommended

Rename detection hides the source data group from the ownership scan, allowing main’s catalog and package changes into the release despite release-side API changes in that group.

1 open issue
What changed in this PR

This PR updates release synchronization to preserve release-specific data rather than overwrite it with main’s generated data, addressing the Aspire 17 data preservation need described in #2194.

Changes:

  • Detect release-owned data groups using changes since the merge base.
  • Preserve related API data and sample assets together, including during repair merges.
  • Expand regression coverage for independent groups, deletions, renames, and repeated syncs.
File Description
.github/​scripts/​test-merge-main-into-release.sh Updates preservation assertions and adds data-group and repeated-sync scenarios.
.github/​scripts/​merge-main-into-release.sh Replaces unconditional mirroring with merge-base-aware data-group preservation.

Review effort: Balanced

# A release-side change owns its whole data group, including files that main
# adds or renames without a conflict. API versions and sample assets must stay
# consistent with their catalogs. Other top-level data entries are independent.
git diff --name-only -z "$MERGE_BASE" "$RELEASE_SHA" -- \
Automatically include future data subdirectories in the shared API group while retaining independent top-level file and sample ownership.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist) added a commit that referenced this pull request Nov 17, 2026
## Summary

<!-- Describe what this pull request changes and why. -->

Merge `main` (`24fa655677788e02b297ec5f2f6c78ad8275f92d`) into
`release/17.0` without replacing the release's Aspire 17 package and API
data with main's Aspire 13 data.

- Restored `src/frontend/src/data/` exactly to the release branch
snapshot. The final PR has no data changes relative to `release/17.0`.
- Eric resolved the OG renderer conflict, preserving main's cached-layer
rendering optimization and release's per-card fact sheets.
- Added a renderer regression covering per-card facts, distinct fact
values, and cached-base isolation.

The recurring sync policy is fixed separately in #2195: data groups
unchanged on release merge normally; groups changed on release keep
their release snapshot.

Prefer **Create a merge commit** when landing this repair so main
ancestry remains recorded. Release sync remains paused while this PR is
open.

## Third-party links and affiliations

<!--
List any third-party links added or changed by this pull request and
disclose any
material affiliation with the linked organizations, such as employment,
sponsorship, or ownership. Write "None" if this pull request doesn't add
or
change third-party links.
-->

None

## Validation

<!-- List the checks you ran or explain why validation isn't needed. -->

- From `src/frontend`: `node node_modules\vitest\vitest.mjs run --config
vitest.config.ts tests/unit/og-image-renderer.vitest.test.ts
tests/unit/page-metadata.vitest.test.ts` — passed, 65 tests. The
renderer regression initially failed on the unresolved conflict markers;
the tested resolution exactly matches Eric's committed resolution.
- From `src/frontend`: `node node_modules\eslint\bin\eslint.js
src\utils\og-image-renderer.ts
tests\unit\og-image-renderer.vitest.test.ts --max-warnings 0` — passed.
- `git diff --exit-code origin/release/17.0 HEAD --
src/frontend/src/data` — passed after rebasing onto Eric's resolution.
- `git diff --cached --check` — passed.
- Production build not run locally; CI remains responsible for the
complete frontend build.

---------

Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: David Pine <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
…de normally

Each data group is now a single list of Git pathspecs used for both detection and restore. Only generated top-level JSON files are independent groups; hand-authored data TypeScript merges normally instead of silently keeping the release copy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@IEvangelist
David Pine (IEvangelist) force-pushed the ievangelist-release-sync-conflicts branch from 5035c8a to 1490b51 Compare November 17, 2026 17:50
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.

2 participants