Skip to content

Use pre-agent-steps to restore APM bundle after checkout#27850

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/update-apm-md-pre-agent
Closed

Use pre-agent-steps to restore APM bundle after checkout#27850
Copilot wants to merge 1 commit intomainfrom
copilot/update-apm-md-pre-agent

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

  • Inspect /home/runner/work/gh-aw/gh-aw/.github/workflows/shared/apm.md and confirm current APM restore location
  • Run baseline validation to capture pre-existing failures
  • Update apm.md to move APM unpack/restore from steps to pre-agent-steps
  • Update inline documentation/comments in apm.md to match pre-agent-steps behavior
  • Re-run required validation commands
  • Run parallel validation checks
  • Create/update PR with final summary


✨ PR Review Safe Output Test - Run 24783751036

💥 [THE END] — Illustrated by Smoke Claude · ● 275.5K ·

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6457e8b0-06e8-4054-9b3b-bac4e9f7ee29

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan April 22, 2026 14:15
@pelikhan pelikhan added the smoke label Apr 22, 2026
@pelikhan pelikhan marked this pull request as ready for review April 22, 2026 14:23
Copilot AI review requested due to automatic review settings April 22, 2026 14:23
@github-actions
Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

⚠️ Smoke Crush failed. Crush encountered unexpected challenges...

@github-actions github-actions Bot removed the smoke label Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

⚠️ Smoke Gemini failed. Gemini encountered unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions github-actions Bot mentioned this pull request Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq v4.52.5
curl 8.5.0
gh 2.89.0
node v20.20.2
python3 3.12.3
go 1.24.13
java 21.0.10 (Temurin)
dotnet 10.0.201

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · ● 163.5K ·

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 shared APM workflow to restore the packed APM bundle in a later lifecycle hook so it happens after repository checkout work in the agent job.

Changes:

  • Move APM bundle download/restore from steps to pre-agent-steps.
  • Update inline documentation/comments to describe the new restore location.
Show a summary per file
File Description
.github/workflows/shared/apm.md Moves APM restore to pre-agent-steps and updates documentation to match the new execution timing.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

.github/workflows/shared/apm.md:94

  • This section says the bundle is unpacked as pre-agent-steps “after user checkout steps”, but doesn’t mention that pre-agent-steps execute after the workflow’s regular steps: section. That ordering matters for consumers: APM-installed tools won’t be available inside user steps: anymore (only from pre-agent-steps onward). Please clarify the execution order so users don’t assume APM tools are present during steps:.
These packages are installed via a dedicated "apm" job that packs and uploads a bundle,
which the agent job then downloads and unpacks as pre-agent-steps (after user checkout steps).

### How it works

1. **Pack** (`apm` job): `microsoft/apm-action` installs packages and creates a bundle archive,
   uploaded as a GitHub Actions artifact.
2. **Unpack** (agent job pre-agent-steps): the bundle is downloaded and unpacked via
   `microsoft/apm-action` in restore mode, making all skills and tools available to the AI agent.
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +7 to +8
# The agent job then downloads and unpacks the bundle as pre-agent-steps,
# so restore runs after any user checkout steps.
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The updated text emphasizes that restore happens after checkout, but it doesn’t call out the more significant behavioral change from moving restore out of steps:: the APM restore will now run after all user steps: (not just checkout), so any custom steps that expect APM-installed tools/skills to be present will no longer see them. Consider updating the wording here (and the later inline docs) to explicitly state that APM packages become available only for pre-agent-steps/agent execution (and later), not for user steps:.

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

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Smoke test §24783750993PASS

PR: Use pre-agent-steps to restore APM bundle after checkout
Author: @Copilot | Assignees: @pelikhan, @Copilot

Test
GitHub MCP
MCP Scripts GH CLI
Serena CLI
Playwright CLI
Web Fetch
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Upload artifact
Discussion Creation
Workflow Dispatch
PR Review
Comment Memory

📰 BREAKING: Report filed by Smoke Copilot · ● 878.5K ·

@github-actions
Copy link
Copy Markdown
Contributor

Comment Memory

# Smoke Test Haiku

Green tests bloom bright
Automation watches close
No bug hides from sight

📰 BREAKING: Report filed by Smoke Copilot · ● 878.5K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Reviewed the apm.md changes for PR #27850. The rename from steps to pre-agent-steps is clear and correct. Documentation is consistently updated throughout the file. No issues found.

📰 BREAKING: Report filed by Smoke Copilot · ● 878.5K

@@ -83,13 +84,13 @@ steps:
## APM Packages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doc update is consistent with the code change. "pre-agent-steps (after user checkout steps)" nicely clarifies the timing guarantee for readers.

@@ -64,7 +65,7 @@ jobs:
path: ${{ steps.apm_pack.outputs.bundle-path }}
retention-days: '1'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good change — using pre-agent-steps instead of steps makes the ordering semantics clearer: this restore now explicitly runs after user checkout steps, preventing the APM bundle from being overwritten.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test 24783751036 Results (Claude engine)

Core Tests (1–12) PR Review Tests (13–19)
1 ✅ GitHub MCP 13 ✅ Update PR
2 ✅ GH CLI MCP 14 ✅ Review Comments
3 ✅ Serena 15 ✅ Submit Review
4 ⚠️ Make Build (tool timeout, bash ok) 16 ⚠️ Resolve Thread (skipped)
5 ✅ Playwright 17 ✅ Add Reviewer
6 ✅ Tavily Search 18 ✅ Push to Branch
7 ✅ File Write 19 ⚠️ Close PR (skipped)
8 ✅ Bash Tool
9 ✅ Discussion Comment
10 ❌ AW MCP Status
11 ✅ Slack Message
12 ✅ Code Scanning

Overall: PARTIAL — Test #10 (Agentic Workflows MCP) errored; #4 tool timed out but build succeeded via bash fallback.

💥 [THE END] — Illustrated by Smoke Claude · ● 275.5K ·

@github-actions
Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal! This PR correctly migrates APM bundle restore from steps to pre-agent-steps, ensuring proper execution ordering relative to user checkout steps.

💥 [THE END] — Illustrated by Smoke Claude · ● 275.5K

# This shared workflow creates a dedicated "apm" job (depending on activation) that
# packs packages using microsoft/apm-action and uploads the bundle as an artifact.
# The agent job then downloads and unpacks the bundle as pre-steps.
# The agent job then downloads and unpacks the bundle as pre-agent-steps,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Good clarification — noting that restore runs after checkout steps makes the execution order explicit and removes ambiguity for workflow authors.

retention-days: '1'

steps:
pre-agent-steps:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The rename from steps: to pre-agent-steps: aligns with the new lifecycle semantics. This ensures the APM bundle restore happens at the right phase — after checkout but before agent execution. 👍

@pelikhan pelikhan closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants