fix: replace inline python3 -c blocks and bare heredocs with run: | block scalars in two workflows#6
Merged
TMHSDigital merged 1 commit intomainfrom Apr 25, 2026
Conversation
…lock scalars in two workflows Fixes #5. Same root cause class as the CFX YAML quoting cluster (TMHSDigital/CFX-Developer-Tools#5, #6, #7, fixed in CFX PR #8). `validate.yml` and `update-unity-api.yml` had two distinct flavors of the same bug, both producing YAML scanner errors that prevented all jobs from running: 1. Three `python3 -c "..."` blocks in `validate-plugin-manifest` (lines 100-130 of validate.yml). The unquoted multiline form is parsed as a plain scalar and the embedded colons (`for n in data:`, `assert ...:`) terminate the scalar prematurely. 2. Seven `python3 << 'PYEOF'` blocks across both files where the python body started at column 0 with no `run: |` block-scalar marker. The `run` value is parsed as the single-line plain scalar `python3 << 'PYEOF'` and the column-0 python body is then treated as top-level YAML tokens, producing `ScannerError: while scanning a simple key, could not find expected ':'`. Both flavors are fixed by wrapping each `run` value in a `run: |` literal block scalar with the python heredoc body indented to match. Heredoc delimiter `PYEOF` is preserved across both files for consistency with the rest of the original file. Surfaced during ecosystem audit on 2026-04-25 (TMHSDigital/Developer-Tools-Directory#1 close-out, audit report ecosystem-audit-2026-04-25.md). Verified locally: - Both workflow files parse cleanly under PyYAML safe_load with newlines preserved in every python script body (10 blocks total). - Every python validation block runs successfully against the actual repo data: - 5 MCP data JSONs validated (unity_api_common 59, deprecated_patterns 17, lifecycle_order 25, shader_properties 6, platform_defines 9). - plugin manifest schema (name, version, author, keywords) valid. - All 18 skills + 8 rules pass frontmatter checks. - All 20 snippets non-empty. - All 5 templates have README.md and C# scripts. - Counts confirmed: 18 skills, 8 rules, 20 snippets, 5 templates match plugin.json and README.md. - Representative heredocs exercised end-to-end via bash to confirm the heredoc-to-python pipe works. Closes #5. Signed-off-by: 154358121+TMHSDigital@users.noreply.github.com Made-with: Cursor
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.
Fixes #5. Same root cause class as the CFX YAML quoting cluster (
TMHSDigital/CFX-Developer-Tools#5,#6,#7, fixed in CFX PR #8).What was broken
Unity had two distinct flavors of the same YAML scanner bug, both causing the workflow files to be rejected before any job ran:
python3 -c "..."blocks invalidate-plugin-manifest(validate.yml lines 100-130). Same bug as CFX#5 — embeddedfor n in data:andassert ...:colons terminate the YAML implicit scalar.python3 << 'PYEOF'blocks with python body at column 0 and norun: |block-scalar marker. Therunvalue was parsed as the single-line plain scalarpython3 << 'PYEOF', then the column-0 python body was treated as top-level YAML tokens and producedScannerError: while scanning a simple key, could not find expected ':'.What this PR does
Wraps every offending
runinrun: |literal block scalar with the python heredoc body indented to match. Heredoc delimiterPYEOFpreserved for consistency with the original file.validate.yml: 9 blocks fixed (1 huge MCP data validator + 3 plugin manifest checks + skills/rules/snippets/templates/counts validators).update-unity-api.yml: 1 block fixed (the validate-updated-data step).Net diff: 2 files changed, 266 insertions, 256 deletions (mostly indentation changes — the python content itself is untouched apart from leading whitespace).
Local verification
safe_loadwith newlines preserved in every script body (10 blocks total).unity_api_common.json(59 entries),deprecated_patterns.json(17),lifecycle_order.json(25),shader_properties.json(6),platform_defines.json(9).README.md+ at least one.csfile.validate-counts: 18 skills, 8 rules, 20 snippets, 5 templates — all matchplugin.jsonandREADME.md.So once this lands, the validate workflow should go green for the first time since it last ran. The scheduled
update-unity-api.ymlwill actually run its validation step when next triggered (Mondays at 06:00 UTC).Context
Surfaced during ecosystem audit on 2026-04-25 (
TMHSDigital/Developer-Tools-Directory#1close-out). Same fix pattern applied here as in CFX PR #8 fifteen minutes earlier.