diff --git a/.changeset/patch-include-copilot-session-state.md b/.changeset/patch-include-copilot-session-state.md new file mode 100644 index 0000000000..3c3e44d1ce --- /dev/null +++ b/.changeset/patch-include-copilot-session-state.md @@ -0,0 +1,6 @@ +--- +"gh-aw": patch +--- + +Include Copilot session-state file in agent output artifacts. The Copilot CLI session-state at `~/.copilot/session-state` is copied to `/tmp/gh-aw/sandbox/agent/session-state.json` and uploaded as part of the `agent_outputs` artifact to improve debugging and state inspection. + diff --git a/.github/workflows/ai-moderator.lock.yml b/.github/workflows/ai-moderator.lock.yml index 222a8118d7..42beedc2cf 100644 --- a/.github/workflows/ai-moderator.lock.yml +++ b/.github/workflows/ai-moderator.lock.yml @@ -3714,6 +3714,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4819,6 +4847,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 8b711dd00f..dfdccdfa84 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -4444,6 +4444,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5550,6 +5578,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8120,6 +8149,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index 64b724f2f8..93d06397c9 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -2726,6 +2726,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3831,6 +3859,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7169,6 +7198,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index bb035b9a8d..19a183b8f1 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -4233,6 +4233,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5340,6 +5368,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7910,6 +7939,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/breaking-change-checker.lock.yml b/.github/workflows/breaking-change-checker.lock.yml index 4bc25c909c..19141a9ac4 100644 --- a/.github/workflows/breaking-change-checker.lock.yml +++ b/.github/workflows/breaking-change-checker.lock.yml @@ -2810,6 +2810,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3915,6 +3943,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7536,6 +7565,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/ci-coach.lock.yml b/.github/workflows/ci-coach.lock.yml index 103887ab87..25bab6cf2a 100644 --- a/.github/workflows/ci-coach.lock.yml +++ b/.github/workflows/ci-coach.lock.yml @@ -4012,6 +4012,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5117,6 +5145,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8412,6 +8441,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 25f2625836..e807080e10 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -3674,6 +3674,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4779,6 +4807,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7992,6 +8021,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml index 1abcd32a8c..a7434a89a7 100644 --- a/.github/workflows/cli-consistency-checker.lock.yml +++ b/.github/workflows/cli-consistency-checker.lock.yml @@ -2807,6 +2807,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3912,6 +3940,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7109,6 +7138,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-pr-merged-report.lock.yml b/.github/workflows/copilot-pr-merged-report.lock.yml index ab2f7b581f..042f860933 100644 --- a/.github/workflows/copilot-pr-merged-report.lock.yml +++ b/.github/workflows/copilot-pr-merged-report.lock.yml @@ -4252,6 +4252,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5357,6 +5385,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8655,6 +8684,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index 65cc746070..7eec086aa2 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -4347,6 +4347,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5452,6 +5480,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8758,6 +8787,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index d9aa17451f..74df36235c 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -3370,6 +3370,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4475,6 +4503,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7773,6 +7802,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml index 8f18c164bc..b584082aae 100644 --- a/.github/workflows/craft.lock.yml +++ b/.github/workflows/craft.lock.yml @@ -4578,6 +4578,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5684,6 +5712,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8263,6 +8292,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml index 4c50cffa27..cc589636d7 100644 --- a/.github/workflows/daily-assign-issue-to-user.lock.yml +++ b/.github/workflows/daily-assign-issue-to-user.lock.yml @@ -3178,6 +3178,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4283,6 +4311,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7415,6 +7444,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index 1aa3a46d44..4814cf80ae 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -4516,6 +4516,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5621,6 +5649,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8931,6 +8960,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index d045032073..1a297d9aa6 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -3801,6 +3801,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4906,6 +4934,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8226,6 +8255,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml index b79e9ba09a..6c7a73893b 100644 --- a/.github/workflows/daily-malicious-code-scan.lock.yml +++ b/.github/workflows/daily-malicious-code-scan.lock.yml @@ -3045,6 +3045,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4150,6 +4178,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index aa1e0951ed..35dd533e70 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -4274,6 +4274,34 @@ jobs: GITHUB_WORKSPACE: ${{ github.workspace }} TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5380,6 +5408,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8690,6 +8719,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index a5f74fb33b..968e4d7a67 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -3949,6 +3949,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5054,6 +5082,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8364,6 +8393,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index 5ae1851227..5370759d4d 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -2573,6 +2573,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3678,6 +3706,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6980,6 +7009,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml index 7c21cde006..ba4f61eb8b 100644 --- a/.github/workflows/daily-workflow-updater.lock.yml +++ b/.github/workflows/daily-workflow-updater.lock.yml @@ -2737,6 +2737,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3842,6 +3870,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7131,6 +7160,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index f2356780a3..d0c5527c33 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -3340,6 +3340,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4445,6 +4473,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7723,6 +7752,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 9a562f342d..5b0dcff52c 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -3458,6 +3458,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4563,6 +4591,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7135,6 +7164,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index 60f8fc036f..9dbabd0264 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -3431,6 +3431,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4536,6 +4564,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7826,6 +7855,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 6599828d82..fef4ac08b8 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -2680,6 +2680,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3785,6 +3813,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7070,6 +7099,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index 515cb7f3c5..b0a0875f59 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -2819,6 +2819,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3924,6 +3952,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7222,6 +7251,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml index 77ceebc26d..43a626647f 100644 --- a/.github/workflows/example-permissions-warning.lock.yml +++ b/.github/workflows/example-permissions-warning.lock.yml @@ -795,6 +795,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -917,6 +945,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml index 1c4ba00a32..5d0e3a9fd4 100644 --- a/.github/workflows/firewall-escape.lock.yml +++ b/.github/workflows/firewall-escape.lock.yml @@ -1215,6 +1215,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -1337,6 +1365,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml index 6132744d54..681228a69f 100644 --- a/.github/workflows/firewall.lock.yml +++ b/.github/workflows/firewall.lock.yml @@ -910,6 +910,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -1032,6 +1060,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 8509bb7c0a..30f5587017 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -3838,6 +3838,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4943,6 +4971,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8235,6 +8264,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/grumpy-reviewer.lock.yml b/.github/workflows/grumpy-reviewer.lock.yml index 46975b40a6..9a122c652f 100644 --- a/.github/workflows/grumpy-reviewer.lock.yml +++ b/.github/workflows/grumpy-reviewer.lock.yml @@ -4383,6 +4383,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5489,6 +5517,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8434,6 +8463,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/hourly-ci-cleaner.lock.yml b/.github/workflows/hourly-ci-cleaner.lock.yml index 7e9f38e470..70d991dad3 100644 --- a/.github/workflows/hourly-ci-cleaner.lock.yml +++ b/.github/workflows/hourly-ci-cleaner.lock.yml @@ -3156,6 +3156,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4261,6 +4289,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7549,6 +7578,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/issue-monster.lock.yml b/.github/workflows/issue-monster.lock.yml index 46d57e0322..f4ffaaf0f6 100644 --- a/.github/workflows/issue-monster.lock.yml +++ b/.github/workflows/issue-monster.lock.yml @@ -3617,6 +3617,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4722,6 +4750,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7857,6 +7886,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml index 8c834d36a8..8f4d920b29 100644 --- a/.github/workflows/issue-triage-agent.lock.yml +++ b/.github/workflows/issue-triage-agent.lock.yml @@ -2912,6 +2912,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4017,6 +4045,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6586,6 +6615,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/layout-spec-maintainer.lock.yml b/.github/workflows/layout-spec-maintainer.lock.yml index c7280c4615..d2e8b85185 100644 --- a/.github/workflows/layout-spec-maintainer.lock.yml +++ b/.github/workflows/layout-spec-maintainer.lock.yml @@ -2971,6 +2971,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4076,6 +4104,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7365,6 +7394,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index cba37530fe..ec95933ac9 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -3339,6 +3339,34 @@ jobs: GITHUB_WORKSPACE: ${{ github.workspace }} TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4456,6 +4484,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7755,6 +7784,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index c1645e9d43..d27fc81707 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -3522,6 +3522,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4628,6 +4656,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7204,6 +7233,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index d8c3ddbd9e..753a6c31d1 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -2414,6 +2414,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3520,6 +3548,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6089,6 +6118,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index 62eef3d38f..360155515c 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -4210,6 +4210,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5315,6 +5343,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8620,6 +8649,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index bf1a1a19c9..31ecffce7f 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -4408,6 +4408,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5514,6 +5542,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8091,6 +8120,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index a8cf3d63ef..bd97b9748a 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -3695,6 +3695,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4801,6 +4829,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8371,6 +8400,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 5dc18ff18c..24a8e86c5d 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -5460,6 +5460,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6566,6 +6594,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -11928,6 +11957,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index fd97b06abb..b171d8249f 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -3575,6 +3575,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4680,6 +4708,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7975,6 +8004,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 89e9d690f6..f1a8742aac 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -4691,6 +4691,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5797,6 +5825,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -9464,6 +9493,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 7cc10c7894..4bd1ca4285 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -4583,6 +4583,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5688,6 +5716,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8992,6 +9021,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 26a86f8629..648367674e 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -4991,6 +4991,34 @@ jobs: GITHUB_WORKSPACE: ${{ github.workspace }} TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6098,6 +6126,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -9445,6 +9474,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index 850aaa708c..ab50b4b89c 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -2873,6 +2873,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3978,6 +4006,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6545,6 +6574,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 3afd7c1cfd..4329b93988 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -2754,6 +2754,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3859,6 +3887,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7149,6 +7178,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index f73ff8e514..d600bca0a6 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -3791,6 +3791,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4896,6 +4924,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8193,6 +8222,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index e7e6f18803..fd007ed6ff 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -2667,6 +2667,34 @@ jobs: GITHUB_WORKSPACE: ${{ github.workspace }} TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3773,6 +3801,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7062,6 +7091,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot-no-firewall.lock.yml b/.github/workflows/smoke-copilot-no-firewall.lock.yml index 7c3c8c8ef7..4c12ddbf7a 100644 --- a/.github/workflows/smoke-copilot-no-firewall.lock.yml +++ b/.github/workflows/smoke-copilot-no-firewall.lock.yml @@ -5866,6 +5866,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6971,6 +6999,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -10184,6 +10213,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot-playwright.lock.yml b/.github/workflows/smoke-copilot-playwright.lock.yml index 756782fd08..6bc8f27967 100644 --- a/.github/workflows/smoke-copilot-playwright.lock.yml +++ b/.github/workflows/smoke-copilot-playwright.lock.yml @@ -5846,6 +5846,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6951,6 +6979,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -10176,6 +10205,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot-safe-inputs.lock.yml b/.github/workflows/smoke-copilot-safe-inputs.lock.yml index e1343c534b..be5e1257ad 100644 --- a/.github/workflows/smoke-copilot-safe-inputs.lock.yml +++ b/.github/workflows/smoke-copilot-safe-inputs.lock.yml @@ -5571,6 +5571,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6676,6 +6704,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -9881,6 +9910,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 8ffc8260a2..c600f5b05b 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -4392,6 +4392,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5497,6 +5525,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8702,6 +8731,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-srt-custom-config.lock.yml b/.github/workflows/smoke-srt-custom-config.lock.yml index ffc3b875bc..3359c90d98 100644 --- a/.github/workflows/smoke-srt-custom-config.lock.yml +++ b/.github/workflows/smoke-srt-custom-config.lock.yml @@ -1094,6 +1094,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -1216,6 +1244,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs diff --git a/.github/workflows/smoke-srt.lock.yml b/.github/workflows/smoke-srt.lock.yml index fdbbd9423c..8581a5fba1 100644 --- a/.github/workflows/smoke-srt.lock.yml +++ b/.github/workflows/smoke-srt.lock.yml @@ -2564,6 +2564,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3669,6 +3697,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -5939,6 +5968,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/spec-kit-execute.lock.yml b/.github/workflows/spec-kit-execute.lock.yml index 017d075f46..82128ffcec 100644 --- a/.github/workflows/spec-kit-execute.lock.yml +++ b/.github/workflows/spec-kit-execute.lock.yml @@ -3282,6 +3282,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4387,6 +4415,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7744,6 +7773,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/spec-kit-executor.lock.yml b/.github/workflows/spec-kit-executor.lock.yml index 62c718e9fd..20a57d4492 100644 --- a/.github/workflows/spec-kit-executor.lock.yml +++ b/.github/workflows/spec-kit-executor.lock.yml @@ -2972,6 +2972,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4077,6 +4105,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7434,6 +7463,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/speckit-dispatcher.lock.yml b/.github/workflows/speckit-dispatcher.lock.yml index 710538175b..4042f7c7a6 100644 --- a/.github/workflows/speckit-dispatcher.lock.yml +++ b/.github/workflows/speckit-dispatcher.lock.yml @@ -4903,6 +4903,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -6009,6 +6037,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -9207,6 +9236,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index 169b0ba0e0..ecb0c91cc6 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -4446,6 +4446,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5551,6 +5579,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8765,6 +8794,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index 315cb342f0..604c63428d 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -2969,6 +2969,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4074,6 +4102,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7278,6 +7307,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 546f885563..1c738f385c 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -4195,6 +4195,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5300,6 +5328,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8655,6 +8684,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/test-discussion-expires.lock.yml b/.github/workflows/test-discussion-expires.lock.yml index 2406372f67..d58c65bd8e 100644 --- a/.github/workflows/test-discussion-expires.lock.yml +++ b/.github/workflows/test-discussion-expires.lock.yml @@ -2353,6 +2353,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -3458,6 +3486,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6749,6 +6778,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/test-hide-older-comments.lock.yml b/.github/workflows/test-hide-older-comments.lock.yml index 908c906504..d54e5f0815 100644 --- a/.github/workflows/test-hide-older-comments.lock.yml +++ b/.github/workflows/test-hide-older-comments.lock.yml @@ -3127,6 +3127,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4232,6 +4260,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -6801,6 +6830,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/test-python-safe-input.lock.yml b/.github/workflows/test-python-safe-input.lock.yml index 21e2acdf32..b85338bda3 100644 --- a/.github/workflows/test-python-safe-input.lock.yml +++ b/.github/workflows/test-python-safe-input.lock.yml @@ -3966,6 +3966,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -5071,6 +5099,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8275,6 +8304,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 4307578d62..d12751cc34 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -3095,6 +3095,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4201,6 +4229,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7539,6 +7568,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index b7f00d0f41..f83927e341 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -3010,6 +3010,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4115,6 +4143,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -7312,6 +7341,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index c020bcc079..f019f5b93c 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -3802,6 +3802,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Redact secrets in logs if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -4907,6 +4935,7 @@ jobs: name: agent_outputs path: | /tmp/gh-aw/sandbox/agent/logs/ + /tmp/gh-aw/sandbox/agent/session-state.json /tmp/gh-aw/redacted-urls.log if-no-files-found: ignore - name: Upload MCP logs @@ -8217,6 +8246,34 @@ jobs: GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} GITHUB_WORKSPACE: ${{ github.workspace }} XDG_CONFIG_HOME: /home/runner + - name: Copy Copilot session-state file + if: always() + run: | + # Search for session-state file in multiple locations + if [ -f /home/runner/.copilot/session-state ]; then + SESSION_STATE_PATH=/home/runner/.copilot/session-state + echo "Found session-state file at: $SESSION_STATE_PATH" + else + # Search in home directory + SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + if [ -z "$SESSION_STATE_PATH" ]; then + # Search in /tmp directory + SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1) + fi + if [ -z "$SESSION_STATE_PATH" ]; then + echo "Error: session-state file not found in expected locations" + echo "Searched locations:" + echo " - /home/runner/.copilot/session-state" + echo " - ~ (home directory)" + echo " - /tmp" + exit 1 + else + echo "Found session-state file at: $SESSION_STATE_PATH" + fi + fi + echo "Copying Copilot session-state file" + mkdir -p "$(dirname /tmp/gh-aw/sandbox/agent/session-state.json)" + cp "$SESSION_STATE_PATH" /tmp/gh-aw/sandbox/agent/session-state.json - name: Parse threat detection results id: parse_results uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/pkg/workflow/copilot_engine.go b/pkg/workflow/copilot_engine.go index ef871e7d27..9c949de7a0 100644 --- a/pkg/workflow/copilot_engine.go +++ b/pkg/workflow/copilot_engine.go @@ -12,6 +12,8 @@ import ( var copilotLog = logger.New("workflow:copilot_engine") const logsFolder = "/tmp/gh-aw/sandbox/agent/logs/" +const sessionStateFile = "/tmp/gh-aw/sandbox/agent/session-state.json" +const sessionStateSource = "/home/runner/.copilot/session-state" // CopilotEngine represents the GitHub Copilot CLI agentic engine type CopilotEngine struct { @@ -150,7 +152,7 @@ func (e *CopilotEngine) GetInstallationSteps(workflowData *WorkflowData) []GitHu } func (e *CopilotEngine) GetDeclaredOutputFiles() []string { - return []string{logsFolder} + return []string{logsFolder, sessionStateFile} } // extractAddDirPaths extracts all directory paths from copilot args that follow --add-dir flags @@ -575,6 +577,10 @@ COPILOT_CLI_INSTRUCTION="$(cat /tmp/gh-aw/aw-prompts/prompt.txt)" steps = append(steps, GitHubActionStep(stepLines)) + // Add separate step to copy session-state file + copySessionStateStep := e.generateCopySessionStateStep() + steps = append(steps, copySessionStateStep) + return steps } @@ -585,6 +591,41 @@ func (e *CopilotEngine) GetFirewallLogsCollectionStep(workflowData *WorkflowData return []GitHubActionStep{} } +// generateCopySessionStateStep creates a separate step to copy the Copilot session-state file +func (e *CopilotEngine) generateCopySessionStateStep() GitHubActionStep { + stepLines := []string{ + " - name: Copy Copilot session-state file", + " if: always()", + " run: |", + " # Search for session-state file in multiple locations", + fmt.Sprintf(" if [ -f %s ]; then", shellEscapeArg(sessionStateSource)), + fmt.Sprintf(" SESSION_STATE_PATH=%s", shellEscapeArg(sessionStateSource)), + fmt.Sprintf(" echo \"Found session-state file at: $SESSION_STATE_PATH\""), + " else", + " # Search in home directory", + " SESSION_STATE_PATH=$(find ~ -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1)", + " if [ -z \"$SESSION_STATE_PATH\" ]; then", + " # Search in /tmp directory", + " SESSION_STATE_PATH=$(find /tmp -maxdepth 3 -name 'session-state' -type f 2>/dev/null | head -1)", + " fi", + " if [ -z \"$SESSION_STATE_PATH\" ]; then", + " echo \"Error: session-state file not found in expected locations\"", + " echo \"Searched locations:\"", + fmt.Sprintf(" echo \" - %s\"", shellEscapeArg(sessionStateSource)), + " echo \" - ~ (home directory)\"", + " echo \" - /tmp\"", + " exit 1", + " else", + " echo \"Found session-state file at: $SESSION_STATE_PATH\"", + " fi", + " fi", + " echo \"Copying Copilot session-state file\"", + fmt.Sprintf(" mkdir -p \"$(dirname %s)\"", shellEscapeArg(sessionStateFile)), + fmt.Sprintf(" cp \"$SESSION_STATE_PATH\" %s", shellEscapeArg(sessionStateFile)), + } + return GitHubActionStep(stepLines) +} + // GetSquidLogsSteps returns the steps for uploading and parsing Squid logs (after secret redaction) func (e *CopilotEngine) GetSquidLogsSteps(workflowData *WorkflowData) []GitHubActionStep { var steps []GitHubActionStep diff --git a/pkg/workflow/copilot_engine_test.go b/pkg/workflow/copilot_engine_test.go index 6e0c7b2fe2..57fe207a87 100644 --- a/pkg/workflow/copilot_engine_test.go +++ b/pkg/workflow/copilot_engine_test.go @@ -100,8 +100,8 @@ func TestCopilotEngineExecutionSteps(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step, not Squid logs or cleanup - if len(steps) != 1 { - t.Fatalf("Expected 1 step (copilot execution), got %d", len(steps)) + if len(steps) != 2 { + t.Fatalf("Expected 2 steps (copilot execution and session-state copy), got %d", len(steps)) } // Check the execution step @@ -171,8 +171,8 @@ func TestCopilotEngineExecutionStepsWithOutput(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { - t.Fatalf("Expected 1 step (copilot execution), got %d", len(steps)) + if len(steps) != 2 { + t.Fatalf("Expected 2 steps (copilot execution and session-state copy), got %d", len(steps)) } // Check the execution step @@ -468,8 +468,8 @@ func TestCopilotEngineExecutionStepsWithToolArguments(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { - t.Fatalf("Expected 1 step (copilot execution), got %d", len(steps)) + if len(steps) != 2 { + t.Fatalf("Expected 2 steps (copilot execution and session-state copy), got %d", len(steps)) } // Check the execution step contains tool arguments @@ -554,7 +554,7 @@ func TestCopilotEngineEditToolAddsAllowAllPaths(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } @@ -601,7 +601,7 @@ func TestCopilotEngineShellEscaping(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } @@ -648,7 +648,7 @@ func TestCopilotEngineInstructionPromptNotEscaped(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } @@ -870,7 +870,7 @@ func TestCopilotEngineGitHubToolsShellEscaping(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } @@ -1030,7 +1030,7 @@ func TestCopilotEngineExecutionStepsWithCacheMemory(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } @@ -1070,7 +1070,7 @@ func TestCopilotEngineExecutionStepsWithCustomAddDirArgs(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") // GetExecutionSteps only returns the execution step - if len(steps) != 1 { + if len(steps) != 2 { t.Fatalf("Expected 1 step, got %d", len(steps)) } diff --git a/pkg/workflow/engine_agent_import_test.go b/pkg/workflow/engine_agent_import_test.go index cb10d95b1e..9fd8d697c0 100644 --- a/pkg/workflow/engine_agent_import_test.go +++ b/pkg/workflow/engine_agent_import_test.go @@ -20,8 +20,8 @@ func TestCopilotEngineWithAgentFromImports(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") - if len(steps) != 1 { - t.Fatalf("Expected 1 execution step, got %d", len(steps)) + if len(steps) != 2 { + t.Fatalf("Expected 2 execution steps, got %d", len(steps)) } stepContent := strings.Join([]string(steps[0]), "\n") @@ -44,8 +44,8 @@ func TestCopilotEngineWithoutAgentFlag(t *testing.T) { steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/test.log") - if len(steps) != 1 { - t.Fatalf("Expected 1 execution step, got %d", len(steps)) + if len(steps) != 2 { + t.Fatalf("Expected 2 execution steps, got %d", len(steps)) } stepContent := strings.Join([]string(steps[0]), "\n")