Skip to content

ci: fix speedrun sync to clean up stale files#707

Open
tu11aa wants to merge 1 commit intomainfrom
ci/fix-speedrun-sync-workflow
Open

ci: fix speedrun sync to clean up stale files#707
tu11aa wants to merge 1 commit intomainfrom
ci/fix-speedrun-sync-workflow

Conversation

@tu11aa
Copy link
Copy Markdown
Collaborator

@tu11aa tu11aa commented Mar 30, 2026

Summary

  • Add --delete flag to rsync in the speedrun sync workflow so files removed from scaffold-stark-2 are also removed from speedrunstark — this was the root cause of growing drift and manual maintenance
  • Move exclude/protect rules to a versioned filter file (.github/sync-speedrun-filter-rules) instead of inline --exclude flags — adding new speedrun-specific files now requires just one line change
  • Add empty-commit guard so the workflow doesn't report failure when a merged PR only touches files outside the sync scope (e.g., README, CONTRIBUTING, tests)

Context

The basecamp sync workflow already uses rsync --delete but speedrunstark did not, causing files deleted from scaffold-stark-2 to persist indefinitely in speedrunstark. This required periodic manual cleanup.

Filter file structure

P <path>   → Protect (never delete from speedrunstark)
- <path>   → Exclude (never copy from scaffold-stark-2)

Protected files include speedrun-specific UI components, branding assets, fonts, .gitattributes merge strategies, and the challenge sync workflow.

Test plan

  • Verify filter file covers all speedrun-specific files listed in base-challenge-template branch
  • Trigger a test sync by merging this PR and confirming the workflow succeeds
  • Verify no speedrun-specific files are deleted from base-challenge-template
  • Verify stale files (if any) are cleaned up by --delete

Add --delete flag to rsync so files removed from scaffold-stark-2 are
also removed from speedrunstark, preventing drift. Move all exclude and
protect rules to a versioned filter file (.github/sync-speedrun-filter-rules)
so adding new speedrun-specific files only requires one line change.

Also add an empty-commit guard so the workflow doesn't fail when a merged
PR only touches files outside the sync scope.
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