fix: use printf %b to decode encoded newlines in smoke-ci comment-memory (#28937)#28953
Merged
fix: use printf %b to decode encoded newlines in smoke-ci comment-memory (#28937)#28953
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5d74158b-05c3-4118-9910-dba7a51be41b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
April 28, 2026 14:39
View session
pelikhan
approved these changes
Apr 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes smoke-ci’s comment-memory content so \n sequences in the haiku are written as real newlines instead of appearing literally in posted comments.
Changes:
- Updated the smoke-ci workflow template to use
printf "%b\n"when writing/appending the haiku to comment-memory files. - Regenerated the compiled workflow lock file to reflect the template change.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/smoke-ci.md | Switches haiku writes/appends to printf %b so \n escapes decode into actual newlines. |
| .github/workflows/smoke-ci.lock.yml | Compiled output updated to include the printf %b change in the generated engine command. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
Summary
Fixes the encoded
\nappearing literally in the comment-memory text, as seen in #28937 comment:Root cause
In
smoke-ci.md, theHAIKUvariable is assigned inside abash -lc '...'call:HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing"Within the single-quoted string passed to
bash -lc, the\nin the double-quoted assignment is never interpreted as a newline — it remains a literal backslash-n. The subsequentprintf "%s\n" "$HAIKU"writes those literal characters to the comment-memory file, which is then posted as-is to GitHub.Fix
Change
printf "%s\n"→printf "%b\n"(both the initial-write and the append path). The%bformat specifier causesprintfto interpret backslash escape sequences in its arguments, so\nin$HAIKUis decoded to an actual newline character before being written to the file.