From 8ff62c942035dad18f83ceb7cd5d80a2c59d860f Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Tue, 24 Feb 2026 15:15:27 -0500 Subject: [PATCH 1/2] ci: fix YAML syntax error in release-on-main workflow The heredoc body for the Claude prompt was flush-left, breaking out of the YAML block scalar. The YAML parser saw 'Allowed outputs:' as a mapping key, causing a parse error at line 104. Fix: replace cat heredoc with read -r -d '' and indent the body to match surrounding script indentation. --- .github/workflows/release-on-main.yml | 33 +++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release-on-main.yml b/.github/workflows/release-on-main.yml index 1993ba0..c5ba18a 100644 --- a/.github/workflows/release-on-main.yml +++ b/.github/workflows/release-on-main.yml @@ -100,23 +100,22 @@ jobs: exit 1 fi - PROMPT=$(cat <<'EOF' -You are a release manager. Analyze merged pull requests since the last release and decide semver bump. -Allowed outputs: -- none -- patch -- minor - -Rules: -- Never return major. Major releases are manual-only. -- Use a judicious standard: user-facing features, capability expansion, or notable additive behavior => minor. -- Bug fixes, refactors, infra/internal changes, docs/tests only => patch or none. -- If no meaningful published change, choose none. - -Return ONLY strict JSON: -{"decision":"none|patch|minor","reason":"short reason","highlights":["...","..."]} -EOF -) + read -r -d '' PROMPT <<'PROMPT_EOF' || true + You are a release manager. Analyze merged pull requests since the last release and decide semver bump. + Allowed outputs: + - none + - patch + - minor + + Rules: + - Never return major. Major releases are manual-only. + - Use a judicious standard: user-facing features, capability expansion, or notable additive behavior => minor. + - Bug fixes, refactors, infra/internal changes, docs/tests only => patch or none. + - If no meaningful published change, choose none. + + Return ONLY strict JSON: + {"decision":"none|patch|minor","reason":"short reason","highlights":["...","..."]} + PROMPT_EOF jq -n \ --arg model "claude-3-5-sonnet-latest" \ From b9fc3099a552021a9630e15444cccdcdc1865b1c Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Tue, 24 Feb 2026 15:20:56 -0500 Subject: [PATCH 2/2] ci: strip heredoc indentation from prompt before sending to API The indented heredoc preserves leading whitespace in the PROMPT variable. Add a sed pass to strip the 10-space YAML indent so the prompt text sent to the Claude API is clean. --- .github/workflows/release-on-main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-on-main.yml b/.github/workflows/release-on-main.yml index c5ba18a..5c718a4 100644 --- a/.github/workflows/release-on-main.yml +++ b/.github/workflows/release-on-main.yml @@ -116,6 +116,7 @@ jobs: Return ONLY strict JSON: {"decision":"none|patch|minor","reason":"short reason","highlights":["...","..."]} PROMPT_EOF + PROMPT=$(echo "$PROMPT" | sed 's/^ //') jq -n \ --arg model "claude-3-5-sonnet-latest" \