Skip to content

feat: update smoke-ci to use engine command with comment-memory (#27640)#28132

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-smoke-ci-command
Apr 23, 2026
Merged

feat: update smoke-ci to use engine command with comment-memory (#27640)#28132
pelikhan merged 2 commits intomainfrom
copilot/update-smoke-ci-command

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Summary

Updates smoke-ci.md to replace the simple engine: copilot string with a structured engine object that includes a direct bash command, replacing the AI-agent-driven prompt with a deterministic shell script.

Changes

  • engine: Changed from engine: copilot to engine: { id: copilot, command: ... } with a bash script that:
    • Creates cache-memory and repo-memory directories and appends the run ID to runs.txt in both
    • On pull_request events: calls safeoutputs add_comment, creates /tmp/gh-aw/comment-memory/, and appends/writes a haiku to comment-memory markdown file(s)
    • On non-PR events: calls safeoutputs noop with an informational message
  • tools: Added comment-memory: true alongside the existing cache-memory: true and repo-memory entries
  • smoke-ci.lock.yml: Regenerated via make recompile

Copilot AI requested a review from pelikhan April 23, 2026 16:23
@pelikhan pelikhan marked this pull request as ready for review April 23, 2026 16:23
Copilot AI review requested due to automatic review settings April 23, 2026 16:23
@pelikhan pelikhan merged commit eb0ea6a into main Apr 23, 2026
23 of 36 checks passed
@pelikhan pelikhan deleted the copilot/update-smoke-ci-command branch April 23, 2026 16:23
@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Smoke CI agentic workflow to run a deterministic engine command (bash script) instead of an AI-prompt-driven Copilot session, while enabling comment-memory support and regenerating the compiled lock workflow.

Changes:

  • Replaced engine: copilot with a structured engine: { id: copilot, command: ... } that runs a bash script for PR vs non-PR events.
  • Enabled comment-memory in the workflow tools configuration.
  • Regenerated .github/workflows/smoke-ci.lock.yml to reflect the new engine command and comment-memory wiring.
Show a summary per file
File Description
.github/workflows/smoke-ci.md Switches engine definition to a deterministic bash command and enables comment-memory tool.
.github/workflows/smoke-ci.lock.yml Recompiled workflow output reflecting engine-command execution and comment-memory setup/config.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

.github/workflows/smoke-ci.md:30

  • The safeoutputs noop message says "push event - no PR context" but this branch also runs for schedule (and workflow_dispatch, per the compiled workflow). This is misleading in logs and makes it harder to understand why the noop happened. Consider changing the message to reference "non-pull_request" and/or interpolate ${GITHUB_EVENT_NAME}.
    /tmp/gh-aw/comment-memory/default.md; fi; else safeoutputs noop --message "smoke-ci:
    push event - no PR context, no action needed"; fi'

.github/workflows/smoke-ci.lock.yml:969

  • The else-branch noop message hard-codes "push event" even though this branch will also run for schedule/workflow_dispatch. This makes the workflow output misleading; prefer a message that references "non-pull_request" and/or includes ${GITHUB_EVENT_NAME}.
          bash -lc 'mkdir -p /tmp/gh-aw/cache-memory /tmp/gh-aw/repo-memory/default; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/cache-memory/runs.txt; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/repo-memory/default/runs.txt; if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then safeoutputs add_comment --body "✅ smoke-ci: safeoutputs CLI comment + comment-memory run (${GITHUB_RUN_ID})"; mkdir -p /tmp/gh-aw/comment-memory; HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing"; if compgen -G "/tmp/gh-aw/comment-memory/*.md" > /dev/null; then for memory_file in /tmp/gh-aw/comment-memory/*.md; do printf "\n%s\n" "$HAIKU" >> "$memory_file"; done; else printf "%s\n" "$HAIKU" > /tmp/gh-aw/comment-memory/default.md; fi; else safeoutputs noop --message "smoke-ci: push event - no PR context, no action needed"; fi' "$@"
  • Files reviewed: 2/2 changed files
  • Comments generated: 2

if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then
safeoutputs add_comment --body "✅ smoke-ci: safeoutputs CLI comment + comment-memory run (${GITHUB_RUN_ID})";
mkdir -p /tmp/gh-aw/comment-memory;
HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing";
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAIKU is defined with \n inside double quotes, which does not produce real newlines in bash (it becomes a literal backslash+n). As a result, the written comment-memory markdown will contain \n characters instead of a 3-line haiku. Use ANSI-C quoting ($'...') or a multiline literal to ensure the variable contains actual newline characters before writing/appending it.

This issue also appears on line 29 of the same file.

Suggested change
HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing";
HAIKU=$'CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing';

Copilot uses AI. Check for mistakes.
cat > /tmp/gh-aw/engine-command.sh <<'GH_AW_ENGINE_COMMAND_EOF'
#!/usr/bin/env bash
set -eo pipefail
bash -lc 'mkdir -p /tmp/gh-aw/cache-memory /tmp/gh-aw/repo-memory/default; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/cache-memory/runs.txt; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/repo-memory/default/runs.txt; if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then safeoutputs add_comment --body "✅ smoke-ci: safeoutputs CLI comment + comment-memory run (${GITHUB_RUN_ID})"; mkdir -p /tmp/gh-aw/comment-memory; HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing"; if compgen -G "/tmp/gh-aw/comment-memory/*.md" > /dev/null; then for memory_file in /tmp/gh-aw/comment-memory/*.md; do printf "\n%s\n" "$HAIKU" >> "$memory_file"; done; else printf "%s\n" "$HAIKU" > /tmp/gh-aw/comment-memory/default.md; fi; else safeoutputs noop --message "smoke-ci: push event - no PR context, no action needed"; fi' "$@"
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the generated engine command, HAIKU is defined with \n inside double quotes, which bash does not expand to newline characters. The appended/written markdown will contain literal \n sequences rather than a multi-line haiku. Use ANSI-C quoting ($'...') or a multiline literal so the variable contains real newlines before writing it.

This issue also appears on line 969 of the same file.

Suggested change
bash -lc 'mkdir -p /tmp/gh-aw/cache-memory /tmp/gh-aw/repo-memory/default; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/cache-memory/runs.txt; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/repo-memory/default/runs.txt; if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then safeoutputs add_comment --body "✅ smoke-ci: safeoutputs CLI comment + comment-memory run (${GITHUB_RUN_ID})"; mkdir -p /tmp/gh-aw/comment-memory; HAIKU="CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing"; if compgen -G "/tmp/gh-aw/comment-memory/*.md" > /dev/null; then for memory_file in /tmp/gh-aw/comment-memory/*.md; do printf "\n%s\n" "$HAIKU" >> "$memory_file"; done; else printf "%s\n" "$HAIKU" > /tmp/gh-aw/comment-memory/default.md; fi; else safeoutputs noop --message "smoke-ci: push event - no PR context, no action needed"; fi' "$@"
bash -lc 'mkdir -p /tmp/gh-aw/cache-memory /tmp/gh-aw/repo-memory/default; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/cache-memory/runs.txt; printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/repo-memory/default/runs.txt; if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then safeoutputs add_comment --body "✅ smoke-ci: safeoutputs CLI comment + comment-memory run (${GITHUB_RUN_ID})"; mkdir -p /tmp/gh-aw/comment-memory; HAIKU=$'"'"'CI lights the path\nGreen checks bloom at dawn\nQuiet bots still sing'"'"'; if compgen -G "/tmp/gh-aw/comment-memory/*.md" > /dev/null; then for memory_file in /tmp/gh-aw/comment-memory/*.md; do printf "\n%s\n" "$HAIKU" >> "$memory_file"; done; else printf "%s\n" "$HAIKU" > /tmp/gh-aw/comment-memory/default.md; fi; else safeoutputs noop --message "smoke-ci: push event - no PR context, no action needed"; fi' "$@"

Copilot uses AI. Check for mistakes.
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.

3 participants