Skip to content

Limit step summary size to 1000KB and add lightweight console summary#5136

Merged
pelikhan merged 5 commits into
mainfrom
copilot/limit-markdown-output-size
Dec 1, 2025
Merged

Limit step summary size to 1000KB and add lightweight console summary#5136
pelikhan merged 5 commits into
mainfrom
copilot/limit-markdown-output-size

Conversation

Copilot AI commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

GitHub Actions step summaries were exceeding the 1024KB limit, causing workflow failures. Additionally, full markdown output was being sent to core.info() which is suboptimal for raw console rendering.

Changes

  • Size limits: MAX_STEP_SUMMARY_SIZE reduced from 8MB to 1000KB; MAX_TOOL_OUTPUT_LENGTH reduced from 500 to 256 chars
  • Plain text summary: New generatePlainTextSummary() function produces console-optimized output for core.info()
  • Parser updates: Copilot and Claude parsers now return logEntries for use in plain text generation
  • Test fix: TestNeutralToolsIntegration now checks for YAML keys specifically, avoiding false positives from bundled JS string literals

Plain text summary format

=== Copilot Execution Summary ===
Model: gpt-5
Turns: 3
Duration: 1m 30s
Tokens: 1,000 in / 500 out

Tools/Commands:
  [✓] bash: echo test
  [✓] github::create_issue
  [✗] github::list_issues

Tools: 2/3 succeeded

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:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login g/workflow/js/node_modules/vitest/dist/workers/forks.js (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login _main.o (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

When parsing a log (in JavaScript ) and building the job summary,

  • limit total markdown size to 1000kb

Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 2822k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary

  • limit tool output preview size to 256characters
  • generate a lightweight summary to send to core.info that is more optimized for raw text rendering

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 1, 2025 00:19
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Update MAX_STEP_SUMMARY_SIZE from 8MB to 1000KB (1,024,000 bytes)
- Update MAX_TOOL_OUTPUT_LENGTH from 500 to 256 characters
- Add generatePlainTextSummary function for lightweight console output
- Update log parser bootstrap to generate plain text summary for core.info
- Update Copilot and Claude parsers to return logEntries with result
- Update tests for new constant values and return types
- Fix TestNeutralToolsIntegration to use YAML key patterns instead of broad string match

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Update documentation comment to reflect new 256 char limit
- Add MAX_BASH_COMMAND_DISPLAY_LENGTH constant (40)
- Use ✗ instead of x for error status icon for better console compatibility

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Limit markdown size for job summary parsing Limit step summary size to 1000KB and add lightweight console summary Dec 1, 2025
Copilot AI requested a review from pelikhan December 1, 2025 01:09
@pelikhan pelikhan marked this pull request as ready for review December 1, 2025 01:11
@pelikhan pelikhan merged commit 428a7e3 into main Dec 1, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/limit-markdown-output-size branch December 1, 2025 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants