Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/shared/apm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#
# 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.

# so restore runs after any user checkout steps.
Comment on lines +7 to +8
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.
#
# Documentation: https://github.com/microsoft/APM
#
Expand Down Expand Up @@ -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.

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. 👍

- name: Download APM bundle artifact
uses: actions/download-artifact@v8.0.1
with:
Expand All @@ -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.

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-steps.
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-steps): the bundle is downloaded and unpacked via
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.

### Package format
Expand Down
Loading