Use pre-agent-steps to restore APM bundle after checkout#27850
Use pre-agent-steps to restore APM bundle after checkout#27850
Conversation
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>
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
|
|
🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥 |
|
|
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
There was a problem hiding this comment.
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
stepstopre-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 thatpre-agent-stepsexecute after the workflow’s regularsteps:section. That ordering matters for consumers: APM-installed tools won’t be available inside usersteps:anymore (only frompre-agent-stepsonward). Please clarify the execution order so users don’t assume APM tools are present duringsteps:.
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
| # The agent job then downloads and unpacks the bundle as pre-agent-steps, | ||
| # so restore runs after any user checkout steps. |
There was a problem hiding this comment.
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.
|
🤖 Smoke test §24783750993 — PASS ✅ PR: Use pre-agent-steps to restore APM bundle after checkout
|
Comment Memory# Smoke Test HaikuGreen tests bloom bright
|
There was a problem hiding this comment.
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 | |||
|
|
|||
There was a problem hiding this comment.
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' | |||
|
|
|||
There was a problem hiding this comment.
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.
|
Smoke Test 24783751036 Results (Claude engine)
Overall: PARTIAL — Test #10 (Agentic Workflows MCP) errored; #4 tool timed out but build succeeded via bash fallback.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
There was a problem hiding this comment.
💥 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, |
There was a problem hiding this comment.
✅ 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: |
There was a problem hiding this comment.
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. 👍
/home/runner/work/gh-aw/gh-aw/.github/workflows/shared/apm.mdand confirm current APM restore locationapm.mdto move APM unpack/restore fromstepstopre-agent-stepsapm.mdto matchpre-agent-stepsbehavior✨ PR Review Safe Output Test - Run 24783751036