Skip to content

Update smoke-ci to use comment-memory and write a haiku#27640

Merged
pelikhan merged 3 commits intomainfrom
copilot/update-smoke-ci-comment-memory
Apr 21, 2026
Merged

Update smoke-ci to use comment-memory and write a haiku#27640
pelikhan merged 3 commits intomainfrom
copilot/update-smoke-ci-comment-memory

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Summary

Update the smoke-ci workflow to explicitly use comment-memory and persist a 3-line haiku during pull_request runs.

Changes

  • Updated /home/runner/work/gh-aw/gh-aw/.github/workflows/smoke-ci.md:
    • Explicitly enabled safe-outputs.comment-memory: true
    • Updated the engine command to:
      • keep the existing safeoutputs add_comment behavior for pull requests
      • append a 3-line haiku to /tmp/gh-aw/comment-memory/*.md (or create default.md if none exist)
      • keep safeoutputs noop on push events
    • Updated workflow prompt text to mention comment-memory haiku behavior
  • Recompiled workflow lock file:
    • /home/runner/work/gh-aw/gh-aw/.github/workflows/smoke-ci.lock.yml

Validation

  • Ran make recompile
  • Ran make agent-finish (fails due to pre-existing unrelated tests in pkg/workflow):
    • TestOutputPullRequestFallbackAsIssueFalse
    • TestPushToPullRequestBranchConfigParsing
  • Ran parallel_validation:
    • Code Review: only unrelated comments in other files
    • CodeQL: timed out (per tool output)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Smoke CI failed. Please review the logs for details.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot

  • enable cache-memory and appending the runid to a runs.txt file in the cache folder
  • enable repo-memory and appending the runid in a runs.txt in the repo memory folder

@pelikhan pelikhan marked this pull request as ready for review April 21, 2026 18:38
Copilot AI review requested due to automatic review settings April 21, 2026 18:38
@pelikhan pelikhan merged commit 347bcd0 into main Apr 21, 2026
30 of 31 checks passed
@pelikhan pelikhan deleted the copilot/update-smoke-ci-comment-memory branch April 21, 2026 18:39
Copilot stopped work on behalf of pelikhan due to an error April 21, 2026 18:39
Copilot AI requested a review from pelikhan April 21, 2026 18:39
@github-actions github-actions Bot mentioned this pull request Apr 21, 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 workflow to enable comment-memory and introduce lightweight persistence by recording run IDs to cache-memory/repo-memory and appending a haiku to comment-memory during pull_request runs.

Changes:

  • Enabled safe-outputs.comment-memory and added cache-memory + repo-memory configuration to smoke-ci.
  • Updated the engine command to write run IDs to /tmp/gh-aw/cache-memory/ and /tmp/gh-aw/repo-memory/default/, and append a haiku to /tmp/gh-aw/comment-memory/*.md on PR events.
  • Recompiled the generated workflow lock file to include cache/repo memory plumbing and a push_repo_memory job.
Show a summary per file
File Description
.github/workflows/smoke-ci.md Enables comment-memory and adds memory writes + haiku append logic in the engine command.
.github/workflows/smoke-ci.lock.yml Regenerated compiled workflow reflecting cache-memory/repo-memory/comment-memory and adds repo-memory push steps/job.

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: 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 21, 2026

Choose a reason for hiding this comment

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

HAIKU="...\n..." does not create a multi-line string in bash; the \n sequences will be written literally, so the “3-line haiku” ends up as a single line containing backslash-n characters. Use ANSI-C quoting ($'...') or a heredoc/printf to embed real newlines so the markdown file gets three lines.

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.
Comment on lines +18 to +20
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;
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

runs.txt in repo-memory is appended to on every run with no rotation/pruning. Since repo-memory validation enforces small size/patch limits (10KB in the compiled workflow), this file will eventually exceed limits and cause the push_repo_memory job to fail. Consider truncating to the last N run IDs (e.g., keep a rolling window) or writing per-day/per-week files to bound growth.

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;
bash -lc 'mkdir -p /tmp/gh-aw/cache-memory /tmp/gh-aw/repo-memory/default;
MAX_RUNS=200;
printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/cache-memory/runs.txt;
tail -n "${MAX_RUNS}" /tmp/gh-aw/cache-memory/runs.txt > /tmp/gh-aw/cache-memory/runs.txt.tmp &&
mv /tmp/gh-aw/cache-memory/runs.txt.tmp /tmp/gh-aw/cache-memory/runs.txt;
printf "%s\n" "${GITHUB_RUN_ID}" >> /tmp/gh-aw/repo-memory/default/runs.txt;
tail -n "${MAX_RUNS}" /tmp/gh-aw/repo-memory/default/runs.txt > /tmp/gh-aw/repo-memory/default/runs.txt.tmp &&
mv /tmp/gh-aw/repo-memory/default/runs.txt.tmp /tmp/gh-aw/repo-memory/default/runs.txt;

Copilot uses AI. Check for mistakes.
Copilot AI added a commit that referenced this pull request Apr 23, 2026
pelikhan added a commit that referenced this pull request Apr 23, 2026
…) (#28132)

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6002d2d6-92b9-4e82-ac15-468b1be07525

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.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.

3 participants