You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prose Gate Reads a Data Heredoc After a Shift by a Name as Code #3664
The prose gate reads a data heredoc in a workflow run: step as code when a shift by a name comes earlier in the same step. So a # line the heredoc writes into a file is reported as a comment, comment-added included.
Constructed input, x.yml:
- run: | (( y = x << n )) cat > f <<'EOF' # Data the step writes into the file. EOF
The gate reports line 4 as a comment line. It should read it as data, the way it reads the same heredoc with no shift before it.
The cause is in split_heredocs. The patched bash lexer reads << n as a heredoc opener that never closes. Since such an opener is more often a shift, the rest of the step stays one code piece. That piece is lexed by bash-heredoc-as-code, which has no heredoc rule, so any later heredoc in it is never split out.
develop before the #1664 fix behaves the same way, since it read every run-block heredoc body as code. Found by the local review pass on the #1664 pull request.
Closed as not planned. The answer on #3666 overtakes this issue. The prose gate keeps reading every workflow run: heredoc body as code, as develop does, so this issue's expected reading as data no longer applies, and a shift before a heredoc changes nothing under that reading. #1664's run-block heredoc shape is recorded as an accepted false positive that the comments label clears, in #3665.
Activity
ptr727 commentedon Oct 30, 2026
Closed as not planned. The answer on #3666 overtakes this issue. The prose gate keeps reading every workflow
run:heredoc body as code, as develop does, so this issue's expected reading as data no longer applies, and a shift before a heredoc changes nothing under that reading. #1664's run-block heredoc shape is recorded as an accepted false positive that thecommentslabel clears, in #3665.