Skip to content

fix: add skip-summary input to prevent GITHUB_STEP_SUMMARY exceeding 1MB limit#81

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:fix-summary-1mb-limit
Mar 9, 2026
Merged

fix: add skip-summary input to prevent GITHUB_STEP_SUMMARY exceeding 1MB limit#81
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:fix-summary-1mb-limit

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented Mar 9, 2026

Summary

GitHub enforces a 1MB limit on GITHUB_STEP_SUMMARY. The review-pr composite action invokes the base agent action multiple times (once for context gathering, once for the review pipeline), causing each invocation to append its full output to the step summary — which can easily exceed the limit on large PRs. This PR adds a skip-summary input to action.yml and sets it to "true" in both review-pr agent calls, letting the review-pr action own its own summary instead.

Changes

  • action.yml: Added skip-summary input (default "false"). When "true", the job summary block is skipped entirely and the Update job summary with cleaned output step is also conditionally bypassed via if: always() && inputs.skip-summary != 'true'.
  • review-pr/action.yml: Passes skip-summary: "true" to both agent invocations (the initial context-gathering call at line ~474 and the main review pipeline call at line ~563), preventing duplicate/oversized summary writes from the sub-actions.

How to Test

  • Trigger a PR review via review-pr on a large PR and confirm GITHUB_STEP_SUMMARY no longer hits the 1MB limit / workflow does not fail with a summary size error.
  • Confirm that when calling action.yml directly (without skip-summary: "true"), the job summary is still written as before.
  • Verify the review-pr action still produces its own summary output correctly after suppressing the sub-action summaries.

…1MB limit

When review-pr calls the root action, the full agent conversation log is
dumped into $GITHUB_STEP_SUMMARY via `cat "$OUTPUT_FILE"`. For large PR
reviews this exceeds GitHub's 1024KB limit, silently aborting the summary.

Add a `skip-summary` input (default "false") that gates both the metadata
table and the cleaned-output append. review-pr passes `skip-summary: "true"`
since it writes its own purpose-specific summary downstream.
@derekmisler
Copy link
Copy Markdown
Contributor Author

/describe

@docker-agent
Copy link
Copy Markdown
Contributor

docker-agent bot commented Mar 9, 2026

✅ PR description has been generated and updated!

@derekmisler derekmisler marked this pull request as ready for review March 9, 2026 20:43
@derekmisler derekmisler requested a review from a team as a code owner March 9, 2026 20:44
@derekmisler derekmisler self-assigned this Mar 9, 2026
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Assessment: 🟢 APPROVE

This PR correctly implements the skip-summary input feature to prevent GITHUB_STEP_SUMMARY from exceeding the 1MB limit when review-pr invokes the base action multiple times.

Key Changes Validated:

  • ✅ Added skip-summary input to action.yml with appropriate default ("false")
  • ✅ Conditional logic correctly wraps both summary-writing blocks (lines 631-655 and step at line 718)
  • review-pr/action.yml correctly passes skip-summary: "true" to both agent invocations
  • ✅ String comparison syntax is appropriate for each context (Bash [[ uses double quotes, GitHub Actions expressions use single quotes)

No bugs found. The implementation is clean and follows GitHub Actions best practices. The feature will effectively prevent duplicate summary writes when invoked from review-pr.

skip-summary:
description: "Skip writing agent output to the job summary (useful when callers write their own summary)"
required: false
default: "false"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for backcompat or could it be useful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just because i don't want the root action outputting stuff if it was triggered by the review action. by itself, it's fine

@derekmisler derekmisler merged commit 4b3632c into docker:main Mar 9, 2026
21 checks passed
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