fix(scripts): fall back to simple_yaml when PyYAML is absent during setup#81
Merged
Conversation
…etup bigpowers setup crashed on a stock python3 without PyYAML: srp-engine.py imported yaml at module load (ModuleNotFoundError), and validate-skill-yaml.py exited 2. Both now fall back to the dependency-free scripts/lib/simple_yaml.py. simple_yaml gains double-quoted-escape unescaping and folded/literal block scalar support so the PyYAML-free path is byte-identical to PyYAML across all skill frontmatter. Also corrects the misleading "targets.yaml missing" warning, which also fires when yq is absent. Adds scripts/test-setup-no-pyyaml.sh as a recurrence guard.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 19, 2026
## [2.77.2](v2.77.1...v2.77.2) (2026-07-19) ### Bug Fixes * **scripts:** fall back to simple_yaml when PyYAML is absent during setup ([#81](#81)) ([2608c64](2608c64))
|
🎉 This PR is included in version 2.77.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bigpowers setupcrashed on a stock macOSpython3without PyYAML (Issue #77).python-env.shdeliberately warns-and-continues without PyYAML, but two setup-path scripts hard-depended on it:scripts/lib/srp-engine.py—import yamlat module load →ModuleNotFoundError(the reported traceback).scripts/validate-skill-yaml.py—except ImportError: sys.exit(2), whichsync-post.shturns intosync-skills: FAIL. A second landmine reached only once the first is fixed.Fix
scripts/lib/simple_yaml.py(story e38s01) via a_load_yamlshim — chosen overpip install(PEP 668 externally-managed-environment fragility).simple_yaml.pygains double-quoted-escape unescaping and folded/literal block-scalar (>/|) support, so the PyYAML-free path is byte-identical to PyYAML across all skill frontmatter.scripts/sync-skills.sh— corrected the misleadingtargets.yaml missingwarning (it also fires whenyqis absent).scripts/test-setup-no-pyyaml.shrecurrence guard; bug SoT inspecs/bugs/.Test plan
srp-engineexit 1,validateexit 2); both now exit 0.sync-skills.shunder a no-PyYAML interpreter → exit 0, zero drift in generated.cursor/.gemini/.piartifacts.scripts/test-setup-no-pyyaml.sh→ 3/3 PASS (crash-free + fallback ≡ PyYAML for all skills).npm run compliancePASS · verification gates 11/11 ·trace-stories --strictexit 0.trace-matrixoutput (base vs modifiedsimple_yamlidentical).Closes #77