🐛 fix(ci): prevent stale superpowers sync from restoring skills block
Update Third-party Superpowers / Update thirdparty/skill snapshot (push) Successful in 1m17s Details

remove the stale superpowers list block from SKILLS.md so the document routes to the source list only.

clear assume-unchanged and skip-worktree flags in the sync workflow before refreshing the workspace, and add a regression test for that safeguard.
This commit is contained in:
csh 2026-03-12 09:47:12 +08:00
parent 79755c6ee2
commit eaaa39c39b
3 changed files with 10 additions and 19 deletions

View File

@ -38,6 +38,11 @@ jobs:
if [ -d "$REPO_DIR" ]; then
if [ -d "$REPO_DIR/.git" ]; then
cd "$REPO_DIR"
# Clear local index flags so checked-out workflow/script files
# always refresh from the latest main branch contents.
git ls-files -v | awk '/^[a-zS] / {sub(/^[a-zS] /, ""); print}' | while IFS= read -r path; do
git update-index --no-assume-unchanged --no-skip-worktree -- "$path"
done
git clean -fdx
git reset --hard
git fetch --all --tags --force --prune --prune-tags

View File

@ -175,22 +175,3 @@ python docs/standards/playbook/scripts/playbook.py -config playbook.toml
---
**最后更新**2026-01-26
### Third-party Skills (superpowers)
<!-- superpowers:skills:start -->
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
<!-- superpowers:skills:end -->

View File

@ -13,6 +13,11 @@ class SuperpowersWorkflowTests(unittest.TestCase):
text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("workflow_dispatch:", text)
def test_sync_workflow_clears_stale_index_flags(self):
text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("git update-index --no-assume-unchanged", text)
self.assertIn("--no-skip-worktree", text)
def test_sync_workflow_runs_from_latest_main(self):
text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn('TARGET_BRANCH: "main"', text)