ci(sync): auto-resolve fixture-stamp rebase conflicts + unignore fixture snapshots#41
Merged
Merged
Conversation
…shots The weekly upstream rebase conflicts on fixtures/*/.webstudio/data.json almost every time: the bundleVersion is a schema hash both sides regenerate, so it is never a real content conflict. Until now any conflict aborted the rebase and opened a manual issue, forcing a hand rebase each week. - sync-upstream.yml: auto-resolve rebase conflicts that touch ONLY the fixture stamp files (take upstream's stamp via --ours, which is upstream during a rebase; the following re-stamp step recomputes the correct fork hash). Any conflict on a real code file still aborts and opens an issue. The patch-series sanity check now ignores the re-stamp commit, which legitimately drops as empty during the rebase. - .gitignore: force-keep fixtures/*/.webstudio/data.json (tracked despite the broad .webstudio ignore) so the pre-commit hook stops choking on re-stamps. - CLAUDE.md: document both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The weekly
sync-upstreamrebase conflicts onfixtures/*/.webstudio/data.jsonalmost every time. That stamp (bundleVersion) is a schema hash both the fork and upstream regenerate, so it's never a real content conflict — but until now any conflict aborted the rebase and opened a manual issue (#40 was the second occurrence), forcing a hand rebase each week.What
A —
sync-upstream.ymlgit checkout --ours, which is upstream during a rebase — the flags are inverted vs a merge), then the existing re-stamp step recomputes the correct fork hash. Any conflict on a real code file still aborts and opens an issue.B —
.gitignorefixtures/*/.webstudio/data.json(tracked despite the broad.webstudioignore) so the pre-commit hook stops choking on re-stamps (no more--no-verify).Docs —
CLAUDE.mdupdated for both.Testing
Validated the auto-resolve shell logic against a synthetic git repo:
Also caught and fixed two bugs while testing: the initial draft used
--theirs(wrong direction in a rebase) and agrep -qvguard that misbehaves underugrep(local shell); the merged version uses--oursand a portable output-capture guard.🤖 Generated with Claude Code