Objective
Add comprehensive diagnostic logging to the patch generation process to help identify which commits are being included and why patches might be oversized.
Context
Related to #2553. The Mergefest agent successfully merges but the patch generation captures the full diff from already-merged PRs (20.1 MB patch with 498,195 lines). We need visibility into what's happening during patch generation to diagnose the root cause.
Approach
- Locate the patch generation code in the codebase (likely in JavaScript files handling safe-outputs)
- Add logging before patch generation:
git log --oneline -5 to show recent commits
git status to show working tree state
git diff --stat HEAD^..HEAD to preview patch size
- Echo the exact
git format-patch command being used
- Add logging after patch generation:
- Patch file size
- Number of commits included
- List of commit SHAs in the patch
Files to Modify
- Likely in
pkg/workflow/js/ directory (JavaScript files handling push_to_pull_request_branch)
- May be in Go files that generate the patch steps
- Check for references to
git format-patch or patch generation logic
Acceptance Criteria
AI generated by Plan Command for #2553
Objective
Add comprehensive diagnostic logging to the patch generation process to help identify which commits are being included and why patches might be oversized.
Context
Related to #2553. The Mergefest agent successfully merges but the patch generation captures the full diff from already-merged PRs (20.1 MB patch with 498,195 lines). We need visibility into what's happening during patch generation to diagnose the root cause.
Approach
git log --oneline -5to show recent commitsgit statusto show working tree stategit diff --stat HEAD^..HEADto preview patch sizegit format-patchcommand being usedFiles to Modify
pkg/workflow/js/directory (JavaScript files handling push_to_pull_request_branch)git format-patchor patch generation logicAcceptance Criteria
Related to Push to branch issue #2553