Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…v, increase text limit to 2000 chars, add visible truncation warning Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot create a empty step summary file in a reachable path for the agent step summary entries, pass it to the agent container, then append this file to the action step summary after the agent is done (after redacting secrets) |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in f3d0036. Here's what was implemented:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot setting step summary file should be done for all agentic engines. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 3e6f30a.
Both engines also have Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
🤖 Smoke test §22761537729 by
Overall: cc
|
There was a problem hiding this comment.
The PR correctly fixes step summary truncation by forwarding GITHUB_STEP_SUMMARY as a sandbox-accessible file path and appending its contents back to the real summary after agent execution. The touch + hardcoded path + if: always() append pattern is clean and effective. No concerns.
📰 BREAKING: Report filed by Smoke Copilot
| timeout-minutes: 20 | ||
| run: | | ||
| set -o pipefail | ||
| touch /tmp/gh-aw/agent-step-summary.md |
There was a problem hiding this comment.
The touch ensures the file exists before the agent runs, preventing errors if the agent writes to GITHUB_STEP_SUMMARY before the file is created. Good defensive pattern — but worth noting this only covers the ace-editor workflow; the change appears across many lock files.
| GITHUB_REF_NAME: ${{ github.ref_name }} | ||
| GITHUB_SERVER_URL: ${{ github.server_url }} | ||
| GITHUB_STEP_SUMMARY: ${{ env.GITHUB_STEP_SUMMARY }} | ||
| GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md |
There was a problem hiding this comment.
Hardcoding /tmp/gh-aw/agent-step-summary.md here instead of inheriting from env.GITHUB_STEP_SUMMARY is the key fix — ensures the agent writes to the sandbox-accessible path. The if: always() on the append step guarantees the summary is captured even on failure. ✅
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Commit pushed:
|
Smoke Test Results — Run §22761537746Core Tests #1–10: ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Overall: PARTIAL — all non-skipped tests passed
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
| - name: Append agent step summary | ||
| if: always() | ||
| run: | | ||
| # Append the agent's step summary to the real $GITHUB_STEP_SUMMARY. |
There was a problem hiding this comment.
@copilot move bash to a script file in actions/setup/sh
There was a problem hiding this comment.
Done in 51cce03. The inline bash is now in actions/setup/sh/append_agent_step_summary.sh and the step runs bash /opt/gh-aw/actions/append_agent_step_summary.sh.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub Actions step summary truncation by ensuring GITHUB_STEP_SUMMARY is writable from inside sandboxed agent executions (AWF + non-AWF), then appending the agent-written content back into the real step summary after secret redaction.
Changes:
- Introduces
AgentStepSummaryPathand wires all engines to write step-summary output to/tmp/gh-aw/agent-step-summary.md(plus pre-creating it viatouch). - Adds an “Append agent step summary” step (implemented as
actions/setup/sh/append_agent_step_summary.sh) executed after secret redaction. - Increases agent text truncation limit from 500 → 2000 chars and adds an explicit truncation notice; updates tests and goldens/lock workflows accordingly.
Reviewed changes
Copilot reviewed 180 out of 180 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/engine_output.go | Adds AgentStepSummaryPath constant used as the in-sandbox GITHUB_STEP_SUMMARY target. |
| pkg/workflow/copilot_engine_execution.go | Creates the agent step summary file before execution and overrides GITHUB_STEP_SUMMARY to point at it. |
| pkg/workflow/codex_engine.go | Ensures the agent step summary file exists before running Codex; overrides GITHUB_STEP_SUMMARY. |
| pkg/workflow/claude_engine.go | Ensures the agent step summary file exists in AWF and non-AWF flows; overrides GITHUB_STEP_SUMMARY. |
| pkg/workflow/gemini_engine.go | Ensures the agent step summary file exists in AWF and non-AWF flows; overrides GITHUB_STEP_SUMMARY. |
| pkg/workflow/compiler_yaml_ai_execution.go | Adds generateAgentStepSummaryAppend step generator. |
| pkg/workflow/compiler_yaml_main_job.go | Inserts the append step after secret redaction in the main job flow. |
| actions/setup/sh/append_agent_step_summary.sh | New helper script to append the agent-written summary into the real $GITHUB_STEP_SUMMARY. |
| actions/setup/js/log_parser_shared.cjs | Raises max agent text truncation to 2000 and adds explicit truncation notice. |
| actions/setup/js/log_parser_shared.test.cjs | Updates truncation-related tests to match new limit + notice. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden | Golden update: pre-create agent summary file, point GITHUB_STEP_SUMMARY to it, add append step. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Golden update: pre-create agent summary file, point GITHUB_STEP_SUMMARY to it, add append step. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden | Golden update: pre-create agent summary file, point GITHUB_STEP_SUMMARY to it, add append step. |
| .changeset/patch-step-summary-truncation.md | Adds a patch changeset describing the behavior change. |
| .github/workflows/ace-editor.lock.yml | Lock workflow updated to create/forward agent summary file and append it after redaction. |
| .github/workflows/agent-performance-analyzer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/agent-persona-explorer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/ai-moderator.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/archie.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/bot-detection.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/brave.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/changeset.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/chroma-issue-indexer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/ci-coach.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/ci-doctor.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/code-scanning-fixer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/code-simplifier.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/contribution-check.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/constraint-solving-potd.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/craft.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-architecture-diagram.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-cli-performance.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-regulatory.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-secrets-analysis.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-semgrep-scan.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-team-status.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/daily-workflow-updater.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/dead-code-remover.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/dependabot-burner.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/dependabot-go-checker.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/dev.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/dictation-prompt.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/firewall.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/functional-pragmatist.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/gpclean.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/grumpy-reviewer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/issue-monster.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/issue-triage-agent.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/metrics-collector.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/notion-issue-summary.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/pdf-summary.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/plan.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/pr-triage-agent.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/q.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/refiner.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/repo-audit-analyzer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/repo-tree-map.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/repository-quality-improver.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/security-compliance.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/security-review.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/smoke-gemini.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/sub-issue-closer.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/super-linter.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/terminal-stylist.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/test-dispatcher.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/test-project-url-default.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/test-workflow.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/workflow-generator.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/workflow-health-manager.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
| .github/workflows/example-permissions-warning.lock.yml | Same: forward agent summary into sandbox and append after redaction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| command = fmt.Sprintf(`set -o pipefail | ||
| touch %s | ||
| COPILOT_CLI_INSTRUCTION="$(cat /tmp/gh-aw/aw-prompts/prompt.txt)" | ||
| %s%s 2>&1 | tee %s`, mkdirCommands.String(), copilotCommand, logFile) | ||
| %s%s 2>&1 | tee %s`, AgentStepSummaryPath, mkdirCommands.String(), copilotCommand, logFile) |
There was a problem hiding this comment.
In the non-AWF execution command, touch runs before the mkdirCommands block that creates all required --add-dir directories. If /tmp/gh-aw (or any parent dir for AgentStepSummaryPath) isn’t present for some reason, the step will fail before it has a chance to create the directories. Consider moving the touch after mkdirCommands, or explicitly mkdir -p $(dirname AgentStepSummaryPath) before touching the file.
| if [ -s /tmp/gh-aw/agent-step-summary.md ]; then | ||
| cat /tmp/gh-aw/agent-step-summary.md >> "$GITHUB_STEP_SUMMARY" |
There was a problem hiding this comment.
This script hard-codes /tmp/gh-aw/agent-step-summary.md, while the Go side introduces AgentStepSummaryPath as the source of truth. To avoid future drift (if the path ever changes), consider passing the agent summary path into this step via an env var (or defaulting from an env var) and using that in the script instead of an inline literal.
Document the agent step summary feature introduced in #19821: - GITHUB_STEP_SUMMARY is forwarded into the AWF sandbox for all engines - Content is appended to the real step summary after secret redaction - First 2000 characters are included with truncation notice if longer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AgentStepSummaryPathconstant andgenerateAgentStepSummaryAppendstepGITHUB_STEP_SUMMARYfor Copilot engine (AWF + non-AWF modes)GITHUB_STEP_SUMMARYfor Codex engine (AWF + non-AWF modes)GITHUB_STEP_SUMMARYfor Claude engine (AWF + non-AWF modes)GITHUB_STEP_SUMMARYfor Gemini engine (AWF + non-AWF modes)actions/setup/sh/append_agent_step_summary.sh[truncated: ...]notice🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
Changeset
GITHUB_STEP_SUMMARYinto the sandbox, increasing the agent text limit to 2000 characters, and showing an explicit truncation notice.Warning
The following domains were blocked by the firewall during workflow execution:
codeload.github.comgithub.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
✨ PR Review Safe Output Test - Run 22761537746