From 52506fefb79c0585221b1d8f931cd4ae83c08abb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:59:27 +0000 Subject: [PATCH 1/2] Initial plan From f57f9760e6e3885336698411d79f16821db76e7d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 11:07:55 +0000 Subject: [PATCH 2/2] feat: add test-copilot-restore-memory-custom-job E2E test Adds E2E test for the restore-memory field in custom jobs (gh-aw#44037). The test defines a custom setup job with restore-memory: {cache-memory: true} and an agent job that depends on it, exercising the new step injection path. The .lock.yml will be generated by the nightly CI once gh-aw#44037 ships in a version that supports the restore-memory field for jobs.. Closes #5970 --- .../test-copilot-restore-memory-custom-job.md | 37 +++++++++++++++++++ README.md | 1 + e2e.sh | 5 ++- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-copilot-restore-memory-custom-job.md diff --git a/.github/workflows/test-copilot-restore-memory-custom-job.md b/.github/workflows/test-copilot-restore-memory-custom-job.md new file mode 100644 index 000000000..1ca7db40e --- /dev/null +++ b/.github/workflows/test-copilot-restore-memory-custom-job.md @@ -0,0 +1,37 @@ +--- +on: + workflow_dispatch: + +permissions: + issues: read + pull-requests: read + actions: read + contents: read + discussions: read + copilot-requests: write + +engine: + id: copilot + +jobs: + setup: + restore-memory: + cache-memory: true + steps: + - name: Verify cache-memory restore step was injected + run: echo "cache-memory restore step injection verified" + agent: + needs: [setup] + +safe-outputs: + create-issue: + title-prefix: "[copilot-test] " + labels: [copilot, automation] + samples: + - title: "restore-memory custom job smoke test" + body: "The restore-memory step was injected into the custom setup job and the agent job ran after it." +--- + +Create an issue in repository ${{ github.repository }} titled "restore-memory custom job smoke test". + +The body should say: "The restore-memory step was injected into the custom setup job and the agent job ran after it." diff --git a/README.md b/README.md index 6cf57009c..2043ac565 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ Tracking the full matrix of [safe outputs](https://github.com/github/gh-aw/blob/ - [x] frontmatter `skills:` install + invocation — test-copilot-skills-frontmatter - [x] `custom safe output jobs` — test-copilot-custom-safe-outputs - [x] `gh-steps` — test-copilot-gh-steps +- [ ] `restore-memory` in custom job (`jobs..restore-memory`) — test-copilot-restore-memory-custom-job - [x] `add-comment` — test-copilot-add-comment - [x] `add-comment` (discussions) — test-copilot-add-discussion-comment - [x] `add-labels` — test-copilot-add-labels diff --git a/e2e.sh b/e2e.sh index c84450f9c..7f3308a0f 100755 --- a/e2e.sh +++ b/e2e.sh @@ -538,6 +538,7 @@ get_all_tests() { echo "test-codex-custom-safe-outputs" echo "test-copilot-custom-safe-outputs" echo "test-copilot-gh-steps" + echo "test-copilot-restore-memory-custom-job" # Issue-triggered tests echo "test-claude-add-comment" echo "test-claude-add-labels" @@ -3428,7 +3429,7 @@ run_single_test() { fi ;; # Workflow dispatch tests - triggered with gh aw run - *"create-issue"|*"create-discussion"|*"create-pull-request"|*"create-two-pull-requests"|*"code-scanning-alert"|*"create-check-run"|*"mcp"*|*"safe-jobs"|*"gh-steps"|*"custom-safe-outputs"|*"noop"|*"report-incomplete"|*"assign-to-agent"|*"set-issue-field"|*"issue-intents"|*"skills-frontmatter") + *"create-issue"|*"create-discussion"|*"create-pull-request"|*"create-two-pull-requests"|*"code-scanning-alert"|*"create-check-run"|*"mcp"*|*"safe-jobs"|*"gh-steps"|*"restore-memory-custom-job"|*"custom-safe-outputs"|*"noop"|*"report-incomplete"|*"assign-to-agent"|*"set-issue-field"|*"issue-intents"|*"skills-frontmatter") local workflow_success=false if trigger_workflow_dispatch_and_await_completion "$workflow"; then workflow_success=true @@ -3447,7 +3448,7 @@ run_single_test() { validation_success=true fi ;; - *"create-issue"|*"skills-frontmatter") + *"create-issue"|*"skills-frontmatter"|*"restore-memory-custom-job") local title_prefix=$(get_title_prefix "$workflow" "$ai_type") local expected_labels=$(get_expected_labels "$ai_type") if validate_issue_created "$title_prefix" "$expected_labels" "$target_repo"; then