Skip to content

ci(sync): auto-resolve fixture-stamp rebase conflicts + unignore fixture snapshots#41

Merged
vianmora merged 1 commit into
developfrom
chore/sync-hardening
Jul 20, 2026
Merged

ci(sync): auto-resolve fixture-stamp rebase conflicts + unignore fixture snapshots#41
vianmora merged 1 commit into
developfrom
chore/sync-hardening

Conversation

@vianmora

Copy link
Copy Markdown
Collaborator

Why

The weekly sync-upstream rebase conflicts on fixtures/*/.webstudio/data.json almost 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.yml

  • Auto-resolve rebase conflicts that touch only the fixture stamp files: take upstream's stamp (git 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.
  • The patch-series sanity check now excludes the re-stamp commit, which legitimately drops as empty during the rebase.

B — .gitignore

  • Force-keep fixtures/*/.webstudio/data.json (tracked despite the broad .webstudio ignore) so the pre-commit hook stops choking on re-stamps (no more --no-verify).

DocsCLAUDE.md updated for both.

Testing

Validated the auto-resolve shell logic against a synthetic git repo:

  • fixture-only conflict → resolved, stamp commit drops as empty, tree clean ✅
  • mixed conflict (fixture + real code) → aborts, leaves conflict for a human ✅
  • no conflict → clean pass-through ✅

Also caught and fixed two bugs while testing: the initial draft used --theirs (wrong direction in a rebase) and a grep -qv guard that misbehaves under ugrep (local shell); the merged version uses --ours and a portable output-capture guard.

🤖 Generated with Claude Code

…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>
@vianmora
vianmora deployed to development July 20, 2026 20:06 — with GitHub Actions Active
@vianmora
vianmora merged commit 06cbc45 into develop Jul 20, 2026
17 checks passed
@vianmora
vianmora deleted the chore/sync-hardening branch July 20, 2026 20:18
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.

1 participant