Skip to content

release: fix the notes step's quoting; parse every workflow script in CI - #902

Closed
bkeroack wants to merge 3 commits into
release/0.6from
fix/release-notes-step-quote
Closed

bkeroack wants to merge 3 commits into
release/0.6from
fix/release-notes-step-quote

Conversation

@bkeroack

@bkeroack bkeroack commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The v0.6.0 release run built every artifact, but its GitHub Release job failed before creating the release:

line 42: unexpected EOF while looking for matching `''

#897 added echo "PR list compares against: ${prev:-GitHub's default}" to the notes step. bash 5.2 reads the apostrophe inside ${prev:-…} as an opening quote, so the step does not parse. The step only runs on a tag, and CI's actionlint runs with shellcheck off, so no PR run ever parsed it.

Changes

  • release.yml: the message now reads the GitHub default.
  • CI Lint job: a new step runs scripts/ci/check-workflow-run-syntax.py, which runs bash -n over every bash run: block under .github/workflows. It replaces ${{ … }} expressions with a plain word first, because GitHub substitutes them before the shell runs. It installs a pinned PyYAML in a venv, so it doesn't depend on what the runner image ships.

Verified

  • With the fix the check parses 174 run blocks and reports 0 failures. With the fix reverted it fails on exactly release.yml, job release, step "Build release notes body", with the same error as the release run.
  • The fixed echo prints the GitHub default when prev is empty and v0.5.2 when it is set.

Finishing v0.6.0's release is handled separately; this fix is for the next tag on this branch. The same commit goes onto #901 for master.

🤖 Generated with Claude Code

The v0.6.0 release run built every artifact, then its GitHub Release job
failed before creating the release: bash 5.2 read the apostrophe in
"${prev:-GitHub's default}" as an opening quote and the step did not
parse ("unexpected EOF while looking for matching `''"). The step only
runs on a tag, and actionlint runs with shellcheck off, so no PR run
parsed it. The message now reads "the GitHub default".

CI's Lint job gains scripts/ci/check-workflow-run-syntax.py, which runs
`bash -n` over every bash run block under .github/workflows (174 today),
with ${{ ... }} expressions replaced by a plain word. Without the fix it
fails on exactly this step; with it, all 174 parse.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bkeroack and others added 2 commits October 5, 2026 20:26
…xpressions

Three gaps in check-workflow-run-syntax.py from review:

- A `shell: sh` step was parsed with `bash -n`, so a bashism there passed
  the check and would fail under dash on the runner. Each block is now
  parsed by its own shell.
- Only *.yml was globbed; GitHub also runs *.yaml.
- The ${{ ... }} substitution stopped at the first `}}`, even inside a
  quoted literal: `echo ${{ format('{0}}}', github.ref) }}` left a stray
  quote and failed. The pattern now skips single-quoted literals.

The script also takes workflow paths as arguments, which is how each case
was checked against a fixture: a bashism under `shell: sh` fails, a
.yaml-only workflows directory is found, the unquoted format() call
passes (the previous version failed it), and the v0.6.0 quoting bug still
fails. The repository's 174 run blocks all parse.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Run from the wrong directory, or after the workflows directory moved, the
check printed "0 run blocks parsed, 0 failed" and passed. It now fails
when no run block was found. From an empty directory the previous version
exits 0 and this one exits 1; the repository's 174 run blocks still pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bkeroack

bkeroack commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing: this goes to master in #901, which carries all three commits (fbfe2d90, 851b31d0, 9813ddbf). New work targets master directly rather than release/0.6.

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