Skip to content

Fix code-radiator ENOBUFS on net11.0: ensure proper merge commit after conflict resolution#25925

Open
rolfbjarne with Copilot wants to merge 4 commits into
mainfrom
copilot/mergemain-to-net110-20260702-again
Open

Fix code-radiator ENOBUFS on net11.0: ensure proper merge commit after conflict resolution#25925
rolfbjarne with Copilot wants to merge 4 commits into
mainfrom
copilot/mergemain-to-net110-20260702-again

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The code-radiator workflow was crashing with ERR_SYSTEM: Git command output exceeded buffer limit (ENOBUFS) when creating merge PRs for net11.0. net11.0 has ~21,683 commits not present in main; when conflict resolution inadvertently produced a plain single-parent commit instead of a 2-parent merge commit, gh-aw's generateGitPatch computed git merge-base origin/main <tip> back to the original divergence point and ran git format-patch over all ~21,683 commits — easily exceeding the 100 MB buffer.

With a proper 2-parent merge commit (parent 2 = origin/main), the merge-base is origin/main tip, so format-patch covers exactly one commit.

Changes

  • Explicit merge completion instructions — added a "After resolving all conflicts" section to the conflict-resolution step requiring the agent to run git commit --no-edit exactly once after staging all resolved files. Committing per-file while MERGE_HEAD is active would complete the merge on the first commit and silently produce a plain commit for everything after.

  • Merge commit verification — agent must verify git log --format="%P" -1 shows two parent SHAs before proceeding; if only one is present it restarts from the branch-creation step.

  • excluded-files safety net — added tests/dotnet/UnitTests/expected/** to the create-pull-request safe-outputs config so large generated test expected files are stripped from the format-patch policy check even if the merge commit is unexpectedly large.

  • Lock file recompiled to reflect the frontmatter change.

Copilot AI and others added 2 commits July 3, 2026 15:45
…safety net

The workflow was failing with ENOBUFS when creating PRs for net11.0 because
`git format-patch` included all 21,683 commits in net11.0 not present in main.

Root cause: when the agent resolves conflicts and commits without MERGE_HEAD active
(creating a plain single-parent commit instead of a merge commit), the gh-aw
generateGitPatch function computes git merge-base against origin/main and gets the
old divergence point — generating patches for all 21,683 divergent commits.

Fix:
1. Explicit instructions to complete the merge with `git commit --no-edit` (creating
   a proper 2-parent merge commit where origin/main is parent 2, so merge-base =
   origin/main tip and format-patch only covers the single merge commit)
2. Verification step to check HEAD has two parent SHAs
3. excluded-files: tests/dotnet/UnitTests/expected/** as a defensive safety net to
   reduce patch size even if the merge commit is unexpectedly large

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error creating merge PR for net11.0 Fix code-radiator ENOBUFS on net11.0: ensure proper merge commit after conflict resolution Jul 3, 2026
Copilot AI requested a review from rolfbjarne July 3, 2026 15:47
Comment thread .github/workflows/code-radiator.md Outdated
Comment on lines +68 to +69
excluded-files:
- "tests/dotnet/UnitTests/expected/**"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot This is not OK, the workflow is supposed to flow all changes from branch A to branch B, and excluding files is not acceptable.

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.

Removed the excluded-files entry from both code-radiator.md and the corresponding lock file JSON configs.

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
Copilot AI requested a review from rolfbjarne July 3, 2026 16:26
@rolfbjarne rolfbjarne marked this pull request as ready for review July 3, 2026 16:51
Copilot AI review requested due to automatic review settings July 3, 2026 16:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the code-radiator workflow documentation (and its compiled lock) to prevent git format-patch from spanning the full mainnet11.0 divergence by ensuring conflict resolutions complete as a true 2-parent merge commit.

Changes:

  • Add explicit post-conflict “complete merge once” instructions (git commit --no-edit) and a check for two parents (git log --format="%P" -1).
  • Regenerate the corresponding code-radiator.lock.yml to reflect the updated workflow source.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/code-radiator.md Adds conflict-resolution guidance to ensure merges remain 2-parent and avoid huge patch generation.
.github/workflows/code-radiator.lock.yml Recompiled lockfile reflecting the updated workflow markdown.

Comment on lines +246 to 248
The output must contain **two** space-separated SHA hashes. If only one SHA is shown, `MERGE_HEAD` was lost during conflict resolution (e.g. due to a `git reset` or `git checkout`). The branch then contains a plain single-parent commit instead of a merge commit. A plain commit causes `git format-patch` to include all commits since the branch diverged from `main` — potentially tens of thousands — which will exceed the buffer limit and fail PR creation. Discard the branch and restart from step c.

#### e. Create or update the PR
git log --format="%P" -1
```

The output must contain **two** space-separated SHA hashes. If only one SHA is shown, `MERGE_HEAD` was lost during conflict resolution (e.g. due to a `git reset` or `git checkout`). The branch then contains a plain single-parent commit instead of a merge commit. A plain commit causes `git format-patch` to include all commits since the branch diverged from `main` — potentially tens of thousands — which will exceed the buffer limit and fail PR creation. Discard the branch and restart from step c.
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.

🤖 Code radiator: failed to create merge PR for 'net11.0'

3 participants