-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Labels
Description
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 -5to show recent commitsgit statusto show working tree stategit diff --stat HEAD^..HEADto preview patch size- Echo the exact
git format-patchcommand 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-patchor patch generation logic
Acceptance Criteria
- Logs show git state before patch generation
- Logs show the exact git command used to generate patch
- Logs show patch metadata after generation (size, commits included)
- Logging is controlled by appropriate log level (info or debug)
- Changes don't break existing patch generation functionality
Related to Push to branch issue #2553
AI generated by Plan Command for #2553
Reactions are currently unavailable