fix(ci): unbreak spec-update workflow (EOF delimiter bug)#31
Open
EvanBacon wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Cause
The step writes a multiline heredoc to `$GITHUB_ENV`:
`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
Once merged, the next cron run should open the `spec/update-v4.3.1` PR and stop the failure comments.
🤖 Generated with Claude Code