Skip to content

fix(ci): indented heredoc terminator broke the bump workflow's post-CI job - #2555

Merged
POWERFULMOVES merged 1 commit into
mainfrom
fix/bump-postci-heredoc
Aug 14, 2026
Merged

POWERFULMOVES merged 1 commit into
mainfrom
fix/bump-postci-heredoc

Conversation

@POWERFULMOVES

Copy link
Copy Markdown
Owner

Fourth and final layer — and the workflow now works

With #2542, #2552 and #2553 in, this workflow finally did its job: create-pr succeeded and opened #2554chore(agent-zero): bump upstream to v2.9, the first bump PR it has ever produced.

post-ci then failed:

line 31: syntax error: unexpected end of file

Cause

The "Handle CI result" step wrote its comment with:

cat > /tmp/failure_comment.md << 'COMMENT'
...
            COMMENT          # <- indented

<< requires the delimiter at column 0. <<- strips leading tabs only, not the spaces this file is indented with. Bash never found the terminator, swallowed the rest of the script, and died at EOF.

This step could never have run.

Verified both directions, not asserted

version bash -n
old warning: here-document at line 13 delimited by end-of-file (wanted 'COMMENT')line 31: syntax error: unexpected end of file, exit 2
new clean

That old error is character-for-character what the CI run printed.

Fix

Replaced the heredoc with a brace group redirected to the file. That also removes a second latent bug in the same step — the placeholder+sed dance it required used:

sed -i "s|PLACEHOLDER|${FAILED_JOBS:-"- CI did not..."}|" ...

nesting double quotes inside a double-quoted sed expression. The brace group needs no placeholder and no sed, so both problems disappear rather than being patched.

The whole chain

# defect PR reachable only after
1 missing GH_TOKEN on a step gated to run only when a bump is due #2542
2 gh pr create --jq #2552 1
3 stranded branch blocked the push #2553 2
4 indented heredoc terminator this 3

Every one sat behind a gate that only opens when its predecessor is repaired. That is why months of green meant nothing — and it is the same shape as yt-dlp-bump (nested gitlink → uppercase GHCR tag → swallowed gh failure → hardcoded x86_64 deno).

🤖 Generated with Claude Code

…I job

Fourth and last layer. With #2542, #2552 and #2553 in, the workflow finally did
its job — create-pr SUCCEEDED and opened #2554, "bump upstream to v2.9", the
first bump PR this workflow has ever produced. post-ci then failed:

    /home/runner/work/_temp/....sh: line 31: syntax error: unexpected end of file

The "Handle CI result" step wrote its comment with

    cat > /tmp/failure_comment.md << 'COMMENT'
    ...
                COMMENT          <- indented

`<<` requires the delimiter at column 0. `<<-` strips leading TABS only, not the
spaces this file is indented with. So bash never found the terminator, swallowed
the remainder of the script, and died at EOF. The step could never have run.

Reproduced and verified both directions rather than asserted:

    old step, bash -n:  warning: here-document at line 13 delimited by
                        end-of-file (wanted `COMMENT')
                        line 31: syntax error: unexpected end of file   exit 2
    new step, bash -n:  clean

That old error is character-for-character what the CI run printed.

Replaced the heredoc with a brace group redirected to the file. That also removes
a second latent bug in the same step: the placeholder+sed dance it needed used

    sed -i "s|PLACEHOLDER|${FAILED_JOBS:-"- CI did not..."}|" ...

which nests double quotes inside a double-quoted sed expression. The brace group
needs no placeholder and no sed, so both problems go away rather than being
patched.

Running total on this one workflow, each defect reachable only after the one in
front of it was fixed:

    1  missing GH_TOKEN, on a step gated to run only when a bump is due   #2542
    2  gh pr create --jq                                                  #2552
    3  stranded branch blocked the push                                   #2553
    4  indented heredoc terminator                                        this

Every one of them sat behind a gate that only opens when its predecessor is
repaired. That is why months of green meant nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bd5d195-e5db-4670-83e4-a6d1e480f48d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the workflows GitHub Actions workflows label Aug 14, 2026
@POWERFULMOVES
POWERFULMOVES merged commit b6c54cb into main Aug 14, 2026
23 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the fix/bump-postci-heredoc branch August 14, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflows GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant