From ec2bed311e184b4d3fe665bf8f6a64008b4348f7 Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Wed, 1 Apr 2026 18:31:15 -0700 Subject: [PATCH 1/4] fix: use recursive find for session file copy to capture events.jsonl in subdirectories The Copilot CLI writes events.jsonl inside session subdirectories (~/.copilot/session-state//events.jsonl), but the copy step used a flat glob (*.jsonl) that only matched the top level. Replace the flat glob with find -name '*.jsonl' to recursively locate session files. Preserve the session ID in the output filename (events-.jsonl) to avoid collisions when multiple sessions ran in the same workflow. Closes #23990 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ace-editor.lock.yml | 9 ++++++++- .../workflows/agent-performance-analyzer.lock.yml | 9 ++++++++- .github/workflows/agent-persona-explorer.lock.yml | 9 ++++++++- .../workflows/agentic-observability-kit.lock.yml | 9 ++++++++- .github/workflows/archie.lock.yml | 9 ++++++++- .github/workflows/artifacts-summary.lock.yml | 9 ++++++++- .github/workflows/auto-triage-issues.lock.yml | 9 ++++++++- .github/workflows/bot-detection.lock.yml | 9 ++++++++- .github/workflows/brave.lock.yml | 9 ++++++++- .../workflows/breaking-change-checker.lock.yml | 9 ++++++++- .github/workflows/ci-coach.lock.yml | 9 ++++++++- .../workflows/cli-consistency-checker.lock.yml | 9 ++++++++- .github/workflows/code-scanning-fixer.lock.yml | 9 ++++++++- .github/workflows/code-simplifier.lock.yml | 9 ++++++++- .../workflows/constraint-solving-potd.lock.yml | 9 ++++++++- .github/workflows/contribution-check.lock.yml | 9 ++++++++- .../workflows/copilot-cli-deep-research.lock.yml | 9 ++++++++- .../workflows/copilot-pr-merged-report.lock.yml | 9 ++++++++- .../workflows/copilot-pr-nlp-analysis.lock.yml | 9 ++++++++- .../workflows/copilot-pr-prompt-analysis.lock.yml | 9 ++++++++- .github/workflows/craft.lock.yml | 9 ++++++++- .../workflows/daily-architecture-diagram.lock.yml | 9 ++++++++- .../workflows/daily-assign-issue-to-user.lock.yml | 9 ++++++++- .github/workflows/daily-cli-performance.lock.yml | 9 ++++++++- .github/workflows/daily-cli-tools-tester.lock.yml | 9 ++++++++- .../daily-community-attribution.lock.yml | 9 ++++++++- .github/workflows/daily-compiler-quality.lock.yml | 9 ++++++++- .../workflows/daily-copilot-token-report.lock.yml | 9 ++++++++- .github/workflows/daily-file-diet.lock.yml | 9 ++++++++- .github/workflows/daily-firewall-report.lock.yml | 9 ++++++++- .../workflows/daily-integrity-analysis.lock.yml | 9 ++++++++- .../workflows/daily-malicious-code-scan.lock.yml | 9 ++++++++- .../daily-mcp-concurrency-analysis.lock.yml | 9 ++++++++- .github/workflows/daily-news.lock.yml | 9 ++++++++- .../workflows/daily-performance-summary.lock.yml | 9 ++++++++- .github/workflows/daily-regulatory.lock.yml | 9 ++++++++- .github/workflows/daily-repo-chronicle.lock.yml | 9 ++++++++- .../daily-safe-output-integrator.lock.yml | 9 ++++++++- .github/workflows/daily-secrets-analysis.lock.yml | 9 ++++++++- .github/workflows/daily-semgrep-scan.lock.yml | 9 ++++++++- .../workflows/daily-syntax-error-quality.lock.yml | 9 ++++++++- .github/workflows/daily-team-status.lock.yml | 9 ++++++++- .../daily-testify-uber-super-expert.lock.yml | 9 ++++++++- .github/workflows/daily-workflow-updater.lock.yml | 9 ++++++++- .github/workflows/dead-code-remover.lock.yml | 9 ++++++++- .github/workflows/delight.lock.yml | 9 ++++++++- .github/workflows/dependabot-burner.lock.yml | 9 ++++++++- .github/workflows/dependabot-go-checker.lock.yml | 9 ++++++++- .github/workflows/dev-hawk.lock.yml | 9 ++++++++- .github/workflows/dev.lock.yml | 9 ++++++++- .github/workflows/dictation-prompt.lock.yml | 9 ++++++++- .github/workflows/discussion-task-miner.lock.yml | 9 ++++++++- .github/workflows/docs-noob-tester.lock.yml | 9 ++++++++- .github/workflows/draft-pr-cleanup.lock.yml | 9 ++++++++- .../example-permissions-warning.lock.yml | 9 ++++++++- .github/workflows/firewall-escape.lock.yml | 9 ++++++++- .github/workflows/firewall.lock.yml | 9 ++++++++- .github/workflows/functional-pragmatist.lock.yml | 9 ++++++++- .../github-remote-mcp-auth-test.lock.yml | 9 ++++++++- .github/workflows/glossary-maintainer.lock.yml | 9 ++++++++- .github/workflows/gpclean.lock.yml | 9 ++++++++- .github/workflows/hourly-ci-cleaner.lock.yml | 9 ++++++++- .github/workflows/issue-monster.lock.yml | 9 ++++++++- .github/workflows/issue-triage-agent.lock.yml | 9 ++++++++- .github/workflows/jsweep.lock.yml | 9 ++++++++- .github/workflows/layout-spec-maintainer.lock.yml | 9 ++++++++- .github/workflows/mcp-inspector.lock.yml | 9 ++++++++- .github/workflows/mergefest.lock.yml | 9 ++++++++- .github/workflows/metrics-collector.lock.yml | 9 ++++++++- .github/workflows/notion-issue-summary.lock.yml | 9 ++++++++- .github/workflows/org-health-report.lock.yml | 9 ++++++++- .github/workflows/pdf-summary.lock.yml | 9 ++++++++- .github/workflows/plan.lock.yml | 9 ++++++++- .github/workflows/poem-bot.lock.yml | 9 ++++++++- .github/workflows/portfolio-analyst.lock.yml | 9 ++++++++- .github/workflows/pr-nitpick-reviewer.lock.yml | 9 ++++++++- .github/workflows/pr-triage-agent.lock.yml | 9 ++++++++- .github/workflows/python-data-charts.lock.yml | 9 ++++++++- .github/workflows/q.lock.yml | 9 ++++++++- .github/workflows/refiner.lock.yml | 9 ++++++++- .github/workflows/release.lock.yml | 9 ++++++++- .github/workflows/repo-audit-analyzer.lock.yml | 9 ++++++++- .github/workflows/repo-tree-map.lock.yml | 9 ++++++++- .../repository-quality-improver.lock.yml | 9 ++++++++- .github/workflows/research.lock.yml | 9 ++++++++- .github/workflows/security-compliance.lock.yml | 9 ++++++++- .github/workflows/security-review.lock.yml | 9 ++++++++- .github/workflows/slide-deck-maintainer.lock.yml | 9 ++++++++- .github/workflows/smoke-copilot-arm.lock.yml | 9 ++++++++- .github/workflows/smoke-copilot.lock.yml | 9 ++++++++- .../workflows/smoke-create-cross-repo-pr.lock.yml | 9 ++++++++- .github/workflows/smoke-multi-pr.lock.yml | 9 ++++++++- .github/workflows/smoke-project.lock.yml | 9 ++++++++- .github/workflows/smoke-service-ports.lock.yml | 9 ++++++++- .github/workflows/smoke-temporary-id.lock.yml | 9 ++++++++- .github/workflows/smoke-test-tools.lock.yml | 9 ++++++++- .../workflows/smoke-update-cross-repo-pr.lock.yml | 9 ++++++++- .../smoke-workflow-call-with-inputs.lock.yml | 9 ++++++++- .github/workflows/smoke-workflow-call.lock.yml | 9 ++++++++- .github/workflows/stale-repo-identifier.lock.yml | 9 ++++++++- .github/workflows/sub-issue-closer.lock.yml | 9 ++++++++- .github/workflows/super-linter.lock.yml | 9 ++++++++- .github/workflows/technical-doc-writer.lock.yml | 9 ++++++++- .github/workflows/terminal-stylist.lock.yml | 9 ++++++++- .github/workflows/test-dispatcher.lock.yml | 9 ++++++++- .../workflows/test-project-url-default.lock.yml | 9 ++++++++- .github/workflows/test-workflow.lock.yml | 9 ++++++++- .github/workflows/tidy.lock.yml | 9 ++++++++- .github/workflows/ubuntu-image-analyzer.lock.yml | 9 ++++++++- .github/workflows/update-astro.lock.yml | 9 ++++++++- .github/workflows/video-analyzer.lock.yml | 9 ++++++++- .../workflows/weekly-blog-post-writer.lock.yml | 9 ++++++++- .../weekly-editors-health-check.lock.yml | 9 ++++++++- .github/workflows/weekly-issue-summary.lock.yml | 9 ++++++++- .../weekly-safe-outputs-spec-review.lock.yml | 9 ++++++++- .github/workflows/workflow-generator.lock.yml | 9 ++++++++- .../workflows/workflow-health-manager.lock.yml | 9 ++++++++- .github/workflows/workflow-normalizer.lock.yml | 9 ++++++++- .../workflows/workflow-skill-extractor.lock.yml | 9 ++++++++- pkg/workflow/copilot_engine_execution.go | 15 ++++++++++++--- pkg/workflow/copilot_session_copy_test.go | 15 +++++++++++++-- .../basic-copilot.golden | 9 ++++++++- .../with-imports.golden | 9 ++++++++- 123 files changed, 993 insertions(+), 126 deletions(-) diff --git a/.github/workflows/ace-editor.lock.yml b/.github/workflows/ace-editor.lock.yml index b8c958eac6f..b6d18872ef7 100644 --- a/.github/workflows/ace-editor.lock.yml +++ b/.github/workflows/ace-editor.lock.yml @@ -464,7 +464,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml index d77d4b9274d..099c73f284a 100644 --- a/.github/workflows/agent-performance-analyzer.lock.yml +++ b/.github/workflows/agent-performance-analyzer.lock.yml @@ -778,7 +778,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/agent-persona-explorer.lock.yml b/.github/workflows/agent-persona-explorer.lock.yml index 9401320c402..5accc78854e 100644 --- a/.github/workflows/agent-persona-explorer.lock.yml +++ b/.github/workflows/agent-persona-explorer.lock.yml @@ -727,7 +727,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/agentic-observability-kit.lock.yml b/.github/workflows/agentic-observability-kit.lock.yml index 14f3270fc55..33a2c4112b9 100644 --- a/.github/workflows/agentic-observability-kit.lock.yml +++ b/.github/workflows/agentic-observability-kit.lock.yml @@ -735,7 +735,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 1096fb206bf..9650f57bc42 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -742,7 +742,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index 30f9b5908b4..dc870783fe5 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -622,7 +622,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/auto-triage-issues.lock.yml b/.github/workflows/auto-triage-issues.lock.yml index 35949549591..0fb5f29a0c4 100644 --- a/.github/workflows/auto-triage-issues.lock.yml +++ b/.github/workflows/auto-triage-issues.lock.yml @@ -673,7 +673,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/bot-detection.lock.yml b/.github/workflows/bot-detection.lock.yml index afed2fb8dcd..b028b0915e9 100644 --- a/.github/workflows/bot-detection.lock.yml +++ b/.github/workflows/bot-detection.lock.yml @@ -703,7 +703,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index d4a74d0424b..ee770cab812 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -687,7 +687,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/breaking-change-checker.lock.yml b/.github/workflows/breaking-change-checker.lock.yml index a02d8ecb0b7..18937f4768f 100644 --- a/.github/workflows/breaking-change-checker.lock.yml +++ b/.github/workflows/breaking-change-checker.lock.yml @@ -655,7 +655,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/ci-coach.lock.yml b/.github/workflows/ci-coach.lock.yml index f675fa19652..01b33f5fbc5 100644 --- a/.github/workflows/ci-coach.lock.yml +++ b/.github/workflows/ci-coach.lock.yml @@ -705,7 +705,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml index 349db82894e..7c724edabd9 100644 --- a/.github/workflows/cli-consistency-checker.lock.yml +++ b/.github/workflows/cli-consistency-checker.lock.yml @@ -624,7 +624,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/code-scanning-fixer.lock.yml b/.github/workflows/code-scanning-fixer.lock.yml index 4d7edb067cd..92a77fae1a0 100644 --- a/.github/workflows/code-scanning-fixer.lock.yml +++ b/.github/workflows/code-scanning-fixer.lock.yml @@ -690,7 +690,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml index c27f979f8c9..322d2a0449a 100644 --- a/.github/workflows/code-simplifier.lock.yml +++ b/.github/workflows/code-simplifier.lock.yml @@ -646,7 +646,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/constraint-solving-potd.lock.yml b/.github/workflows/constraint-solving-potd.lock.yml index a9df560fe2d..edf5d791d4c 100644 --- a/.github/workflows/constraint-solving-potd.lock.yml +++ b/.github/workflows/constraint-solving-potd.lock.yml @@ -624,7 +624,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/contribution-check.lock.yml b/.github/workflows/contribution-check.lock.yml index 7f1d23b3a85..dbd356ce688 100644 --- a/.github/workflows/contribution-check.lock.yml +++ b/.github/workflows/contribution-check.lock.yml @@ -670,7 +670,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/copilot-cli-deep-research.lock.yml b/.github/workflows/copilot-cli-deep-research.lock.yml index f2e388b1848..557a23b07d3 100644 --- a/.github/workflows/copilot-cli-deep-research.lock.yml +++ b/.github/workflows/copilot-cli-deep-research.lock.yml @@ -671,7 +671,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/copilot-pr-merged-report.lock.yml b/.github/workflows/copilot-pr-merged-report.lock.yml index c2726d02356..61d779e65c0 100644 --- a/.github/workflows/copilot-pr-merged-report.lock.yml +++ b/.github/workflows/copilot-pr-merged-report.lock.yml @@ -784,7 +784,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index ec596d05027..25b590ddf53 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -736,7 +736,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index 50fb9019de0..c944b70898c 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -686,7 +686,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml index 20770710b88..075ec2960d6 100644 --- a/.github/workflows/craft.lock.yml +++ b/.github/workflows/craft.lock.yml @@ -689,7 +689,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-architecture-diagram.lock.yml b/.github/workflows/daily-architecture-diagram.lock.yml index 0d87283d127..43a3fdcca03 100644 --- a/.github/workflows/daily-architecture-diagram.lock.yml +++ b/.github/workflows/daily-architecture-diagram.lock.yml @@ -689,7 +689,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml index b0e2c267541..e1648ec9dd3 100644 --- a/.github/workflows/daily-assign-issue-to-user.lock.yml +++ b/.github/workflows/daily-assign-issue-to-user.lock.yml @@ -628,7 +628,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml index bd5fccc0bf6..60e6fe6a6ff 100644 --- a/.github/workflows/daily-cli-performance.lock.yml +++ b/.github/workflows/daily-cli-performance.lock.yml @@ -848,7 +848,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index 70dfb081236..2e7da4260e1 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -709,7 +709,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-community-attribution.lock.yml b/.github/workflows/daily-community-attribution.lock.yml index f579ed5b24a..252f44300cd 100644 --- a/.github/workflows/daily-community-attribution.lock.yml +++ b/.github/workflows/daily-community-attribution.lock.yml @@ -702,7 +702,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml index e47678a73f3..488381b9a86 100644 --- a/.github/workflows/daily-compiler-quality.lock.yml +++ b/.github/workflows/daily-compiler-quality.lock.yml @@ -728,7 +728,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index 87e85341698..6dabcdb64b4 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -745,7 +745,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 3ea0441871c..5af72fc17f9 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -722,7 +722,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index dbede7d511e..7014348b0d2 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -767,7 +767,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-integrity-analysis.lock.yml b/.github/workflows/daily-integrity-analysis.lock.yml index 496c7136686..c6586bd59a6 100644 --- a/.github/workflows/daily-integrity-analysis.lock.yml +++ b/.github/workflows/daily-integrity-analysis.lock.yml @@ -772,7 +772,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml index 74115c6237d..d867d1ddf54 100644 --- a/.github/workflows/daily-malicious-code-scan.lock.yml +++ b/.github/workflows/daily-malicious-code-scan.lock.yml @@ -634,7 +634,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml index 82ce28c3e8f..efb83d156d5 100644 --- a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml +++ b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml @@ -754,7 +754,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index b37196e316f..14efc1214c9 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -809,7 +809,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index e90fe6c1cf6..d3d104f00c3 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -1197,7 +1197,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index fc33ace55a2..d594b033c20 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -1132,7 +1132,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index baafa5429ba..3d459fab946 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -688,7 +688,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-safe-output-integrator.lock.yml b/.github/workflows/daily-safe-output-integrator.lock.yml index 6cd4374d145..30e3b5681f7 100644 --- a/.github/workflows/daily-safe-output-integrator.lock.yml +++ b/.github/workflows/daily-safe-output-integrator.lock.yml @@ -669,7 +669,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-secrets-analysis.lock.yml b/.github/workflows/daily-secrets-analysis.lock.yml index 1e2d289a03e..f4f4a31e6f7 100644 --- a/.github/workflows/daily-secrets-analysis.lock.yml +++ b/.github/workflows/daily-secrets-analysis.lock.yml @@ -651,7 +651,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml index 759eecd5d80..e7993b1799c 100644 --- a/.github/workflows/daily-semgrep-scan.lock.yml +++ b/.github/workflows/daily-semgrep-scan.lock.yml @@ -658,7 +658,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-syntax-error-quality.lock.yml b/.github/workflows/daily-syntax-error-quality.lock.yml index 76056fd19b9..b364e7f5baa 100644 --- a/.github/workflows/daily-syntax-error-quality.lock.yml +++ b/.github/workflows/daily-syntax-error-quality.lock.yml @@ -663,7 +663,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index d938732ed63..bef1e370cf9 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -642,7 +642,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml index 7b64fb31f27..0fe90305743 100644 --- a/.github/workflows/daily-testify-uber-super-expert.lock.yml +++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml @@ -746,7 +746,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml index 33612004f0e..a57f21f90c1 100644 --- a/.github/workflows/daily-workflow-updater.lock.yml +++ b/.github/workflows/daily-workflow-updater.lock.yml @@ -628,7 +628,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dead-code-remover.lock.yml b/.github/workflows/dead-code-remover.lock.yml index 0914f256409..ff267c55c91 100644 --- a/.github/workflows/dead-code-remover.lock.yml +++ b/.github/workflows/dead-code-remover.lock.yml @@ -676,7 +676,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml index 5e8a8b54516..bf10880f73b 100644 --- a/.github/workflows/delight.lock.yml +++ b/.github/workflows/delight.lock.yml @@ -709,7 +709,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dependabot-burner.lock.yml b/.github/workflows/dependabot-burner.lock.yml index b44bfb2498d..99f2516ff23 100644 --- a/.github/workflows/dependabot-burner.lock.yml +++ b/.github/workflows/dependabot-burner.lock.yml @@ -634,7 +634,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index 53bdfa948dd..508666d1383 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -652,7 +652,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 71a3c01094a..c2f8b3f980b 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -729,7 +729,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index 0ba06e4e50c..272f79c6f62 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -759,7 +759,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 92ff4115310..399a24b1f07 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -707,7 +707,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/discussion-task-miner.lock.yml b/.github/workflows/discussion-task-miner.lock.yml index 09f2379f1a7..084f59ab860 100644 --- a/.github/workflows/discussion-task-miner.lock.yml +++ b/.github/workflows/discussion-task-miner.lock.yml @@ -696,7 +696,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index acee931210c..1e78cc051c9 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -666,7 +666,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/draft-pr-cleanup.lock.yml b/.github/workflows/draft-pr-cleanup.lock.yml index 406f02d0522..bf414d7fd27 100644 --- a/.github/workflows/draft-pr-cleanup.lock.yml +++ b/.github/workflows/draft-pr-cleanup.lock.yml @@ -663,7 +663,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml index b089eea22a4..8f3e32febbb 100644 --- a/.github/workflows/example-permissions-warning.lock.yml +++ b/.github/workflows/example-permissions-warning.lock.yml @@ -432,7 +432,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml index ff2c266773f..6620ce8e031 100644 --- a/.github/workflows/firewall-escape.lock.yml +++ b/.github/workflows/firewall-escape.lock.yml @@ -686,7 +686,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml index 8d84f5e2405..649669df200 100644 --- a/.github/workflows/firewall.lock.yml +++ b/.github/workflows/firewall.lock.yml @@ -434,7 +434,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/functional-pragmatist.lock.yml b/.github/workflows/functional-pragmatist.lock.yml index 014256a2c7a..b684cc7d3d6 100644 --- a/.github/workflows/functional-pragmatist.lock.yml +++ b/.github/workflows/functional-pragmatist.lock.yml @@ -638,7 +638,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml index ec8d3bca1a6..a1d17782a26 100644 --- a/.github/workflows/github-remote-mcp-auth-test.lock.yml +++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml @@ -634,7 +634,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 744a79b939a..2e09a477d7b 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -833,7 +833,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/gpclean.lock.yml b/.github/workflows/gpclean.lock.yml index 0ecfa142202..7b93345399e 100644 --- a/.github/workflows/gpclean.lock.yml +++ b/.github/workflows/gpclean.lock.yml @@ -660,7 +660,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/hourly-ci-cleaner.lock.yml b/.github/workflows/hourly-ci-cleaner.lock.yml index 1b781581120..60c3bf8c54a 100644 --- a/.github/workflows/hourly-ci-cleaner.lock.yml +++ b/.github/workflows/hourly-ci-cleaner.lock.yml @@ -688,7 +688,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/issue-monster.lock.yml b/.github/workflows/issue-monster.lock.yml index 528a08f90cb..ff6e8f37d01 100644 --- a/.github/workflows/issue-monster.lock.yml +++ b/.github/workflows/issue-monster.lock.yml @@ -1018,7 +1018,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml index f63901b20a9..c7fd3634bed 100644 --- a/.github/workflows/issue-triage-agent.lock.yml +++ b/.github/workflows/issue-triage-agent.lock.yml @@ -618,7 +618,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index 042c1a73350..32085372968 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -731,7 +731,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/layout-spec-maintainer.lock.yml b/.github/workflows/layout-spec-maintainer.lock.yml index bcd779d5c6c..d6217937bc5 100644 --- a/.github/workflows/layout-spec-maintainer.lock.yml +++ b/.github/workflows/layout-spec-maintainer.lock.yml @@ -669,7 +669,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 2ab6a020f23..a6bc6153215 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -1147,7 +1147,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index 96a79cb9e73..48a72cbc69e 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -705,7 +705,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index 0d71795cd3f..e0a5fb1e23b 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -543,7 +543,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index 0cd9d2f7850..e88e5ef88d2 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -638,7 +638,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index 54b9e8f08c7..53ea21dcc16 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -694,7 +694,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 4abc1a65a38..14c73916608 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -766,7 +766,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index 5a6d47f2e37..dd7fe70fec3 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -710,7 +710,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index fe150e3e598..4cc6864bfe4 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1042,7 +1042,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index 5e762b1b82f..ceebac378c7 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -776,7 +776,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 52b48dc3e81..6c792cdb170 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -763,7 +763,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/pr-triage-agent.lock.yml b/.github/workflows/pr-triage-agent.lock.yml index 34e34c0833c..ec63fa427a5 100644 --- a/.github/workflows/pr-triage-agent.lock.yml +++ b/.github/workflows/pr-triage-agent.lock.yml @@ -689,7 +689,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 64eb1f50f7d..431aef7760e 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -764,7 +764,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 4d317bffd38..b4c5976f55d 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -921,7 +921,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/refiner.lock.yml b/.github/workflows/refiner.lock.yml index 8787f9c3c28..4e669c3df00 100644 --- a/.github/workflows/refiner.lock.yml +++ b/.github/workflows/refiner.lock.yml @@ -681,7 +681,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index ec3a59145e8..b6363d4a31c 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -670,7 +670,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/repo-audit-analyzer.lock.yml b/.github/workflows/repo-audit-analyzer.lock.yml index 0847c7eae69..709f19871c1 100644 --- a/.github/workflows/repo-audit-analyzer.lock.yml +++ b/.github/workflows/repo-audit-analyzer.lock.yml @@ -652,7 +652,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 9339cd4da83..c88a6ba518f 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -624,7 +624,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index ba92e737fa6..f61df346ff5 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -712,7 +712,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index d036a9bf547..7d699d11611 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -653,7 +653,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/security-compliance.lock.yml b/.github/workflows/security-compliance.lock.yml index b01455d2eb2..0620c44638d 100644 --- a/.github/workflows/security-compliance.lock.yml +++ b/.github/workflows/security-compliance.lock.yml @@ -668,7 +668,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/security-review.lock.yml b/.github/workflows/security-review.lock.yml index f31a8bc10a9..93b28643dcc 100644 --- a/.github/workflows/security-review.lock.yml +++ b/.github/workflows/security-review.lock.yml @@ -811,7 +811,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/slide-deck-maintainer.lock.yml b/.github/workflows/slide-deck-maintainer.lock.yml index 99811d9ca82..3ece8e1f39e 100644 --- a/.github/workflows/slide-deck-maintainer.lock.yml +++ b/.github/workflows/slide-deck-maintainer.lock.yml @@ -745,7 +745,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-copilot-arm.lock.yml b/.github/workflows/smoke-copilot-arm.lock.yml index 3ba52d45697..903ac5ae572 100644 --- a/.github/workflows/smoke-copilot-arm.lock.yml +++ b/.github/workflows/smoke-copilot-arm.lock.yml @@ -1577,7 +1577,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 8f6dc5527be..a4cbb70a3ae 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -1625,7 +1625,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-create-cross-repo-pr.lock.yml b/.github/workflows/smoke-create-cross-repo-pr.lock.yml index 38b00780f75..4456275b963 100644 --- a/.github/workflows/smoke-create-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-create-cross-repo-pr.lock.yml @@ -734,7 +734,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-multi-pr.lock.yml b/.github/workflows/smoke-multi-pr.lock.yml index b40264867b3..fb3c232c527 100644 --- a/.github/workflows/smoke-multi-pr.lock.yml +++ b/.github/workflows/smoke-multi-pr.lock.yml @@ -727,7 +727,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-project.lock.yml b/.github/workflows/smoke-project.lock.yml index 4f72a096daf..a92fc989489 100644 --- a/.github/workflows/smoke-project.lock.yml +++ b/.github/workflows/smoke-project.lock.yml @@ -859,7 +859,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-service-ports.lock.yml b/.github/workflows/smoke-service-ports.lock.yml index 16a28019ce8..fd6ccf2ddbb 100644 --- a/.github/workflows/smoke-service-ports.lock.yml +++ b/.github/workflows/smoke-service-ports.lock.yml @@ -637,7 +637,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-temporary-id.lock.yml b/.github/workflows/smoke-temporary-id.lock.yml index 64c5fd1b102..f7fbb384fbe 100644 --- a/.github/workflows/smoke-temporary-id.lock.yml +++ b/.github/workflows/smoke-temporary-id.lock.yml @@ -713,7 +713,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-test-tools.lock.yml b/.github/workflows/smoke-test-tools.lock.yml index 21b323c92df..02f3df14f02 100644 --- a/.github/workflows/smoke-test-tools.lock.yml +++ b/.github/workflows/smoke-test-tools.lock.yml @@ -674,7 +674,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-update-cross-repo-pr.lock.yml b/.github/workflows/smoke-update-cross-repo-pr.lock.yml index 6addf8868c4..03df0101e17 100644 --- a/.github/workflows/smoke-update-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-update-cross-repo-pr.lock.yml @@ -746,7 +746,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml index 44641af362c..e986a8ca0b8 100644 --- a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml +++ b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml @@ -695,7 +695,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/smoke-workflow-call.lock.yml b/.github/workflows/smoke-workflow-call.lock.yml index 24349a15377..ae58178e2d7 100644 --- a/.github/workflows/smoke-workflow-call.lock.yml +++ b/.github/workflows/smoke-workflow-call.lock.yml @@ -683,7 +683,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index cb367ad1c43..8a788d76a03 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -750,7 +750,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/sub-issue-closer.lock.yml b/.github/workflows/sub-issue-closer.lock.yml index ded14250608..7ef5d78f218 100644 --- a/.github/workflows/sub-issue-closer.lock.yml +++ b/.github/workflows/sub-issue-closer.lock.yml @@ -666,7 +666,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index f45c340e62a..4983cbc60c9 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -668,7 +668,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 385621fecd0..0308e4a63c4 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -827,7 +827,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/terminal-stylist.lock.yml b/.github/workflows/terminal-stylist.lock.yml index d807d79def2..2adf2005ca9 100644 --- a/.github/workflows/terminal-stylist.lock.yml +++ b/.github/workflows/terminal-stylist.lock.yml @@ -687,7 +687,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/test-dispatcher.lock.yml b/.github/workflows/test-dispatcher.lock.yml index 3b8b4f722c1..f34ad3cc6b4 100644 --- a/.github/workflows/test-dispatcher.lock.yml +++ b/.github/workflows/test-dispatcher.lock.yml @@ -608,7 +608,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/test-project-url-default.lock.yml b/.github/workflows/test-project-url-default.lock.yml index ceeefe22e89..169d8c7cf78 100644 --- a/.github/workflows/test-project-url-default.lock.yml +++ b/.github/workflows/test-project-url-default.lock.yml @@ -668,7 +668,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/test-workflow.lock.yml b/.github/workflows/test-workflow.lock.yml index f859f24c03e..b4280862633 100644 --- a/.github/workflows/test-workflow.lock.yml +++ b/.github/workflows/test-workflow.lock.yml @@ -433,7 +433,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 8f01c7954f3..d0f1a320b9d 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -756,7 +756,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/ubuntu-image-analyzer.lock.yml b/.github/workflows/ubuntu-image-analyzer.lock.yml index 57d79970579..758457f15f7 100644 --- a/.github/workflows/ubuntu-image-analyzer.lock.yml +++ b/.github/workflows/ubuntu-image-analyzer.lock.yml @@ -670,7 +670,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/update-astro.lock.yml b/.github/workflows/update-astro.lock.yml index 2014d465cb0..87f3f248cb6 100644 --- a/.github/workflows/update-astro.lock.yml +++ b/.github/workflows/update-astro.lock.yml @@ -651,7 +651,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index c966e105970..674697aa205 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -661,7 +661,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/weekly-blog-post-writer.lock.yml b/.github/workflows/weekly-blog-post-writer.lock.yml index ce04da6b09f..d1d2de12c2f 100644 --- a/.github/workflows/weekly-blog-post-writer.lock.yml +++ b/.github/workflows/weekly-blog-post-writer.lock.yml @@ -815,7 +815,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/weekly-editors-health-check.lock.yml b/.github/workflows/weekly-editors-health-check.lock.yml index acf66621785..826fa86867c 100644 --- a/.github/workflows/weekly-editors-health-check.lock.yml +++ b/.github/workflows/weekly-editors-health-check.lock.yml @@ -693,7 +693,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index 32ac5417e55..17d95a0dc9e 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -674,7 +674,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml index 12b4aca8f0a..7f605f275d7 100644 --- a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml +++ b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml @@ -630,7 +630,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/workflow-generator.lock.yml b/.github/workflows/workflow-generator.lock.yml index 2d9d4b8acfc..65ea613563d 100644 --- a/.github/workflows/workflow-generator.lock.yml +++ b/.github/workflows/workflow-generator.lock.yml @@ -707,7 +707,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml index 82eac6cff45..fb01e8dde5b 100644 --- a/.github/workflows/workflow-health-manager.lock.yml +++ b/.github/workflows/workflow-health-manager.lock.yml @@ -734,7 +734,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/workflow-normalizer.lock.yml b/.github/workflows/workflow-normalizer.lock.yml index 292a9131f9c..7ca8be9fe5e 100644 --- a/.github/workflows/workflow-normalizer.lock.yml +++ b/.github/workflows/workflow-normalizer.lock.yml @@ -708,7 +708,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/.github/workflows/workflow-skill-extractor.lock.yml b/.github/workflows/workflow-skill-extractor.lock.yml index 8dcfa59f23b..b1abc8baa44 100644 --- a/.github/workflows/workflow-skill-extractor.lock.yml +++ b/.github/workflows/workflow-skill-extractor.lock.yml @@ -679,7 +679,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/pkg/workflow/copilot_engine_execution.go b/pkg/workflow/copilot_engine_execution.go index d5bf3e2ca0d..3c4cd1c89c1 100644 --- a/pkg/workflow/copilot_engine_execution.go +++ b/pkg/workflow/copilot_engine_execution.go @@ -435,8 +435,10 @@ func extractAddDirPaths(args []string) []string { } // generateCopilotSessionFileCopyStep generates a step to copy Copilot session state files -// from ~/.copilot/session-state/ to /tmp/gh-aw/sandbox/agent/logs/ -// This ensures session files are in /tmp/gh-aw/ where secret redaction can scan them +// from ~/.copilot/session-state// to /tmp/gh-aw/sandbox/agent/logs/ +// This ensures session files are in /tmp/gh-aw/ where secret redaction can scan them. +// Copilot CLI writes events.jsonl inside session subdirectories, so we use find +// to recursively locate them and preserve the session ID in the filename. func generateCopilotSessionFileCopyStep() GitHubActionStep { var step []string @@ -452,7 +454,14 @@ func generateCopilotSessionFileCopyStep() GitHubActionStep { step = append(step, " if [ -d \"$SESSION_STATE_DIR\" ]; then") step = append(step, " echo \"Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR\"") step = append(step, " mkdir -p \"$LOGS_DIR\"") - step = append(step, " cp -v \"$SESSION_STATE_DIR\"/*.jsonl \"$LOGS_DIR/\" 2>/dev/null || true") + step = append(step, " # Copilot CLI writes events.jsonl inside session subdirectories:") + step = append(step, " # ~/.copilot/session-state//events.jsonl") + step = append(step, " # Use find to recursively locate .jsonl files and preserve session ID in filename") + step = append(step, " find \"$SESSION_STATE_DIR\" -name '*.jsonl' -type f | while read -r f; do") + step = append(step, " session_id=$(basename \"$(dirname \"$f\")\")") + step = append(step, " filename=$(basename \"$f\" .jsonl)") + step = append(step, " cp -v \"$f\" \"$LOGS_DIR/${filename}-${session_id}.jsonl\"") + step = append(step, " done") step = append(step, " echo \"Session state files copied successfully\"") step = append(step, " else") step = append(step, " echo \"No session-state directory found at $SESSION_STATE_DIR\"") diff --git a/pkg/workflow/copilot_session_copy_test.go b/pkg/workflow/copilot_session_copy_test.go index 208c8c1f865..b588029826d 100644 --- a/pkg/workflow/copilot_session_copy_test.go +++ b/pkg/workflow/copilot_session_copy_test.go @@ -49,9 +49,20 @@ func TestCopilotSessionFileCopyStep(t *testing.T) { t.Error("Expected step to reference '/tmp/gh-aw/sandbox/agent/logs' directory") } - // Verify .jsonl file copy + // Verify recursive find for .jsonl files in session subdirectories + if !strings.Contains(stepContent, "find") { + t.Error("Expected step to use 'find' for recursive .jsonl file discovery") + } if !strings.Contains(stepContent, "*.jsonl") { - t.Error("Expected step to copy *.jsonl files") + t.Error("Expected step to search for *.jsonl files") + } + + // Verify session ID is preserved in the output filename + if !strings.Contains(stepContent, "session_id=$(basename") { + t.Error("Expected step to extract session_id from parent directory") + } + if !strings.Contains(stepContent, "${filename}-${session_id}.jsonl") { + t.Error("Expected step to include session_id in output filename to avoid collisions") } // Verify cp command diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden index 351987b3cf1..7159868f3fc 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden @@ -411,7 +411,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden index 225a3cf3513..8dccca478fd 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden @@ -412,7 +412,14 @@ jobs: if [ -d "$SESSION_STATE_DIR" ]; then echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - cp -v "$SESSION_STATE_DIR"/*.jsonl "$LOGS_DIR/" 2>/dev/null || true + # Copilot CLI writes events.jsonl inside session subdirectories: + # ~/.copilot/session-state//events.jsonl + # Use find to recursively locate .jsonl files and preserve session ID in filename + find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do + session_id=$(basename "$(dirname "$f")") + filename=$(basename "$f" .jsonl) + cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" + done echo "Session state files copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" From d8bd40819a44ef0e5345ad5ff1e0097eaa86cd1d Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Wed, 1 Apr 2026 19:01:43 -0700 Subject: [PATCH 2/4] fix: copy entire session-state directory instead of just .jsonl files Copy the full ~/.copilot/session-state/ tree (events.jsonl, session.db, plan.md, checkpoints, files) into a dedicated copilot-session-state/ subdirectory under the agent logs. This preserves the complete session context including subdirectory structure with session UUIDs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ace-editor.lock.yml | 17 ++++------- .../agent-performance-analyzer.lock.yml | 17 ++++------- .../workflows/agent-persona-explorer.lock.yml | 17 ++++------- .../agentic-observability-kit.lock.yml | 17 ++++------- .github/workflows/archie.lock.yml | 17 ++++------- .github/workflows/artifacts-summary.lock.yml | 17 ++++------- .github/workflows/auto-triage-issues.lock.yml | 17 ++++------- .github/workflows/bot-detection.lock.yml | 17 ++++------- .github/workflows/brave.lock.yml | 17 ++++------- .../breaking-change-checker.lock.yml | 17 ++++------- .github/workflows/ci-coach.lock.yml | 17 ++++------- .../cli-consistency-checker.lock.yml | 17 ++++------- .../workflows/code-scanning-fixer.lock.yml | 17 ++++------- .github/workflows/code-simplifier.lock.yml | 17 ++++------- .../constraint-solving-potd.lock.yml | 17 ++++------- .github/workflows/contribution-check.lock.yml | 17 ++++------- .../copilot-cli-deep-research.lock.yml | 17 ++++------- .../copilot-pr-merged-report.lock.yml | 17 ++++------- .../copilot-pr-nlp-analysis.lock.yml | 17 ++++------- .../copilot-pr-prompt-analysis.lock.yml | 17 ++++------- .github/workflows/craft.lock.yml | 17 ++++------- .../daily-architecture-diagram.lock.yml | 17 ++++------- .../daily-assign-issue-to-user.lock.yml | 17 ++++------- .../workflows/daily-cli-performance.lock.yml | 17 ++++------- .../workflows/daily-cli-tools-tester.lock.yml | 17 ++++------- .../daily-community-attribution.lock.yml | 17 ++++------- .../workflows/daily-compiler-quality.lock.yml | 17 ++++------- .../daily-copilot-token-report.lock.yml | 17 ++++------- .github/workflows/daily-file-diet.lock.yml | 17 ++++------- .../workflows/daily-firewall-report.lock.yml | 17 ++++------- .../daily-integrity-analysis.lock.yml | 17 ++++------- .../daily-malicious-code-scan.lock.yml | 17 ++++------- .../daily-mcp-concurrency-analysis.lock.yml | 17 ++++------- .github/workflows/daily-news.lock.yml | 17 ++++------- .../daily-performance-summary.lock.yml | 17 ++++------- .github/workflows/daily-regulatory.lock.yml | 17 ++++------- .../workflows/daily-repo-chronicle.lock.yml | 17 ++++------- .../daily-safe-output-integrator.lock.yml | 17 ++++------- .../workflows/daily-secrets-analysis.lock.yml | 17 ++++------- .github/workflows/daily-semgrep-scan.lock.yml | 17 ++++------- .../daily-syntax-error-quality.lock.yml | 17 ++++------- .github/workflows/daily-team-status.lock.yml | 17 ++++------- .../daily-testify-uber-super-expert.lock.yml | 17 ++++------- .../workflows/daily-workflow-updater.lock.yml | 17 ++++------- .github/workflows/dead-code-remover.lock.yml | 17 ++++------- .github/workflows/delight.lock.yml | 17 ++++------- .github/workflows/dependabot-burner.lock.yml | 17 ++++------- .../workflows/dependabot-go-checker.lock.yml | 17 ++++------- .github/workflows/dev-hawk.lock.yml | 17 ++++------- .github/workflows/dev.lock.yml | 17 ++++------- .github/workflows/dictation-prompt.lock.yml | 17 ++++------- .../workflows/discussion-task-miner.lock.yml | 17 ++++------- .github/workflows/docs-noob-tester.lock.yml | 17 ++++------- .github/workflows/draft-pr-cleanup.lock.yml | 17 ++++------- .../example-permissions-warning.lock.yml | 17 ++++------- .github/workflows/firewall-escape.lock.yml | 17 ++++------- .github/workflows/firewall.lock.yml | 17 ++++------- .../workflows/functional-pragmatist.lock.yml | 17 ++++------- .../github-remote-mcp-auth-test.lock.yml | 17 ++++------- .../workflows/glossary-maintainer.lock.yml | 17 ++++------- .github/workflows/gpclean.lock.yml | 17 ++++------- .github/workflows/hourly-ci-cleaner.lock.yml | 17 ++++------- .github/workflows/issue-monster.lock.yml | 17 ++++------- .github/workflows/issue-triage-agent.lock.yml | 17 ++++------- .github/workflows/jsweep.lock.yml | 17 ++++------- .../workflows/layout-spec-maintainer.lock.yml | 17 ++++------- .github/workflows/mcp-inspector.lock.yml | 17 ++++------- .github/workflows/mergefest.lock.yml | 17 ++++------- .github/workflows/metrics-collector.lock.yml | 17 ++++------- .../workflows/notion-issue-summary.lock.yml | 17 ++++------- .github/workflows/org-health-report.lock.yml | 17 ++++------- .github/workflows/pdf-summary.lock.yml | 17 ++++------- .github/workflows/plan.lock.yml | 17 ++++------- .github/workflows/poem-bot.lock.yml | 17 ++++------- .github/workflows/portfolio-analyst.lock.yml | 17 ++++------- .../workflows/pr-nitpick-reviewer.lock.yml | 17 ++++------- .github/workflows/pr-triage-agent.lock.yml | 17 ++++------- .github/workflows/python-data-charts.lock.yml | 17 ++++------- .github/workflows/q.lock.yml | 17 ++++------- .github/workflows/refiner.lock.yml | 17 ++++------- .github/workflows/release.lock.yml | 17 ++++------- .../workflows/repo-audit-analyzer.lock.yml | 17 ++++------- .github/workflows/repo-tree-map.lock.yml | 17 ++++------- .../repository-quality-improver.lock.yml | 17 ++++------- .github/workflows/research.lock.yml | 17 ++++------- .../workflows/security-compliance.lock.yml | 17 ++++------- .github/workflows/security-review.lock.yml | 17 ++++------- .../workflows/slide-deck-maintainer.lock.yml | 17 ++++------- .github/workflows/smoke-copilot-arm.lock.yml | 17 ++++------- .github/workflows/smoke-copilot.lock.yml | 17 ++++------- .../smoke-create-cross-repo-pr.lock.yml | 17 ++++------- .github/workflows/smoke-multi-pr.lock.yml | 17 ++++------- .github/workflows/smoke-project.lock.yml | 17 ++++------- .../workflows/smoke-service-ports.lock.yml | 17 ++++------- .github/workflows/smoke-temporary-id.lock.yml | 17 ++++------- .github/workflows/smoke-test-tools.lock.yml | 17 ++++------- .../smoke-update-cross-repo-pr.lock.yml | 17 ++++------- .../smoke-workflow-call-with-inputs.lock.yml | 17 ++++------- .../workflows/smoke-workflow-call.lock.yml | 17 ++++------- .../workflows/stale-repo-identifier.lock.yml | 17 ++++------- .github/workflows/sub-issue-closer.lock.yml | 17 ++++------- .github/workflows/super-linter.lock.yml | 17 ++++------- .../workflows/technical-doc-writer.lock.yml | 17 ++++------- .github/workflows/terminal-stylist.lock.yml | 17 ++++------- .github/workflows/test-dispatcher.lock.yml | 17 ++++------- .../test-project-url-default.lock.yml | 17 ++++------- .github/workflows/test-workflow.lock.yml | 17 ++++------- .github/workflows/tidy.lock.yml | 17 ++++------- .../workflows/ubuntu-image-analyzer.lock.yml | 17 ++++------- .github/workflows/update-astro.lock.yml | 17 ++++------- .github/workflows/video-analyzer.lock.yml | 17 ++++------- .../weekly-blog-post-writer.lock.yml | 17 ++++------- .../weekly-editors-health-check.lock.yml | 17 ++++------- .../workflows/weekly-issue-summary.lock.yml | 17 ++++------- .../weekly-safe-outputs-spec-review.lock.yml | 17 ++++------- .github/workflows/workflow-generator.lock.yml | 17 ++++------- .../workflow-health-manager.lock.yml | 17 ++++------- .../workflows/workflow-normalizer.lock.yml | 17 ++++------- .../workflow-skill-extractor.lock.yml | 17 ++++------- pkg/workflow/copilot_engine_execution.go | 26 ++++++----------- pkg/workflow/copilot_session_copy_test.go | 28 ++++--------------- .../basic-copilot.golden | 17 ++++------- .../with-imports.golden | 17 ++++------- 123 files changed, 620 insertions(+), 1491 deletions(-) diff --git a/.github/workflows/ace-editor.lock.yml b/.github/workflows/ace-editor.lock.yml index b6d18872ef7..475eae54847 100644 --- a/.github/workflows/ace-editor.lock.yml +++ b/.github/workflows/ace-editor.lock.yml @@ -456,23 +456,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml index 099c73f284a..11e257d781a 100644 --- a/.github/workflows/agent-performance-analyzer.lock.yml +++ b/.github/workflows/agent-performance-analyzer.lock.yml @@ -770,23 +770,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/agent-persona-explorer.lock.yml b/.github/workflows/agent-persona-explorer.lock.yml index 5accc78854e..baac3701baa 100644 --- a/.github/workflows/agent-persona-explorer.lock.yml +++ b/.github/workflows/agent-persona-explorer.lock.yml @@ -719,23 +719,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/agentic-observability-kit.lock.yml b/.github/workflows/agentic-observability-kit.lock.yml index 33a2c4112b9..337ecf2a4e3 100644 --- a/.github/workflows/agentic-observability-kit.lock.yml +++ b/.github/workflows/agentic-observability-kit.lock.yml @@ -727,23 +727,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 9650f57bc42..35d20ca9bad 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -734,23 +734,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index dc870783fe5..e4c36688e51 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -614,23 +614,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/auto-triage-issues.lock.yml b/.github/workflows/auto-triage-issues.lock.yml index 0fb5f29a0c4..b729703d097 100644 --- a/.github/workflows/auto-triage-issues.lock.yml +++ b/.github/workflows/auto-triage-issues.lock.yml @@ -665,23 +665,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/bot-detection.lock.yml b/.github/workflows/bot-detection.lock.yml index b028b0915e9..f469e3621bc 100644 --- a/.github/workflows/bot-detection.lock.yml +++ b/.github/workflows/bot-detection.lock.yml @@ -695,23 +695,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index ee770cab812..576b60b19c4 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -679,23 +679,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/breaking-change-checker.lock.yml b/.github/workflows/breaking-change-checker.lock.yml index 18937f4768f..6b260faaaae 100644 --- a/.github/workflows/breaking-change-checker.lock.yml +++ b/.github/workflows/breaking-change-checker.lock.yml @@ -647,23 +647,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/ci-coach.lock.yml b/.github/workflows/ci-coach.lock.yml index 01b33f5fbc5..de2eb53ed7e 100644 --- a/.github/workflows/ci-coach.lock.yml +++ b/.github/workflows/ci-coach.lock.yml @@ -697,23 +697,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml index 7c724edabd9..ab5ad26b608 100644 --- a/.github/workflows/cli-consistency-checker.lock.yml +++ b/.github/workflows/cli-consistency-checker.lock.yml @@ -616,23 +616,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/code-scanning-fixer.lock.yml b/.github/workflows/code-scanning-fixer.lock.yml index 92a77fae1a0..4841cced11b 100644 --- a/.github/workflows/code-scanning-fixer.lock.yml +++ b/.github/workflows/code-scanning-fixer.lock.yml @@ -682,23 +682,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml index 322d2a0449a..0db56bfc4aa 100644 --- a/.github/workflows/code-simplifier.lock.yml +++ b/.github/workflows/code-simplifier.lock.yml @@ -638,23 +638,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/constraint-solving-potd.lock.yml b/.github/workflows/constraint-solving-potd.lock.yml index edf5d791d4c..4649a8d5428 100644 --- a/.github/workflows/constraint-solving-potd.lock.yml +++ b/.github/workflows/constraint-solving-potd.lock.yml @@ -616,23 +616,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/contribution-check.lock.yml b/.github/workflows/contribution-check.lock.yml index dbd356ce688..d8800f60dd0 100644 --- a/.github/workflows/contribution-check.lock.yml +++ b/.github/workflows/contribution-check.lock.yml @@ -662,23 +662,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/copilot-cli-deep-research.lock.yml b/.github/workflows/copilot-cli-deep-research.lock.yml index 557a23b07d3..f9095472b05 100644 --- a/.github/workflows/copilot-cli-deep-research.lock.yml +++ b/.github/workflows/copilot-cli-deep-research.lock.yml @@ -663,23 +663,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/copilot-pr-merged-report.lock.yml b/.github/workflows/copilot-pr-merged-report.lock.yml index 61d779e65c0..2f0245b01cb 100644 --- a/.github/workflows/copilot-pr-merged-report.lock.yml +++ b/.github/workflows/copilot-pr-merged-report.lock.yml @@ -776,23 +776,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index 25b590ddf53..29c4036b556 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -728,23 +728,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index c944b70898c..8ee9ec069a5 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -678,23 +678,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml index 075ec2960d6..0d2a28b1f3c 100644 --- a/.github/workflows/craft.lock.yml +++ b/.github/workflows/craft.lock.yml @@ -681,23 +681,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-architecture-diagram.lock.yml b/.github/workflows/daily-architecture-diagram.lock.yml index 43a3fdcca03..7a38aba907d 100644 --- a/.github/workflows/daily-architecture-diagram.lock.yml +++ b/.github/workflows/daily-architecture-diagram.lock.yml @@ -681,23 +681,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml index e1648ec9dd3..87585ebfd87 100644 --- a/.github/workflows/daily-assign-issue-to-user.lock.yml +++ b/.github/workflows/daily-assign-issue-to-user.lock.yml @@ -620,23 +620,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml index 60e6fe6a6ff..27ca182c84d 100644 --- a/.github/workflows/daily-cli-performance.lock.yml +++ b/.github/workflows/daily-cli-performance.lock.yml @@ -840,23 +840,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index 2e7da4260e1..9b117d6f9ab 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -701,23 +701,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-community-attribution.lock.yml b/.github/workflows/daily-community-attribution.lock.yml index 252f44300cd..4f391c6c89c 100644 --- a/.github/workflows/daily-community-attribution.lock.yml +++ b/.github/workflows/daily-community-attribution.lock.yml @@ -694,23 +694,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml index 488381b9a86..96ac757a4f6 100644 --- a/.github/workflows/daily-compiler-quality.lock.yml +++ b/.github/workflows/daily-compiler-quality.lock.yml @@ -720,23 +720,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index 6dabcdb64b4..6665bdef201 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -737,23 +737,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 5af72fc17f9..ad07f24d297 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -714,23 +714,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 7014348b0d2..d488f8712b8 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -759,23 +759,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-integrity-analysis.lock.yml b/.github/workflows/daily-integrity-analysis.lock.yml index c6586bd59a6..68ea02d6c20 100644 --- a/.github/workflows/daily-integrity-analysis.lock.yml +++ b/.github/workflows/daily-integrity-analysis.lock.yml @@ -764,23 +764,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml index d867d1ddf54..be3b1e8acd3 100644 --- a/.github/workflows/daily-malicious-code-scan.lock.yml +++ b/.github/workflows/daily-malicious-code-scan.lock.yml @@ -626,23 +626,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml index efb83d156d5..3141e4b193a 100644 --- a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml +++ b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml @@ -746,23 +746,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index 14efc1214c9..8fe2d481b46 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -801,23 +801,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index d3d104f00c3..f70c819ff7a 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -1189,23 +1189,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index d594b033c20..08b0f2e0ff5 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -1124,23 +1124,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 3d459fab946..86f14ff422f 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -680,23 +680,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-safe-output-integrator.lock.yml b/.github/workflows/daily-safe-output-integrator.lock.yml index 30e3b5681f7..856a3a27013 100644 --- a/.github/workflows/daily-safe-output-integrator.lock.yml +++ b/.github/workflows/daily-safe-output-integrator.lock.yml @@ -661,23 +661,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-secrets-analysis.lock.yml b/.github/workflows/daily-secrets-analysis.lock.yml index f4f4a31e6f7..4fab7caad7f 100644 --- a/.github/workflows/daily-secrets-analysis.lock.yml +++ b/.github/workflows/daily-secrets-analysis.lock.yml @@ -643,23 +643,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml index e7993b1799c..8e5aaaf3fb5 100644 --- a/.github/workflows/daily-semgrep-scan.lock.yml +++ b/.github/workflows/daily-semgrep-scan.lock.yml @@ -650,23 +650,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-syntax-error-quality.lock.yml b/.github/workflows/daily-syntax-error-quality.lock.yml index b364e7f5baa..0a6a961bbed 100644 --- a/.github/workflows/daily-syntax-error-quality.lock.yml +++ b/.github/workflows/daily-syntax-error-quality.lock.yml @@ -655,23 +655,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index bef1e370cf9..50da9e9752d 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -634,23 +634,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml index 0fe90305743..35bff366e77 100644 --- a/.github/workflows/daily-testify-uber-super-expert.lock.yml +++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml @@ -738,23 +738,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml index a57f21f90c1..edbe67c0208 100644 --- a/.github/workflows/daily-workflow-updater.lock.yml +++ b/.github/workflows/daily-workflow-updater.lock.yml @@ -620,23 +620,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dead-code-remover.lock.yml b/.github/workflows/dead-code-remover.lock.yml index ff267c55c91..1f1245f657d 100644 --- a/.github/workflows/dead-code-remover.lock.yml +++ b/.github/workflows/dead-code-remover.lock.yml @@ -668,23 +668,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml index bf10880f73b..a054e8e05cb 100644 --- a/.github/workflows/delight.lock.yml +++ b/.github/workflows/delight.lock.yml @@ -701,23 +701,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dependabot-burner.lock.yml b/.github/workflows/dependabot-burner.lock.yml index 99f2516ff23..ace2641a02b 100644 --- a/.github/workflows/dependabot-burner.lock.yml +++ b/.github/workflows/dependabot-burner.lock.yml @@ -626,23 +626,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index 508666d1383..5be44134dd2 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -644,23 +644,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index c2f8b3f980b..8d0c2d9e5c4 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -721,23 +721,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index 272f79c6f62..e58585b6852 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -751,23 +751,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 399a24b1f07..dcdac6912a5 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -699,23 +699,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/discussion-task-miner.lock.yml b/.github/workflows/discussion-task-miner.lock.yml index 084f59ab860..08d8cf3dcfb 100644 --- a/.github/workflows/discussion-task-miner.lock.yml +++ b/.github/workflows/discussion-task-miner.lock.yml @@ -688,23 +688,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index 1e78cc051c9..a5d76aa4b72 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -658,23 +658,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/draft-pr-cleanup.lock.yml b/.github/workflows/draft-pr-cleanup.lock.yml index bf414d7fd27..472265b25e0 100644 --- a/.github/workflows/draft-pr-cleanup.lock.yml +++ b/.github/workflows/draft-pr-cleanup.lock.yml @@ -655,23 +655,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml index 8f3e32febbb..786572a0054 100644 --- a/.github/workflows/example-permissions-warning.lock.yml +++ b/.github/workflows/example-permissions-warning.lock.yml @@ -424,23 +424,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml index 6620ce8e031..3987641faa5 100644 --- a/.github/workflows/firewall-escape.lock.yml +++ b/.github/workflows/firewall-escape.lock.yml @@ -678,23 +678,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml index 649669df200..7048d6ab2ab 100644 --- a/.github/workflows/firewall.lock.yml +++ b/.github/workflows/firewall.lock.yml @@ -426,23 +426,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/functional-pragmatist.lock.yml b/.github/workflows/functional-pragmatist.lock.yml index b684cc7d3d6..5dce3c9a1dd 100644 --- a/.github/workflows/functional-pragmatist.lock.yml +++ b/.github/workflows/functional-pragmatist.lock.yml @@ -630,23 +630,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml index a1d17782a26..f2428834718 100644 --- a/.github/workflows/github-remote-mcp-auth-test.lock.yml +++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml @@ -626,23 +626,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 2e09a477d7b..681bdbc2077 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -825,23 +825,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/gpclean.lock.yml b/.github/workflows/gpclean.lock.yml index 7b93345399e..33998977f4a 100644 --- a/.github/workflows/gpclean.lock.yml +++ b/.github/workflows/gpclean.lock.yml @@ -652,23 +652,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/hourly-ci-cleaner.lock.yml b/.github/workflows/hourly-ci-cleaner.lock.yml index 60c3bf8c54a..82692c27cb0 100644 --- a/.github/workflows/hourly-ci-cleaner.lock.yml +++ b/.github/workflows/hourly-ci-cleaner.lock.yml @@ -680,23 +680,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/issue-monster.lock.yml b/.github/workflows/issue-monster.lock.yml index ff6e8f37d01..013ee208b2c 100644 --- a/.github/workflows/issue-monster.lock.yml +++ b/.github/workflows/issue-monster.lock.yml @@ -1010,23 +1010,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml index c7fd3634bed..0f205d86f2c 100644 --- a/.github/workflows/issue-triage-agent.lock.yml +++ b/.github/workflows/issue-triage-agent.lock.yml @@ -610,23 +610,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index 32085372968..eaed2b0a772 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -723,23 +723,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/layout-spec-maintainer.lock.yml b/.github/workflows/layout-spec-maintainer.lock.yml index d6217937bc5..046c799d137 100644 --- a/.github/workflows/layout-spec-maintainer.lock.yml +++ b/.github/workflows/layout-spec-maintainer.lock.yml @@ -661,23 +661,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index a6bc6153215..dd598c5873e 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -1139,23 +1139,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index 48a72cbc69e..2b442bbe580 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -697,23 +697,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index e0a5fb1e23b..937f9d7659d 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -535,23 +535,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index e88e5ef88d2..1910de21923 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -630,23 +630,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index 53ea21dcc16..57f5db915fa 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -686,23 +686,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 14c73916608..b4e15b96612 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -758,23 +758,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index dd7fe70fec3..c5d53abadaa 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -702,23 +702,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 4cc6864bfe4..c59e716560c 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1034,23 +1034,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index ceebac378c7..23bd75532c1 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -768,23 +768,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 6c792cdb170..94085612ddc 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -755,23 +755,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/pr-triage-agent.lock.yml b/.github/workflows/pr-triage-agent.lock.yml index ec63fa427a5..703e69349a0 100644 --- a/.github/workflows/pr-triage-agent.lock.yml +++ b/.github/workflows/pr-triage-agent.lock.yml @@ -681,23 +681,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 431aef7760e..077678712a5 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -756,23 +756,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index b4c5976f55d..f07e1c90f84 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -913,23 +913,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/refiner.lock.yml b/.github/workflows/refiner.lock.yml index 4e669c3df00..7e4676cbb73 100644 --- a/.github/workflows/refiner.lock.yml +++ b/.github/workflows/refiner.lock.yml @@ -673,23 +673,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index b6363d4a31c..ecc11957a8d 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -662,23 +662,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/repo-audit-analyzer.lock.yml b/.github/workflows/repo-audit-analyzer.lock.yml index 709f19871c1..c857b1c9028 100644 --- a/.github/workflows/repo-audit-analyzer.lock.yml +++ b/.github/workflows/repo-audit-analyzer.lock.yml @@ -644,23 +644,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index c88a6ba518f..d81a53ec473 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -616,23 +616,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index f61df346ff5..e83fc5a39ac 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -704,23 +704,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index 7d699d11611..d71bd5deab7 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -645,23 +645,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/security-compliance.lock.yml b/.github/workflows/security-compliance.lock.yml index 0620c44638d..6b4e727be4f 100644 --- a/.github/workflows/security-compliance.lock.yml +++ b/.github/workflows/security-compliance.lock.yml @@ -660,23 +660,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/security-review.lock.yml b/.github/workflows/security-review.lock.yml index 93b28643dcc..fed6f5b5363 100644 --- a/.github/workflows/security-review.lock.yml +++ b/.github/workflows/security-review.lock.yml @@ -803,23 +803,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/slide-deck-maintainer.lock.yml b/.github/workflows/slide-deck-maintainer.lock.yml index 3ece8e1f39e..fc3f0a1dab9 100644 --- a/.github/workflows/slide-deck-maintainer.lock.yml +++ b/.github/workflows/slide-deck-maintainer.lock.yml @@ -737,23 +737,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-copilot-arm.lock.yml b/.github/workflows/smoke-copilot-arm.lock.yml index 903ac5ae572..a9e3b5720b5 100644 --- a/.github/workflows/smoke-copilot-arm.lock.yml +++ b/.github/workflows/smoke-copilot-arm.lock.yml @@ -1569,23 +1569,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index a4cbb70a3ae..697e877705f 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -1617,23 +1617,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-create-cross-repo-pr.lock.yml b/.github/workflows/smoke-create-cross-repo-pr.lock.yml index 4456275b963..b7a8b3e2754 100644 --- a/.github/workflows/smoke-create-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-create-cross-repo-pr.lock.yml @@ -726,23 +726,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-multi-pr.lock.yml b/.github/workflows/smoke-multi-pr.lock.yml index fb3c232c527..c696a76d349 100644 --- a/.github/workflows/smoke-multi-pr.lock.yml +++ b/.github/workflows/smoke-multi-pr.lock.yml @@ -719,23 +719,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-project.lock.yml b/.github/workflows/smoke-project.lock.yml index a92fc989489..3471ef4a649 100644 --- a/.github/workflows/smoke-project.lock.yml +++ b/.github/workflows/smoke-project.lock.yml @@ -851,23 +851,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-service-ports.lock.yml b/.github/workflows/smoke-service-ports.lock.yml index fd6ccf2ddbb..442c84a3cc4 100644 --- a/.github/workflows/smoke-service-ports.lock.yml +++ b/.github/workflows/smoke-service-ports.lock.yml @@ -629,23 +629,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-temporary-id.lock.yml b/.github/workflows/smoke-temporary-id.lock.yml index f7fbb384fbe..046e8d38a3d 100644 --- a/.github/workflows/smoke-temporary-id.lock.yml +++ b/.github/workflows/smoke-temporary-id.lock.yml @@ -705,23 +705,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-test-tools.lock.yml b/.github/workflows/smoke-test-tools.lock.yml index 02f3df14f02..ef299f35d13 100644 --- a/.github/workflows/smoke-test-tools.lock.yml +++ b/.github/workflows/smoke-test-tools.lock.yml @@ -666,23 +666,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-update-cross-repo-pr.lock.yml b/.github/workflows/smoke-update-cross-repo-pr.lock.yml index 03df0101e17..ffe918cba51 100644 --- a/.github/workflows/smoke-update-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-update-cross-repo-pr.lock.yml @@ -738,23 +738,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml index e986a8ca0b8..0c46cf71b1f 100644 --- a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml +++ b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml @@ -687,23 +687,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/smoke-workflow-call.lock.yml b/.github/workflows/smoke-workflow-call.lock.yml index ae58178e2d7..de1fac6306b 100644 --- a/.github/workflows/smoke-workflow-call.lock.yml +++ b/.github/workflows/smoke-workflow-call.lock.yml @@ -675,23 +675,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index 8a788d76a03..309dc8169b2 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -742,23 +742,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/sub-issue-closer.lock.yml b/.github/workflows/sub-issue-closer.lock.yml index 7ef5d78f218..28ee1a270e2 100644 --- a/.github/workflows/sub-issue-closer.lock.yml +++ b/.github/workflows/sub-issue-closer.lock.yml @@ -658,23 +658,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index 4983cbc60c9..ae5a691ecf0 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -660,23 +660,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 0308e4a63c4..d83d2c52616 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -819,23 +819,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/terminal-stylist.lock.yml b/.github/workflows/terminal-stylist.lock.yml index 2adf2005ca9..0506ce68515 100644 --- a/.github/workflows/terminal-stylist.lock.yml +++ b/.github/workflows/terminal-stylist.lock.yml @@ -679,23 +679,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/test-dispatcher.lock.yml b/.github/workflows/test-dispatcher.lock.yml index f34ad3cc6b4..c7b6e0b3728 100644 --- a/.github/workflows/test-dispatcher.lock.yml +++ b/.github/workflows/test-dispatcher.lock.yml @@ -600,23 +600,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/test-project-url-default.lock.yml b/.github/workflows/test-project-url-default.lock.yml index 169d8c7cf78..cea33305ee2 100644 --- a/.github/workflows/test-project-url-default.lock.yml +++ b/.github/workflows/test-project-url-default.lock.yml @@ -660,23 +660,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/test-workflow.lock.yml b/.github/workflows/test-workflow.lock.yml index b4280862633..dc3ccc1026e 100644 --- a/.github/workflows/test-workflow.lock.yml +++ b/.github/workflows/test-workflow.lock.yml @@ -425,23 +425,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index d0f1a320b9d..67446fb0139 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -748,23 +748,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/ubuntu-image-analyzer.lock.yml b/.github/workflows/ubuntu-image-analyzer.lock.yml index 758457f15f7..c641e12ad27 100644 --- a/.github/workflows/ubuntu-image-analyzer.lock.yml +++ b/.github/workflows/ubuntu-image-analyzer.lock.yml @@ -662,23 +662,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/update-astro.lock.yml b/.github/workflows/update-astro.lock.yml index 87f3f248cb6..bec808670fc 100644 --- a/.github/workflows/update-astro.lock.yml +++ b/.github/workflows/update-astro.lock.yml @@ -643,23 +643,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index 674697aa205..799a787940a 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -653,23 +653,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/weekly-blog-post-writer.lock.yml b/.github/workflows/weekly-blog-post-writer.lock.yml index d1d2de12c2f..f5020f2cf41 100644 --- a/.github/workflows/weekly-blog-post-writer.lock.yml +++ b/.github/workflows/weekly-blog-post-writer.lock.yml @@ -807,23 +807,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/weekly-editors-health-check.lock.yml b/.github/workflows/weekly-editors-health-check.lock.yml index 826fa86867c..4340c17f4d7 100644 --- a/.github/workflows/weekly-editors-health-check.lock.yml +++ b/.github/workflows/weekly-editors-health-check.lock.yml @@ -685,23 +685,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index 17d95a0dc9e..f153064d9fd 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -666,23 +666,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml index 7f605f275d7..8680cebb562 100644 --- a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml +++ b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml @@ -622,23 +622,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/workflow-generator.lock.yml b/.github/workflows/workflow-generator.lock.yml index 65ea613563d..5f3c896001c 100644 --- a/.github/workflows/workflow-generator.lock.yml +++ b/.github/workflows/workflow-generator.lock.yml @@ -699,23 +699,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml index fb01e8dde5b..8d28710099f 100644 --- a/.github/workflows/workflow-health-manager.lock.yml +++ b/.github/workflows/workflow-health-manager.lock.yml @@ -726,23 +726,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/workflow-normalizer.lock.yml b/.github/workflows/workflow-normalizer.lock.yml index 7ca8be9fe5e..76e8f4fc4da 100644 --- a/.github/workflows/workflow-normalizer.lock.yml +++ b/.github/workflows/workflow-normalizer.lock.yml @@ -700,23 +700,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/.github/workflows/workflow-skill-extractor.lock.yml b/.github/workflows/workflow-skill-extractor.lock.yml index b1abc8baa44..50209e9e3ff 100644 --- a/.github/workflows/workflow-skill-extractor.lock.yml +++ b/.github/workflows/workflow-skill-extractor.lock.yml @@ -671,23 +671,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/pkg/workflow/copilot_engine_execution.go b/pkg/workflow/copilot_engine_execution.go index 3c4cd1c89c1..236391fd689 100644 --- a/pkg/workflow/copilot_engine_execution.go +++ b/pkg/workflow/copilot_engine_execution.go @@ -434,11 +434,10 @@ func extractAddDirPaths(args []string) []string { return dirs } -// generateCopilotSessionFileCopyStep generates a step to copy Copilot session state files -// from ~/.copilot/session-state// to /tmp/gh-aw/sandbox/agent/logs/ -// This ensures session files are in /tmp/gh-aw/ where secret redaction can scan them. -// Copilot CLI writes events.jsonl inside session subdirectories, so we use find -// to recursively locate them and preserve the session ID in the filename. +// generateCopilotSessionFileCopyStep generates a step to copy the entire Copilot +// session-state directory from ~/.copilot/session-state/ to /tmp/gh-aw/sandbox/agent/logs/ +// This ensures all session files (events.jsonl, session.db, plan.md, checkpoints, etc.) +// are in /tmp/gh-aw/ where secret redaction can scan them and they get uploaded as artifacts. func generateCopilotSessionFileCopyStep() GitHubActionStep { var step []string @@ -446,23 +445,16 @@ func generateCopilotSessionFileCopyStep() GitHubActionStep { step = append(step, " if: always()") step = append(step, " continue-on-error: true") step = append(step, " run: |") - step = append(step, " # Copy Copilot session state files to logs folder for artifact collection") + step = append(step, " # Copy entire Copilot session-state directory to logs for artifact collection") step = append(step, " # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them") step = append(step, " SESSION_STATE_DIR=\"$HOME/.copilot/session-state\"") - step = append(step, " LOGS_DIR=\"/tmp/gh-aw/sandbox/agent/logs\"") + step = append(step, " LOGS_DIR=\"/tmp/gh-aw/sandbox/agent/logs/copilot-session-state\"") step = append(step, " ") step = append(step, " if [ -d \"$SESSION_STATE_DIR\" ]; then") - step = append(step, " echo \"Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR\"") + step = append(step, " echo \"Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR\"") step = append(step, " mkdir -p \"$LOGS_DIR\"") - step = append(step, " # Copilot CLI writes events.jsonl inside session subdirectories:") - step = append(step, " # ~/.copilot/session-state//events.jsonl") - step = append(step, " # Use find to recursively locate .jsonl files and preserve session ID in filename") - step = append(step, " find \"$SESSION_STATE_DIR\" -name '*.jsonl' -type f | while read -r f; do") - step = append(step, " session_id=$(basename \"$(dirname \"$f\")\")") - step = append(step, " filename=$(basename \"$f\" .jsonl)") - step = append(step, " cp -v \"$f\" \"$LOGS_DIR/${filename}-${session_id}.jsonl\"") - step = append(step, " done") - step = append(step, " echo \"Session state files copied successfully\"") + step = append(step, " cp -rv \"$SESSION_STATE_DIR\"/. \"$LOGS_DIR/\" 2>/dev/null || true") + step = append(step, " echo \"Session state directory copied successfully\"") step = append(step, " else") step = append(step, " echo \"No session-state directory found at $SESSION_STATE_DIR\"") step = append(step, " fi") diff --git a/pkg/workflow/copilot_session_copy_test.go b/pkg/workflow/copilot_session_copy_test.go index b588029826d..9abc15dc726 100644 --- a/pkg/workflow/copilot_session_copy_test.go +++ b/pkg/workflow/copilot_session_copy_test.go @@ -44,29 +44,13 @@ func TestCopilotSessionFileCopyStep(t *testing.T) { t.Error("Expected step to reference '$HOME/.copilot/session-state' directory") } - // Verify target directory reference - if !strings.Contains(stepContent, "/tmp/gh-aw/sandbox/agent/logs") { - t.Error("Expected step to reference '/tmp/gh-aw/sandbox/agent/logs' directory") + // Verify target is a dedicated subdirectory under logs + if !strings.Contains(stepContent, "/tmp/gh-aw/sandbox/agent/logs/copilot-session-state") { + t.Error("Expected step to copy to '/tmp/gh-aw/sandbox/agent/logs/copilot-session-state'") } - // Verify recursive find for .jsonl files in session subdirectories - if !strings.Contains(stepContent, "find") { - t.Error("Expected step to use 'find' for recursive .jsonl file discovery") - } - if !strings.Contains(stepContent, "*.jsonl") { - t.Error("Expected step to search for *.jsonl files") - } - - // Verify session ID is preserved in the output filename - if !strings.Contains(stepContent, "session_id=$(basename") { - t.Error("Expected step to extract session_id from parent directory") - } - if !strings.Contains(stepContent, "${filename}-${session_id}.jsonl") { - t.Error("Expected step to include session_id in output filename to avoid collisions") - } - - // Verify cp command - if !strings.Contains(stepContent, "cp -v") { - t.Error("Expected step to use 'cp -v' command") + // Verify recursive copy of entire directory tree + if !strings.Contains(stepContent, "cp -rv") { + t.Error("Expected step to use 'cp -rv' for recursive directory copy") } } diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden index 7159868f3fc..b3e0c83a14a 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden @@ -403,23 +403,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden index 8dccca478fd..7dc6fa0e270 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden @@ -404,23 +404,16 @@ jobs: if: always() continue-on-error: true run: | - # Copy Copilot session state files to logs folder for artifact collection + # Copy entire Copilot session-state directory to logs for artifact collection # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs" + LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state files from $SESSION_STATE_DIR to $LOGS_DIR" + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" mkdir -p "$LOGS_DIR" - # Copilot CLI writes events.jsonl inside session subdirectories: - # ~/.copilot/session-state//events.jsonl - # Use find to recursively locate .jsonl files and preserve session ID in filename - find "$SESSION_STATE_DIR" -name '*.jsonl' -type f | while read -r f; do - session_id=$(basename "$(dirname "$f")") - filename=$(basename "$f" .jsonl) - cp -v "$f" "$LOGS_DIR/${filename}-${session_id}.jsonl" - done - echo "Session state files copied successfully" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" else echo "No session-state directory found at $SESSION_STATE_DIR" fi From a3be01fa88e874d9699b87818a8fde86d5049c6b Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Wed, 1 Apr 2026 20:23:22 -0700 Subject: [PATCH 3/4] refactor: move session state copy logic to actions/setup/sh script Extract inline shell logic from generateCopilotSessionFileCopyStep() into actions/setup/sh/copy_copilot_session_state.sh, consistent with other runtime scripts (parse_token_usage.sh, detect_inference_access_error.sh). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ace-editor.lock.yml | 15 +---------- .../agent-performance-analyzer.lock.yml | 15 +---------- .../workflows/agent-persona-explorer.lock.yml | 15 +---------- .../agentic-observability-kit.lock.yml | 15 +---------- .github/workflows/archie.lock.yml | 15 +---------- .github/workflows/artifacts-summary.lock.yml | 15 +---------- .github/workflows/auto-triage-issues.lock.yml | 15 +---------- .github/workflows/bot-detection.lock.yml | 15 +---------- .github/workflows/brave.lock.yml | 15 +---------- .../breaking-change-checker.lock.yml | 15 +---------- .github/workflows/ci-coach.lock.yml | 15 +---------- .../cli-consistency-checker.lock.yml | 15 +---------- .../workflows/code-scanning-fixer.lock.yml | 15 +---------- .github/workflows/code-simplifier.lock.yml | 15 +---------- .../constraint-solving-potd.lock.yml | 15 +---------- .github/workflows/contribution-check.lock.yml | 15 +---------- .../copilot-cli-deep-research.lock.yml | 15 +---------- .../copilot-pr-merged-report.lock.yml | 15 +---------- .../copilot-pr-nlp-analysis.lock.yml | 15 +---------- .../copilot-pr-prompt-analysis.lock.yml | 15 +---------- .github/workflows/craft.lock.yml | 15 +---------- .../daily-architecture-diagram.lock.yml | 15 +---------- .../daily-assign-issue-to-user.lock.yml | 15 +---------- .../workflows/daily-cli-performance.lock.yml | 15 +---------- .../workflows/daily-cli-tools-tester.lock.yml | 15 +---------- .../daily-community-attribution.lock.yml | 15 +---------- .../workflows/daily-compiler-quality.lock.yml | 15 +---------- .../daily-copilot-token-report.lock.yml | 15 +---------- .github/workflows/daily-file-diet.lock.yml | 15 +---------- .../workflows/daily-firewall-report.lock.yml | 15 +---------- .../daily-integrity-analysis.lock.yml | 15 +---------- .../daily-malicious-code-scan.lock.yml | 15 +---------- .../daily-mcp-concurrency-analysis.lock.yml | 15 +---------- .github/workflows/daily-news.lock.yml | 15 +---------- .../daily-performance-summary.lock.yml | 15 +---------- .github/workflows/daily-regulatory.lock.yml | 15 +---------- .../workflows/daily-repo-chronicle.lock.yml | 15 +---------- .../daily-safe-output-integrator.lock.yml | 15 +---------- .../workflows/daily-secrets-analysis.lock.yml | 15 +---------- .github/workflows/daily-semgrep-scan.lock.yml | 15 +---------- .../daily-syntax-error-quality.lock.yml | 15 +---------- .github/workflows/daily-team-status.lock.yml | 15 +---------- .../daily-testify-uber-super-expert.lock.yml | 15 +---------- .../workflows/daily-workflow-updater.lock.yml | 15 +---------- .github/workflows/dead-code-remover.lock.yml | 15 +---------- .github/workflows/delight.lock.yml | 15 +---------- .github/workflows/dependabot-burner.lock.yml | 15 +---------- .../workflows/dependabot-go-checker.lock.yml | 15 +---------- .github/workflows/dev-hawk.lock.yml | 15 +---------- .github/workflows/dev.lock.yml | 15 +---------- .github/workflows/dictation-prompt.lock.yml | 15 +---------- .../workflows/discussion-task-miner.lock.yml | 15 +---------- .github/workflows/docs-noob-tester.lock.yml | 15 +---------- .github/workflows/draft-pr-cleanup.lock.yml | 15 +---------- .../example-permissions-warning.lock.yml | 15 +---------- .github/workflows/firewall-escape.lock.yml | 15 +---------- .github/workflows/firewall.lock.yml | 15 +---------- .../workflows/functional-pragmatist.lock.yml | 15 +---------- .../github-remote-mcp-auth-test.lock.yml | 15 +---------- .../workflows/glossary-maintainer.lock.yml | 15 +---------- .github/workflows/gpclean.lock.yml | 15 +---------- .github/workflows/hourly-ci-cleaner.lock.yml | 15 +---------- .github/workflows/issue-monster.lock.yml | 15 +---------- .github/workflows/issue-triage-agent.lock.yml | 15 +---------- .github/workflows/jsweep.lock.yml | 15 +---------- .../workflows/layout-spec-maintainer.lock.yml | 15 +---------- .github/workflows/mcp-inspector.lock.yml | 15 +---------- .github/workflows/mergefest.lock.yml | 15 +---------- .github/workflows/metrics-collector.lock.yml | 15 +---------- .../workflows/notion-issue-summary.lock.yml | 15 +---------- .github/workflows/org-health-report.lock.yml | 15 +---------- .github/workflows/pdf-summary.lock.yml | 15 +---------- .github/workflows/plan.lock.yml | 15 +---------- .github/workflows/poem-bot.lock.yml | 15 +---------- .github/workflows/portfolio-analyst.lock.yml | 15 +---------- .../workflows/pr-nitpick-reviewer.lock.yml | 15 +---------- .github/workflows/pr-triage-agent.lock.yml | 15 +---------- .github/workflows/python-data-charts.lock.yml | 15 +---------- .github/workflows/q.lock.yml | 15 +---------- .github/workflows/refiner.lock.yml | 15 +---------- .github/workflows/release.lock.yml | 15 +---------- .../workflows/repo-audit-analyzer.lock.yml | 15 +---------- .github/workflows/repo-tree-map.lock.yml | 15 +---------- .../repository-quality-improver.lock.yml | 15 +---------- .github/workflows/research.lock.yml | 15 +---------- .../workflows/security-compliance.lock.yml | 15 +---------- .github/workflows/security-review.lock.yml | 15 +---------- .../workflows/slide-deck-maintainer.lock.yml | 15 +---------- .github/workflows/smoke-copilot-arm.lock.yml | 15 +---------- .github/workflows/smoke-copilot.lock.yml | 15 +---------- .../smoke-create-cross-repo-pr.lock.yml | 15 +---------- .github/workflows/smoke-multi-pr.lock.yml | 15 +---------- .github/workflows/smoke-project.lock.yml | 15 +---------- .../workflows/smoke-service-ports.lock.yml | 15 +---------- .github/workflows/smoke-temporary-id.lock.yml | 15 +---------- .github/workflows/smoke-test-tools.lock.yml | 15 +---------- .../smoke-update-cross-repo-pr.lock.yml | 15 +---------- .../smoke-workflow-call-with-inputs.lock.yml | 15 +---------- .../workflows/smoke-workflow-call.lock.yml | 15 +---------- .../workflows/stale-repo-identifier.lock.yml | 15 +---------- .github/workflows/sub-issue-closer.lock.yml | 15 +---------- .github/workflows/super-linter.lock.yml | 15 +---------- .../workflows/technical-doc-writer.lock.yml | 15 +---------- .github/workflows/terminal-stylist.lock.yml | 15 +---------- .github/workflows/test-dispatcher.lock.yml | 15 +---------- .../test-project-url-default.lock.yml | 15 +---------- .github/workflows/test-workflow.lock.yml | 15 +---------- .github/workflows/tidy.lock.yml | 15 +---------- .../workflows/ubuntu-image-analyzer.lock.yml | 15 +---------- .github/workflows/update-astro.lock.yml | 15 +---------- .github/workflows/video-analyzer.lock.yml | 15 +---------- .../weekly-blog-post-writer.lock.yml | 15 +---------- .../weekly-editors-health-check.lock.yml | 15 +---------- .../workflows/weekly-issue-summary.lock.yml | 15 +---------- .../weekly-safe-outputs-spec-review.lock.yml | 15 +---------- .github/workflows/workflow-generator.lock.yml | 15 +---------- .../workflow-health-manager.lock.yml | 15 +---------- .../workflows/workflow-normalizer.lock.yml | 15 +---------- .../workflow-skill-extractor.lock.yml | 15 +---------- .../setup/sh/copy_copilot_session_state.sh | 26 +++++++++++++++++++ pkg/workflow/copilot_engine_execution.go | 16 ++---------- pkg/workflow/copilot_session_copy_test.go | 17 +++++------- .../basic-copilot.golden | 15 +---------- .../with-imports.golden | 15 +---------- 124 files changed, 155 insertions(+), 1719 deletions(-) create mode 100755 actions/setup/sh/copy_copilot_session_state.sh diff --git a/.github/workflows/ace-editor.lock.yml b/.github/workflows/ace-editor.lock.yml index 475eae54847..0f642a0a728 100644 --- a/.github/workflows/ace-editor.lock.yml +++ b/.github/workflows/ace-editor.lock.yml @@ -455,20 +455,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml index 11e257d781a..4c483350ea7 100644 --- a/.github/workflows/agent-performance-analyzer.lock.yml +++ b/.github/workflows/agent-performance-analyzer.lock.yml @@ -769,20 +769,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/agent-persona-explorer.lock.yml b/.github/workflows/agent-persona-explorer.lock.yml index baac3701baa..4f8221e9987 100644 --- a/.github/workflows/agent-persona-explorer.lock.yml +++ b/.github/workflows/agent-persona-explorer.lock.yml @@ -718,20 +718,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/agentic-observability-kit.lock.yml b/.github/workflows/agentic-observability-kit.lock.yml index 337ecf2a4e3..83619da88eb 100644 --- a/.github/workflows/agentic-observability-kit.lock.yml +++ b/.github/workflows/agentic-observability-kit.lock.yml @@ -726,20 +726,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 35d20ca9bad..bd2bccd733c 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -733,20 +733,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index e4c36688e51..d3dd5c5036e 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -613,20 +613,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/auto-triage-issues.lock.yml b/.github/workflows/auto-triage-issues.lock.yml index b729703d097..aa8350a60c4 100644 --- a/.github/workflows/auto-triage-issues.lock.yml +++ b/.github/workflows/auto-triage-issues.lock.yml @@ -664,20 +664,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/bot-detection.lock.yml b/.github/workflows/bot-detection.lock.yml index f469e3621bc..87c3d757a2b 100644 --- a/.github/workflows/bot-detection.lock.yml +++ b/.github/workflows/bot-detection.lock.yml @@ -694,20 +694,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index 576b60b19c4..5b6e88911ac 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -678,20 +678,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/breaking-change-checker.lock.yml b/.github/workflows/breaking-change-checker.lock.yml index 6b260faaaae..c30abf4b60d 100644 --- a/.github/workflows/breaking-change-checker.lock.yml +++ b/.github/workflows/breaking-change-checker.lock.yml @@ -646,20 +646,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/ci-coach.lock.yml b/.github/workflows/ci-coach.lock.yml index de2eb53ed7e..72bae7f5c8e 100644 --- a/.github/workflows/ci-coach.lock.yml +++ b/.github/workflows/ci-coach.lock.yml @@ -696,20 +696,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml index ab5ad26b608..cc1ddc31fb3 100644 --- a/.github/workflows/cli-consistency-checker.lock.yml +++ b/.github/workflows/cli-consistency-checker.lock.yml @@ -615,20 +615,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/code-scanning-fixer.lock.yml b/.github/workflows/code-scanning-fixer.lock.yml index 4841cced11b..c99809564dd 100644 --- a/.github/workflows/code-scanning-fixer.lock.yml +++ b/.github/workflows/code-scanning-fixer.lock.yml @@ -681,20 +681,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml index 0db56bfc4aa..7dc9c349d1f 100644 --- a/.github/workflows/code-simplifier.lock.yml +++ b/.github/workflows/code-simplifier.lock.yml @@ -637,20 +637,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/constraint-solving-potd.lock.yml b/.github/workflows/constraint-solving-potd.lock.yml index 4649a8d5428..b8590a652da 100644 --- a/.github/workflows/constraint-solving-potd.lock.yml +++ b/.github/workflows/constraint-solving-potd.lock.yml @@ -615,20 +615,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/contribution-check.lock.yml b/.github/workflows/contribution-check.lock.yml index d8800f60dd0..d93033823b2 100644 --- a/.github/workflows/contribution-check.lock.yml +++ b/.github/workflows/contribution-check.lock.yml @@ -661,20 +661,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/copilot-cli-deep-research.lock.yml b/.github/workflows/copilot-cli-deep-research.lock.yml index f9095472b05..a79db664b4d 100644 --- a/.github/workflows/copilot-cli-deep-research.lock.yml +++ b/.github/workflows/copilot-cli-deep-research.lock.yml @@ -662,20 +662,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/copilot-pr-merged-report.lock.yml b/.github/workflows/copilot-pr-merged-report.lock.yml index 2f0245b01cb..1ffce7dea28 100644 --- a/.github/workflows/copilot-pr-merged-report.lock.yml +++ b/.github/workflows/copilot-pr-merged-report.lock.yml @@ -775,20 +775,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index 29c4036b556..732d0aacb9f 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -727,20 +727,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index 8ee9ec069a5..08bfc39c714 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -677,20 +677,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml index 0d2a28b1f3c..8c76cc81672 100644 --- a/.github/workflows/craft.lock.yml +++ b/.github/workflows/craft.lock.yml @@ -680,20 +680,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-architecture-diagram.lock.yml b/.github/workflows/daily-architecture-diagram.lock.yml index 7a38aba907d..fb0f94fa79a 100644 --- a/.github/workflows/daily-architecture-diagram.lock.yml +++ b/.github/workflows/daily-architecture-diagram.lock.yml @@ -680,20 +680,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml index 87585ebfd87..9fd2dc2addc 100644 --- a/.github/workflows/daily-assign-issue-to-user.lock.yml +++ b/.github/workflows/daily-assign-issue-to-user.lock.yml @@ -619,20 +619,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml index 27ca182c84d..a71cdb36b43 100644 --- a/.github/workflows/daily-cli-performance.lock.yml +++ b/.github/workflows/daily-cli-performance.lock.yml @@ -839,20 +839,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index 9b117d6f9ab..76867e7bd3f 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -700,20 +700,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-community-attribution.lock.yml b/.github/workflows/daily-community-attribution.lock.yml index 4f391c6c89c..15fe896b7fa 100644 --- a/.github/workflows/daily-community-attribution.lock.yml +++ b/.github/workflows/daily-community-attribution.lock.yml @@ -693,20 +693,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml index 96ac757a4f6..25faa93d7bc 100644 --- a/.github/workflows/daily-compiler-quality.lock.yml +++ b/.github/workflows/daily-compiler-quality.lock.yml @@ -719,20 +719,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index 6665bdef201..c0777bd83d3 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -736,20 +736,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index ad07f24d297..c8ec35ef0d0 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -713,20 +713,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index d488f8712b8..db643f42205 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -758,20 +758,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-integrity-analysis.lock.yml b/.github/workflows/daily-integrity-analysis.lock.yml index 68ea02d6c20..3f5fd1d5781 100644 --- a/.github/workflows/daily-integrity-analysis.lock.yml +++ b/.github/workflows/daily-integrity-analysis.lock.yml @@ -763,20 +763,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml index be3b1e8acd3..a8ff264203d 100644 --- a/.github/workflows/daily-malicious-code-scan.lock.yml +++ b/.github/workflows/daily-malicious-code-scan.lock.yml @@ -625,20 +625,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml index 3141e4b193a..59bf5243951 100644 --- a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml +++ b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml @@ -745,20 +745,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index 8fe2d481b46..ceea3c7a0dc 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -800,20 +800,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index f70c819ff7a..94a25074926 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -1188,20 +1188,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index 08b0f2e0ff5..7b8668f1842 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -1123,20 +1123,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 86f14ff422f..2899c548eb9 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -679,20 +679,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-safe-output-integrator.lock.yml b/.github/workflows/daily-safe-output-integrator.lock.yml index 856a3a27013..c491666dd45 100644 --- a/.github/workflows/daily-safe-output-integrator.lock.yml +++ b/.github/workflows/daily-safe-output-integrator.lock.yml @@ -660,20 +660,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-secrets-analysis.lock.yml b/.github/workflows/daily-secrets-analysis.lock.yml index 4fab7caad7f..cfdb384a16a 100644 --- a/.github/workflows/daily-secrets-analysis.lock.yml +++ b/.github/workflows/daily-secrets-analysis.lock.yml @@ -642,20 +642,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml index 8e5aaaf3fb5..ce5ccb09bdf 100644 --- a/.github/workflows/daily-semgrep-scan.lock.yml +++ b/.github/workflows/daily-semgrep-scan.lock.yml @@ -649,20 +649,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-syntax-error-quality.lock.yml b/.github/workflows/daily-syntax-error-quality.lock.yml index 0a6a961bbed..97b5c80bd16 100644 --- a/.github/workflows/daily-syntax-error-quality.lock.yml +++ b/.github/workflows/daily-syntax-error-quality.lock.yml @@ -654,20 +654,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index 50da9e9752d..7ce4ae47350 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -633,20 +633,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml index 35bff366e77..9a8d8a972cd 100644 --- a/.github/workflows/daily-testify-uber-super-expert.lock.yml +++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml @@ -737,20 +737,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml index edbe67c0208..ea1d17cd4b9 100644 --- a/.github/workflows/daily-workflow-updater.lock.yml +++ b/.github/workflows/daily-workflow-updater.lock.yml @@ -619,20 +619,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dead-code-remover.lock.yml b/.github/workflows/dead-code-remover.lock.yml index 1f1245f657d..0ed9ef5e0ef 100644 --- a/.github/workflows/dead-code-remover.lock.yml +++ b/.github/workflows/dead-code-remover.lock.yml @@ -667,20 +667,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml index a054e8e05cb..d4409d1a5a5 100644 --- a/.github/workflows/delight.lock.yml +++ b/.github/workflows/delight.lock.yml @@ -700,20 +700,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dependabot-burner.lock.yml b/.github/workflows/dependabot-burner.lock.yml index ace2641a02b..e741feec98b 100644 --- a/.github/workflows/dependabot-burner.lock.yml +++ b/.github/workflows/dependabot-burner.lock.yml @@ -625,20 +625,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index 5be44134dd2..382fb016852 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -643,20 +643,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 8d0c2d9e5c4..586ad9e038c 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -720,20 +720,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index e58585b6852..4f34b73c806 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -750,20 +750,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index dcdac6912a5..295e11ea5ce 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -698,20 +698,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/discussion-task-miner.lock.yml b/.github/workflows/discussion-task-miner.lock.yml index 08d8cf3dcfb..041e00a427b 100644 --- a/.github/workflows/discussion-task-miner.lock.yml +++ b/.github/workflows/discussion-task-miner.lock.yml @@ -687,20 +687,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index a5d76aa4b72..cda944fcd70 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -657,20 +657,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/draft-pr-cleanup.lock.yml b/.github/workflows/draft-pr-cleanup.lock.yml index 472265b25e0..5914bc8258d 100644 --- a/.github/workflows/draft-pr-cleanup.lock.yml +++ b/.github/workflows/draft-pr-cleanup.lock.yml @@ -654,20 +654,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml index 786572a0054..22f1a41cd75 100644 --- a/.github/workflows/example-permissions-warning.lock.yml +++ b/.github/workflows/example-permissions-warning.lock.yml @@ -423,20 +423,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml index 3987641faa5..8f017c1a6e3 100644 --- a/.github/workflows/firewall-escape.lock.yml +++ b/.github/workflows/firewall-escape.lock.yml @@ -677,20 +677,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml index 7048d6ab2ab..f6981a7080d 100644 --- a/.github/workflows/firewall.lock.yml +++ b/.github/workflows/firewall.lock.yml @@ -425,20 +425,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/functional-pragmatist.lock.yml b/.github/workflows/functional-pragmatist.lock.yml index 5dce3c9a1dd..bd676b47331 100644 --- a/.github/workflows/functional-pragmatist.lock.yml +++ b/.github/workflows/functional-pragmatist.lock.yml @@ -629,20 +629,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml index f2428834718..c849765e00c 100644 --- a/.github/workflows/github-remote-mcp-auth-test.lock.yml +++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml @@ -625,20 +625,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 681bdbc2077..49562008ca1 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -824,20 +824,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/gpclean.lock.yml b/.github/workflows/gpclean.lock.yml index 33998977f4a..5a028cdc476 100644 --- a/.github/workflows/gpclean.lock.yml +++ b/.github/workflows/gpclean.lock.yml @@ -651,20 +651,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/hourly-ci-cleaner.lock.yml b/.github/workflows/hourly-ci-cleaner.lock.yml index 82692c27cb0..35cff4dc98b 100644 --- a/.github/workflows/hourly-ci-cleaner.lock.yml +++ b/.github/workflows/hourly-ci-cleaner.lock.yml @@ -679,20 +679,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/issue-monster.lock.yml b/.github/workflows/issue-monster.lock.yml index 013ee208b2c..196550cb048 100644 --- a/.github/workflows/issue-monster.lock.yml +++ b/.github/workflows/issue-monster.lock.yml @@ -1009,20 +1009,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml index 0f205d86f2c..aef696696a9 100644 --- a/.github/workflows/issue-triage-agent.lock.yml +++ b/.github/workflows/issue-triage-agent.lock.yml @@ -609,20 +609,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index eaed2b0a772..dd66a3812cc 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -722,20 +722,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/layout-spec-maintainer.lock.yml b/.github/workflows/layout-spec-maintainer.lock.yml index 046c799d137..277e72e6739 100644 --- a/.github/workflows/layout-spec-maintainer.lock.yml +++ b/.github/workflows/layout-spec-maintainer.lock.yml @@ -660,20 +660,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index dd598c5873e..092023de23a 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -1138,20 +1138,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index 2b442bbe580..e18786ace9e 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -696,20 +696,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index 937f9d7659d..69dfe1bddff 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -534,20 +534,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index 1910de21923..c63fdb746d1 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -629,20 +629,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index 57f5db915fa..c236c177877 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -685,20 +685,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index b4e15b96612..2f3feb52f54 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -757,20 +757,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index c5d53abadaa..2d9f333eafc 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -701,20 +701,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index c59e716560c..7b5638a9240 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1033,20 +1033,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index 23bd75532c1..4879dc0bd80 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -767,20 +767,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 94085612ddc..8c533da5a30 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -754,20 +754,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/pr-triage-agent.lock.yml b/.github/workflows/pr-triage-agent.lock.yml index 703e69349a0..1de26ae72fb 100644 --- a/.github/workflows/pr-triage-agent.lock.yml +++ b/.github/workflows/pr-triage-agent.lock.yml @@ -680,20 +680,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 077678712a5..3ac6c01b2b0 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -755,20 +755,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index f07e1c90f84..684d393edb8 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -912,20 +912,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/refiner.lock.yml b/.github/workflows/refiner.lock.yml index 7e4676cbb73..daad4061e05 100644 --- a/.github/workflows/refiner.lock.yml +++ b/.github/workflows/refiner.lock.yml @@ -672,20 +672,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index ecc11957a8d..1072042c6fc 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -661,20 +661,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/repo-audit-analyzer.lock.yml b/.github/workflows/repo-audit-analyzer.lock.yml index c857b1c9028..58bc1446e87 100644 --- a/.github/workflows/repo-audit-analyzer.lock.yml +++ b/.github/workflows/repo-audit-analyzer.lock.yml @@ -643,20 +643,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index d81a53ec473..48730f37b9a 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -615,20 +615,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index e83fc5a39ac..711dbb934ec 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -703,20 +703,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index d71bd5deab7..3c5b64dd8e1 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -644,20 +644,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/security-compliance.lock.yml b/.github/workflows/security-compliance.lock.yml index 6b4e727be4f..09b84172f7e 100644 --- a/.github/workflows/security-compliance.lock.yml +++ b/.github/workflows/security-compliance.lock.yml @@ -659,20 +659,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/security-review.lock.yml b/.github/workflows/security-review.lock.yml index fed6f5b5363..1d5e08d459b 100644 --- a/.github/workflows/security-review.lock.yml +++ b/.github/workflows/security-review.lock.yml @@ -802,20 +802,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/slide-deck-maintainer.lock.yml b/.github/workflows/slide-deck-maintainer.lock.yml index fc3f0a1dab9..9076b453628 100644 --- a/.github/workflows/slide-deck-maintainer.lock.yml +++ b/.github/workflows/slide-deck-maintainer.lock.yml @@ -736,20 +736,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-copilot-arm.lock.yml b/.github/workflows/smoke-copilot-arm.lock.yml index a9e3b5720b5..48f4b4bbe94 100644 --- a/.github/workflows/smoke-copilot-arm.lock.yml +++ b/.github/workflows/smoke-copilot-arm.lock.yml @@ -1568,20 +1568,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 697e877705f..a1629ce0bfa 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -1616,20 +1616,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-create-cross-repo-pr.lock.yml b/.github/workflows/smoke-create-cross-repo-pr.lock.yml index b7a8b3e2754..ac9775e2814 100644 --- a/.github/workflows/smoke-create-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-create-cross-repo-pr.lock.yml @@ -725,20 +725,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-multi-pr.lock.yml b/.github/workflows/smoke-multi-pr.lock.yml index c696a76d349..cd953a298a5 100644 --- a/.github/workflows/smoke-multi-pr.lock.yml +++ b/.github/workflows/smoke-multi-pr.lock.yml @@ -718,20 +718,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-project.lock.yml b/.github/workflows/smoke-project.lock.yml index 3471ef4a649..7c61029c27f 100644 --- a/.github/workflows/smoke-project.lock.yml +++ b/.github/workflows/smoke-project.lock.yml @@ -850,20 +850,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-service-ports.lock.yml b/.github/workflows/smoke-service-ports.lock.yml index 442c84a3cc4..6bccc68e58e 100644 --- a/.github/workflows/smoke-service-ports.lock.yml +++ b/.github/workflows/smoke-service-ports.lock.yml @@ -628,20 +628,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-temporary-id.lock.yml b/.github/workflows/smoke-temporary-id.lock.yml index 046e8d38a3d..40cd29bb9d2 100644 --- a/.github/workflows/smoke-temporary-id.lock.yml +++ b/.github/workflows/smoke-temporary-id.lock.yml @@ -704,20 +704,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-test-tools.lock.yml b/.github/workflows/smoke-test-tools.lock.yml index ef299f35d13..dcb2396a7a8 100644 --- a/.github/workflows/smoke-test-tools.lock.yml +++ b/.github/workflows/smoke-test-tools.lock.yml @@ -665,20 +665,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-update-cross-repo-pr.lock.yml b/.github/workflows/smoke-update-cross-repo-pr.lock.yml index ffe918cba51..0b6792fe38f 100644 --- a/.github/workflows/smoke-update-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-update-cross-repo-pr.lock.yml @@ -737,20 +737,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml index 0c46cf71b1f..18a84f13a48 100644 --- a/.github/workflows/smoke-workflow-call-with-inputs.lock.yml +++ b/.github/workflows/smoke-workflow-call-with-inputs.lock.yml @@ -686,20 +686,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/smoke-workflow-call.lock.yml b/.github/workflows/smoke-workflow-call.lock.yml index de1fac6306b..993727fb473 100644 --- a/.github/workflows/smoke-workflow-call.lock.yml +++ b/.github/workflows/smoke-workflow-call.lock.yml @@ -674,20 +674,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index 309dc8169b2..4d2cfe7fc03 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -741,20 +741,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/sub-issue-closer.lock.yml b/.github/workflows/sub-issue-closer.lock.yml index 28ee1a270e2..8dc56233d60 100644 --- a/.github/workflows/sub-issue-closer.lock.yml +++ b/.github/workflows/sub-issue-closer.lock.yml @@ -657,20 +657,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index ae5a691ecf0..9e827262ecc 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -659,20 +659,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index d83d2c52616..279a9bafa38 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -818,20 +818,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/terminal-stylist.lock.yml b/.github/workflows/terminal-stylist.lock.yml index 0506ce68515..3fc8bd0e137 100644 --- a/.github/workflows/terminal-stylist.lock.yml +++ b/.github/workflows/terminal-stylist.lock.yml @@ -678,20 +678,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/test-dispatcher.lock.yml b/.github/workflows/test-dispatcher.lock.yml index c7b6e0b3728..2a1fdf0f0d3 100644 --- a/.github/workflows/test-dispatcher.lock.yml +++ b/.github/workflows/test-dispatcher.lock.yml @@ -599,20 +599,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/test-project-url-default.lock.yml b/.github/workflows/test-project-url-default.lock.yml index cea33305ee2..198e0eec00d 100644 --- a/.github/workflows/test-project-url-default.lock.yml +++ b/.github/workflows/test-project-url-default.lock.yml @@ -659,20 +659,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/test-workflow.lock.yml b/.github/workflows/test-workflow.lock.yml index dc3ccc1026e..6a7011dc941 100644 --- a/.github/workflows/test-workflow.lock.yml +++ b/.github/workflows/test-workflow.lock.yml @@ -424,20 +424,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 67446fb0139..503e76e05a8 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -747,20 +747,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/ubuntu-image-analyzer.lock.yml b/.github/workflows/ubuntu-image-analyzer.lock.yml index c641e12ad27..32f94426048 100644 --- a/.github/workflows/ubuntu-image-analyzer.lock.yml +++ b/.github/workflows/ubuntu-image-analyzer.lock.yml @@ -661,20 +661,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/update-astro.lock.yml b/.github/workflows/update-astro.lock.yml index bec808670fc..ff92e0fa371 100644 --- a/.github/workflows/update-astro.lock.yml +++ b/.github/workflows/update-astro.lock.yml @@ -642,20 +642,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index 799a787940a..d2d83859248 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -652,20 +652,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/weekly-blog-post-writer.lock.yml b/.github/workflows/weekly-blog-post-writer.lock.yml index f5020f2cf41..369dc14663b 100644 --- a/.github/workflows/weekly-blog-post-writer.lock.yml +++ b/.github/workflows/weekly-blog-post-writer.lock.yml @@ -806,20 +806,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/weekly-editors-health-check.lock.yml b/.github/workflows/weekly-editors-health-check.lock.yml index 4340c17f4d7..80ed3c5443e 100644 --- a/.github/workflows/weekly-editors-health-check.lock.yml +++ b/.github/workflows/weekly-editors-health-check.lock.yml @@ -684,20 +684,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index f153064d9fd..a09aea63c84 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -665,20 +665,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml index 8680cebb562..12f17631bb1 100644 --- a/.github/workflows/weekly-safe-outputs-spec-review.lock.yml +++ b/.github/workflows/weekly-safe-outputs-spec-review.lock.yml @@ -621,20 +621,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/workflow-generator.lock.yml b/.github/workflows/workflow-generator.lock.yml index 5f3c896001c..8067456f564 100644 --- a/.github/workflows/workflow-generator.lock.yml +++ b/.github/workflows/workflow-generator.lock.yml @@ -698,20 +698,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml index 8d28710099f..4c12b23acca 100644 --- a/.github/workflows/workflow-health-manager.lock.yml +++ b/.github/workflows/workflow-health-manager.lock.yml @@ -725,20 +725,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/workflow-normalizer.lock.yml b/.github/workflows/workflow-normalizer.lock.yml index 76e8f4fc4da..17f484310ae 100644 --- a/.github/workflows/workflow-normalizer.lock.yml +++ b/.github/workflows/workflow-normalizer.lock.yml @@ -699,20 +699,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/.github/workflows/workflow-skill-extractor.lock.yml b/.github/workflows/workflow-skill-extractor.lock.yml index 50209e9e3ff..12810f421ad 100644 --- a/.github/workflows/workflow-skill-extractor.lock.yml +++ b/.github/workflows/workflow-skill-extractor.lock.yml @@ -670,20 +670,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/actions/setup/sh/copy_copilot_session_state.sh b/actions/setup/sh/copy_copilot_session_state.sh new file mode 100755 index 00000000000..eff95a2fb01 --- /dev/null +++ b/actions/setup/sh/copy_copilot_session_state.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Copy the entire Copilot session-state directory to the agent logs folder +# for artifact collection. This ensures all session files (events.jsonl, +# session.db, plan.md, checkpoints, etc.) are in /tmp/gh-aw/ where secret +# redaction can scan them and they get uploaded as artifacts. +# +# Copilot CLI writes session data inside UUID-named subdirectories: +# ~/.copilot/session-state//events.jsonl +# ~/.copilot/session-state//session.db +# ~/.copilot/session-state//plan.md +# ~/.copilot/session-state//checkpoints/ +# ~/.copilot/session-state//files/ + +set -euo pipefail + +SESSION_STATE_DIR="$HOME/.copilot/session-state" +LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" + +if [ -d "$SESSION_STATE_DIR" ]; then + echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" + mkdir -p "$LOGS_DIR" + cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true + echo "Session state directory copied successfully" +else + echo "No session-state directory found at $SESSION_STATE_DIR" +fi diff --git a/pkg/workflow/copilot_engine_execution.go b/pkg/workflow/copilot_engine_execution.go index 236391fd689..ebf901de697 100644 --- a/pkg/workflow/copilot_engine_execution.go +++ b/pkg/workflow/copilot_engine_execution.go @@ -438,26 +438,14 @@ func extractAddDirPaths(args []string) []string { // session-state directory from ~/.copilot/session-state/ to /tmp/gh-aw/sandbox/agent/logs/ // This ensures all session files (events.jsonl, session.db, plan.md, checkpoints, etc.) // are in /tmp/gh-aw/ where secret redaction can scan them and they get uploaded as artifacts. +// The logic is in actions/setup/sh/copy_copilot_session_state.sh. func generateCopilotSessionFileCopyStep() GitHubActionStep { var step []string step = append(step, " - name: Copy Copilot session state files to logs") step = append(step, " if: always()") step = append(step, " continue-on-error: true") - step = append(step, " run: |") - step = append(step, " # Copy entire Copilot session-state directory to logs for artifact collection") - step = append(step, " # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them") - step = append(step, " SESSION_STATE_DIR=\"$HOME/.copilot/session-state\"") - step = append(step, " LOGS_DIR=\"/tmp/gh-aw/sandbox/agent/logs/copilot-session-state\"") - step = append(step, " ") - step = append(step, " if [ -d \"$SESSION_STATE_DIR\" ]; then") - step = append(step, " echo \"Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR\"") - step = append(step, " mkdir -p \"$LOGS_DIR\"") - step = append(step, " cp -rv \"$SESSION_STATE_DIR\"/. \"$LOGS_DIR/\" 2>/dev/null || true") - step = append(step, " echo \"Session state directory copied successfully\"") - step = append(step, " else") - step = append(step, " echo \"No session-state directory found at $SESSION_STATE_DIR\"") - step = append(step, " fi") + step = append(step, " run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh") return GitHubActionStep(step) } diff --git a/pkg/workflow/copilot_session_copy_test.go b/pkg/workflow/copilot_session_copy_test.go index 9abc15dc726..69b66131d6d 100644 --- a/pkg/workflow/copilot_session_copy_test.go +++ b/pkg/workflow/copilot_session_copy_test.go @@ -39,18 +39,13 @@ func TestCopilotSessionFileCopyStep(t *testing.T) { t.Error("Expected step to have 'continue-on-error: true'") } - // Verify source directory reference - if !strings.Contains(stepContent, "$HOME/.copilot/session-state") { - t.Error("Expected step to reference '$HOME/.copilot/session-state' directory") + // Verify it delegates to the external shell script + if !strings.Contains(stepContent, "copy_copilot_session_state.sh") { + t.Error("Expected step to invoke copy_copilot_session_state.sh") } - // Verify target is a dedicated subdirectory under logs - if !strings.Contains(stepContent, "/tmp/gh-aw/sandbox/agent/logs/copilot-session-state") { - t.Error("Expected step to copy to '/tmp/gh-aw/sandbox/agent/logs/copilot-session-state'") - } - - // Verify recursive copy of entire directory tree - if !strings.Contains(stepContent, "cp -rv") { - t.Error("Expected step to use 'cp -rv' for recursive directory copy") + // Verify it uses the RUNNER_TEMP-based actions path + if !strings.Contains(stepContent, "${RUNNER_TEMP}/gh-aw/actions/") { + t.Error("Expected step to reference script via ${RUNNER_TEMP}/gh-aw/actions/") } } diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden index b3e0c83a14a..82348b469ce 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden @@ -402,20 +402,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true diff --git a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden index 7dc6fa0e270..94e4e0339eb 100644 --- a/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden +++ b/pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden @@ -403,20 +403,7 @@ jobs: - name: Copy Copilot session state files to logs if: always() continue-on-error: true - run: | - # Copy entire Copilot session-state directory to logs for artifact collection - # This ensures they are in /tmp/gh-aw/ where secret redaction can scan them - SESSION_STATE_DIR="$HOME/.copilot/session-state" - LOGS_DIR="/tmp/gh-aw/sandbox/agent/logs/copilot-session-state" - - if [ -d "$SESSION_STATE_DIR" ]; then - echo "Copying Copilot session state from $SESSION_STATE_DIR to $LOGS_DIR" - mkdir -p "$LOGS_DIR" - cp -rv "$SESSION_STATE_DIR"/. "$LOGS_DIR/" 2>/dev/null || true - echo "Session state directory copied successfully" - else - echo "No session-state directory found at $SESSION_STATE_DIR" - fi + run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh - name: Stop MCP Gateway if: always() continue-on-error: true From cd5622d677a412dd1493ab1be783cabfaea58603 Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Wed, 1 Apr 2026 20:30:31 -0700 Subject: [PATCH 4/4] fix: update second session copy test to match external script refactor TestGenerateCopilotSessionFileCopyStep in copilot_engine_test.go was checking for inline shell content that no longer exists after the refactor to actions/setup/sh/copy_copilot_session_state.sh. Update assertions to verify the script reference instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/workflow/copilot_engine_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/workflow/copilot_engine_test.go b/pkg/workflow/copilot_engine_test.go index be392642d1b..db1fdea59bc 100644 --- a/pkg/workflow/copilot_engine_test.go +++ b/pkg/workflow/copilot_engine_test.go @@ -1418,15 +1418,15 @@ func TestGenerateCopilotSessionFileCopyStep(t *testing.T) { if !strings.Contains(content, "always()") { t.Error("Step should run always()") } - if !strings.Contains(content, ".copilot/session-state") { - t.Error("Step should reference the Copilot session-state directory") - } - if !strings.Contains(content, "/tmp/gh-aw/sandbox/agent/logs") { - t.Error("Step should copy files into the gh-aw logs directory") - } if !strings.Contains(content, "continue-on-error: true") { t.Error("Step should be marked continue-on-error") } + if !strings.Contains(content, "copy_copilot_session_state.sh") { + t.Error("Step should invoke copy_copilot_session_state.sh") + } + if !strings.Contains(content, "${RUNNER_TEMP}/gh-aw/actions/") { + t.Error("Step should reference script via ${RUNNER_TEMP}/gh-aw/actions/") + } } func TestCopilotEngineEnvOverridesTokenExpression(t *testing.T) {