-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Labels
Description
Objective
Fix the compiler template that generates cat << 'GH_AW_PROMPT_EOF' > "$GH_AW_PROMPT" followed by >> appends, which triggers SC2129 (style suggestion: use grouped redirects) across 151 of 158 compiled workflows.
Context
From Static Analysis Report discussion #17668 (2026-02-22 scan):
- 164 SC2129 occurrences across 151 workflows — the most widespread issue
- SC2129 is a compiler output artifact — the shell script template in the compiler generates this pattern, so all lock files inherit it
- Fixing at the compiler level will eliminate 151 workflow issues at once
Technical Details
SC2129: "Consider using { cmd1; cmd2; } > file instead of individual redirects."
The compiler currently generates something like:
cat << 'GH_AW_PROMPT_EOF' > "$GH_AW_PROMPT"
...first chunk...
GH_AW_PROMPT_EOF
echo "...more content..." >> "$GH_AW_PROMPT"The fix is to use a single grouped redirect or a single heredoc for the entire prompt construction, avoiding multiple separate >> redirections.
Steps
- Locate the shell script template in the compiler — search for the
GH_AW_PROMPT_EOFheredoc pattern inpkg/workflow/oractions/setup/sh/ - Refactor the generated shell script to use grouped redirects or consolidate all prompt construction into a single heredoc/command group
- Run
make recompileto regenerate all lock files with the new template - Verify SC2129 no longer appears:
actionlint .github/workflows/*.lock.yml 2>&1 | grep SC2129 | wc -lshould return 0 - Run
make agent-finishto validate everything passes
Acceptance Criteria
- SC2129 no longer appears in any compiled lock files
- All 158 workflows compile successfully
-
make agent-finishpasses
Generated by Plan Command for issue #discussion #17668
- expires on Feb 24, 2026, 7:00 AM UTC
Reactions are currently unavailable