Skip to content

fix(turnstile-spin): report skill bundle copy failures - #206

Open
shaoshuaig wants to merge 1 commit into
cloudflare:mainfrom
shaoshuaig:codex/turnstile-persist-copy-errors
Open

shaoshuaig wants to merge 1 commit into
cloudflare:mainfrom
shaoshuaig:codex/turnstile-persist-copy-errors

Conversation

@shaoshuaig

Copy link
Copy Markdown

When persist-skill.sh cannot create or copy the destination bundle, it currently continues after the Python error and returns status: ok with exit code 0. For example, an existing .claude file prevents installation at .claude/skills/turnstile-spin/SKILL.md, but the caller is told that persistence succeeded.

Check the copy block's exit status and return {"status":"error","reason":"copy_failed"} with exit code 1 on failure. Add offline regression tests for that failure, successful installation into new and empty directories (including executable script permissions), and preservation of nonempty destinations.

The closed #148 also addressed copy failure propagation as part of a broader persistence redesign. This change isolates the error-reporting fix while retaining the current download and destination behavior.

Validation:

  • python3 -I -m unittest discover -s skills/turnstile-spin/tests -p 'test_*.py' -v: 3 tests pass. On the unchanged script, the copy-failure test fails because it returns success; the other tests pass.
  • bash -n on all four Turnstile helper scripts.
  • git diff --check.

Tests use a local Git stub and no network or credentials. No Cloudflare API behavior or skill guidance is changed.

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