Skip to content

fix(ci): unbreak spec-update workflow (EOF delimiter bug)#31

Open
EvanBacon wants to merge 1 commit into
mainfrom
fix/diff-summary-eof
Open

fix(ci): unbreak spec-update workflow (EOF delimiter bug)#31
EvanBacon wants to merge 1 commit into
mainfrom
fix/diff-summary-eof

Conversation

@EvanBacon

Copy link
Copy Markdown
Owner

Problem

The scheduled Update Apple Spec workflow has failed on every run for weeks (tracked in #30, ~60 failure comments). The workflow correctly detects new Apple spec versions (latest run found `4.3 → 4.3.1`) but crashes in the Read diff summary step:

##[error]Unable to process file command 'env' successfully.
##[error]Invalid value. Matching delimiter not found 'EOF'

Cause

The step writes a multiline heredoc to `$GITHUB_ENV`:

echo 'DIFF_SUMMARY<<EOF'
cat diff-summary.md
echo 'EOF'

`generateDiffSummary()` returns a string with no trailing newline, and `Bun.write` writes it verbatim. So `cat` emits content not ending in `\n`, and `echo 'EOF'` is glued onto the last line — GitHub never sees `EOF` standalone, the job fails, and the failure-notification job spams #30.

Net effect: no auto-update PR has been created since this broke, so the published spec is stuck at 4.3 while Apple is at 4.3.1.

Fix

  • Emit an explicit blank line before the `EOF` delimiter in the workflow heredoc.
  • Belt-and-suspenders: write `diff-summary.md` with a trailing newline.

Once merged, the next cron run should open the `spec/update-v4.3.1` PR and stop the failure comments.

🤖 Generated with Claude Code

The 'Read diff summary' step wrote diff-summary.md to $GITHUB_ENV via a
heredoc, but generateDiffSummary() produced a string with no trailing
newline. cat then glued the 'EOF' delimiter onto the last content line,
so GitHub never matched the closing delimiter and the job failed on every
scheduled run (issue #30). Emit an explicit blank line before EOF and
write the file with a trailing newline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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