v0.3.3 — 2026-05-09¶
PATCH bump fixing a Windows-only --force upgrade crash that surfaced as soon as users started upgrading from baselines that had cloned godot-docs into .claude/skills/godot-api/doc_source/.
PermissionError [WinError 5]on--forceupgrade.publish.pycleared.claude/skills/via plainshutil.rmtree, which on Windows refuses to unlink read-only files. Git writes pack-*.idxfiles asr--r--r--, and any prior version that clonedgodot-docsleft those files behind. All threeshutil.rmtreecall sites now go through a newrmtree_force()helper that clears the read-only bit in the rmtreeonerror/onexchook and retries.- The crash had a worse downstream symptom than the error suggested.
main()aborted before.godotmaker/versionwas stamped, so any caller re-invokingpublish.pyoninstalled_version != target_versionwould re-trigger the same crash on every retry — looking like an "infinite republish" symptom from the caller's side rather than a one-off filesystem error.
No migration script is required — this is a runtime fix to publish.py itself; nothing about target-project layout or content changes.
Changed¶
tools/publish.py— addedrmtree_force()helper and_rmtree_handle_readonly()onerror/onexc hook (signature compatible with Python 3.10–3.11 onerror and 3.12+ onexc). Replaced all threeshutil.rmtree(...)call sites:copy_tree(), the MAJOR--forcecleanup loop, and theelif args.forceskills cleanup branch.tests/tools/test_publish.py— addedTestPublishMainForceRmtreedriving realpublish.main(--force)against a target seeded with.godotmaker/version=0.3.1and a read-onlypack-*.idxunder.claude/skills/godot-api/doc_source/.git/objects/pack/. Mutation-verified: reverting the rmtree fix makes the test fail with the realPermissionError [WinError 5]. This branch had zero integration coverage before —tests/tools/test_publish.pywas unit-only and the only main()-driving test (tests/tools/test_migrate.py::TestPublishMainMigrationRouting) seeded an empty target so theelif args.force and skills_target.exists()branch was never exercised. Also addedTestRmtreeForceunit tests, with cross-platform notes in both classes' docstrings (the read-only failure is Windows-only by nature; on Linux/macOS the tests verify the helper doesn't break the normal-tree path).
Fixed¶
- Windows users upgrading from any prior version that cloned
godot-docsno longer hitPermissionError [WinError 5]when runningpublish.py --force. The crash previously aborted the entire publish before.godotmaker/versionwas stamped, leaving downstream version-comparing callers stuck in a re-trigger loop.