From 5286114acb59decf4a2d1e8577c7e55e34f22d25 Mon Sep 17 00:00:00 2001 From: claude Date: Wed, 24 Jun 2026 21:43:22 -0400 Subject: [PATCH] fix(ci): drop the bad gh-mirror/ rsync exclude (it blocked --delete cleanup) rsync's --exclude also protects the matching path at the DESTINATION from --delete. The belt-and-suspenders --exclude='gh-mirror/' I added in the previous fix prevented the stray gh-mirror/ subtree at the destination from ever being deleted by --delete, defeating the auto-heal. The structural fix (cloning the GitHub mirror into $RUNNER_TEMP, outside ./) already prevents the recursive self-include, so the exclude is unnecessary and harmful. Removed it; left an explanatory NOTE in the workflow so this isn't re-added. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT --- .gitea/workflows/sync-github-mirror.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/sync-github-mirror.yml b/.gitea/workflows/sync-github-mirror.yml index 41185c7..f0a9cba 100644 --- a/.gitea/workflows/sync-github-mirror.yml +++ b/.gitea/workflows/sync-github-mirror.yml @@ -53,14 +53,16 @@ jobs: # Mirror this checkout's tree into gh-mirror/ with the exclusions. # --delete drops files removed on the source; --exclude='.git' protects # both repos' .git dirs from rsync touching them. - # belt-and-suspenders exclude of the clone dir name in case anyone re-uses ./gh-mirror. + # NOTE: do NOT add an --exclude for the clone target dir name; rsync's --exclude also + # protects the matching path at the DESTINATION from --delete, which would prevent + # any stray copy of that dir from ever being cleaned up. The clone living in + # $RUNNER_TEMP (outside ./) already prevents the recursive self-include. rsync -a --delete \ --exclude='.git' \ --exclude='.gitea/' \ --exclude='.claude/' \ --exclude='blog/' \ --exclude='handoff.md' \ - --exclude='gh-mirror/' \ --exclude='__pycache__/' \ --exclude='*.pyc' \ --exclude='tasks.json' \ -- 2.52.0