-
Notifications
You must be signed in to change notification settings - Fork 37
Copy Copilot session state files to logs before secret redaction #9279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot this file path in the list of output files in the agentic engine interface. do not add a new step |
- Modified GetFirewallLogsCollectionStep to return session file copy step - Added generateCopilotSessionFileCopyStep function to generate the copy step - Session files from ~/.copilot/session-state/*.jsonl are now copied to /tmp/gh-aw/sandbox/agent/logs/ - Added comprehensive test TestCopilotSessionFileCopyStep - Session files will be included in agent_outputs artifact - Step runs with if: always() and continue-on-error: true for reliability Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Instead of adding a copy step, add session-state path to GetDeclaredOutputFiles(): - Added /home/runner/.copilot/session-state/*.jsonl to declared output files - Updated validation to allow session-state path (safe - internal CLI state) - Updated test to verify both logs folder and session-state are declared - All 82 Copilot workflows now include session files in artifact upload Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 8c531a8. Added |
|
@copilot add a step to copy the declared output files to the /tmp/gh-aw/agent/logs/ folder before the secret redaction as well. |
- Modified GetFirewallLogsCollectionStep to add session file copy step - Added generateCopilotSessionFileCopyStep function - Copies files from ~/.copilot/session-state/ to /tmp/gh-aw/sandbox/agent/logs/ - Copy happens BEFORE secret redaction so files are scanned for secrets - Reverted GetDeclaredOutputFiles to only include logs folder - Removed special validation case for session-state path - Added test TestCopilotSessionFileCopyStep - All 82 Copilot workflows updated with copy step Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in a88e3d4. Added copy step that runs before secret redaction:
|
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test Results✅ File Writing: Created test file successfully Overall Status: PASS
|
Smoke Test Results - Run 20800667277Last 2 Merged PRs: #9062 (Protocol-specific domain filtering), #9055 (AWF logs summary) ✅ GitHub MCP - Retrieved PRs Overall: PASS (7/7 core tests passed) cc
|
Smoke Test Results
Overall Status: FAIL (2/3 tests failed - missing tools)
|
|
PRs: Support protocol-specific domain filtering (http/https); Use awf logs summary for CI firewall reports
|
Smoke Test Results - Claude (Run 20800667305)Recent PRs:
Tests:
Status: PASS
|
Smoke Test Results - Copilot Engine (No Firewall)✅ All tests passed
|
|
PR titles reviewed: Sync github-agentic-workflows.md with v0.35.1 (#9276); Remove dangerous-permissions-write feature flag suggestion from compiler errors (#9275)
|
Copilot CLI writes session state to
~/.copilot/session-state/[session-id].jsonlbut these files weren't being captured in workflow artifacts, making debugging difficult.Changes
Added copy step in
pkg/workflow/copilot_logs.goGetFirewallLogsCollectionStep()to add session file copy stepgenerateCopilotSessionFileCopyStep()function~/.copilot/session-state/*.jsonlto/tmp/gh-aw/sandbox/agent/logs/if: always()andcontinue-on-error: truefor reliabilityUpdated declared output files in
pkg/workflow/copilot_engine.goGetDeclaredOutputFiles()returns only logs folderAdded test coverage
TestCopilotEngineverifies logs folder in declared output filesTestCopilotSessionFileCopyStepvalidates copy step generationGenerated Workflow Steps
Applies to 82 workflows using Copilot engine.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Changeset
~/.copilot/session-state/*.jsonl) to/tmp/gh-aw/sandbox/agent/logs/before secret redaction so they are included in workflow artifacts and available for debugging.