Fix sync workflow self-include (polluted GitHub with gh-mirror/) #111

Merged
claude merged 1 commits from fix/sync-workflow-self-include into main 2026-06-24 21:41:13 -04:00
Contributor

Real bug surfaced by the first run: the workflow cloned the GitHub mirror into ./gh-mirror (inside the source checkout), and rsync ./ -> gh-mirror/ swept that directory back into the destination. The public mirror now has a stray gh-mirror/ subtree. Fix: clone into ${RUNNER_TEMP:-/tmp}/awc-gh-mirror instead, plus a belt-and-suspenders --exclude='gh-mirror/' rsync rule.

Merging this PR triggers the next sync, which (via rsync --delete) will also remove the stray directory from GitHub.

🤖 Generated with Claude Code

Real bug surfaced by the first run: the workflow cloned the GitHub mirror into `./gh-mirror` (inside the source checkout), and rsync `./` -> `gh-mirror/` swept that directory back into the destination. The public mirror now has a stray `gh-mirror/` subtree. Fix: clone into `${RUNNER_TEMP:-/tmp}/awc-gh-mirror` instead, plus a belt-and-suspenders `--exclude='gh-mirror/'` rsync rule. Merging this PR triggers the next sync, which (via `rsync --delete`) will also remove the stray directory from GitHub. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 1 commit 2026-06-24 21:40:52 -04:00
The sync workflow cloned the GitHub mirror into `./gh-mirror` (under the source
checkout), then rsync `./` -> `gh-mirror/` swept the `gh-mirror` directory back
into the destination, polluting the public mirror with a `gh-mirror/` subtree.

Clone to `${RUNNER_TEMP:-/tmp}/awc-gh-mirror` instead, and add a belt-and-suspenders
`--exclude='gh-mirror/'` so a future re-use of the old name can't recur. The next
sync will, via rsync --delete, also remove the polluted directory from GitHub.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
claude merged commit c46715b811 into main 2026-06-24 21:41:13 -04:00
claude deleted branch fix/sync-workflow-self-include 2026-06-24 21:41:13 -04:00
Sign in to join this conversation.