Skip to content

ci: set git committer identity before merging the target branch#1007

Merged
pcchen merged 1 commit into
masterfrom
fix/ci-merge-git-identity
Jul 7, 2026
Merged

ci: set git committer identity before merging the target branch#1007
pcchen merged 1 commit into
masterfrom
fix/ci-merge-git-identity

Conversation

@yingjerkao

Copy link
Copy Markdown
Collaborator

Summary

The shared "Merge with latest target branch (pull_request only)" step runs

git merge --no-edit origin/${{ github.event.pull_request.base.ref }}

without a configured git committer identity. Whenever a PR head is behind its base branch, the merge is not a fast-forward no-op, so git must create a merge commit — and fails with:

fatal: empty ident name (for <runner@...>) not allowed

killing the job with exit code 128 before any real work runs (observed 2026-07-06 on PR #984, run 28790515780). PRs branched from the base tip pass only because the merge reports "Already up to date", which masks the bug.

Fix

Configure the github-actions[bot] identity before the merge, exactly as release_pypi.yml already does:

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

Applied to the four remaining workflows that carry the step:

  • .github/workflows/ci-cmake_tests.yml
  • .github/workflows/ci-downstream-find-package.yml
  • .github/workflows/clang-format-check.yml
  • .github/workflows/conda_build.yml

The step is otherwise unchanged. (release_pypi.yml already had the fix, so it needs no change.)

Test plan

  • yaml.safe_load passes on all five workflow files
  • Verified every git merge in .github/workflows/ is now preceded by the identity config
  • CI on this PR exercises the merge step itself (this branch is at the master tip, so the merge will be a no-op here; the real proof is the next behind-base PR no longer failing with exit 128)

🤖 Generated with Claude Code

The "Merge with latest target branch (pull_request only)" step runs
`git merge --no-edit origin/<base>` without a configured committer
identity. Whenever a PR head is behind its base branch the merge is not
a fast-forward no-op, so git needs to create a merge commit and fails
with "fatal: empty ident name (for <runner@...>) not allowed", killing
the job with exit code 128 before any real work (observed on PR #984,
run 28790515780). PRs branched from the base tip pass only because the
merge is "Already up to date".

Configure the github-actions[bot] identity before the merge, matching
what release_pypi.yml already does. Affects ci-cmake_tests.yml,
ci-downstream-find-package.yml, clang-format-check.yml, and
conda_build.yml; the step is otherwise unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.82%. Comparing base (7b4d7dc) to head (22812b4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1007   +/-   ##
=======================================
  Coverage   30.82%   30.82%           
=======================================
  Files         229      229           
  Lines       33348    33348           
  Branches    14069    14069           
=======================================
  Hits        10281    10281           
  Misses      15795    15795           
  Partials     7272     7272           
Flag Coverage Δ
cpp 30.45% <ø> (ø)
python 61.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
C++ backend 32.25% <ø> (ø)
Python bindings 18.77% <ø> (ø)
Python package 61.44% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b4d7dc...22812b4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcchen

pcchen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Code Review — LGTM

Correct, minimal CI fix. The two git config lines are placed first inside the "Merge with latest target branch" run: | block, before git fetch/git merge --no-edit — which is exactly right: git merge --no-edit of the target branch creates a non-fast-forward merge commit, and the ephemeral runner has no committer identity by default, so the merge would fail without it. The github-actions[bot] identity is the conventional one, indentation matches each block's existing git commands, and the fix is applied uniformly across all 4 workflows.

Full CI is green here — including the pull_request merge-target step itself, which validates the fix end-to-end.

Note: this supersedes #1002 (@IvanaGyro), which is a functionally identical fix to the same 4 files (only comment wrapping/indentation differs). Linking it there.

Posted by Claude Code on behalf of @pcchen

@pcchen

pcchen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Context for whoever merges: this bug is currently masking BuildAndTest on behind-base PRs

On the last (unchecked) test-plan item — #1007's own CI can't exercise the fix because this branch is at the master tip, so its merge step is a no-op. That's accurate. But the fix isn't speculative, and the "real proof" already exists:

So merging #1007 is higher-value than it looks: it should restore BuildAndTest CI coverage for every behind-base PR, which is what would let the recurring "test evidence is local-only / BuildAndTest didn't run" notes on those PRs finally be cleared by real CI.

To close the last test-plan item after merge: re-run BuildAndTest on any behind-base open PR (e.g. #1001) and confirm it now gets past the merge step.

Posted by Claude Code on behalf of @pcchen

@pcchen pcchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. Correct, minimal, fully-green CI fix: the github-actions[bot] identity is set before the target-branch merge in all four affected workflows, mirroring the working release_pypi.yml precedent. The bug is real and evidenced (PR #984 run 28790515780: empty ident name / exit 128), and merging this restores BuildAndTest coverage for the behind-base PRs currently in flight.

Posted by Claude Code on behalf of @pcchen

@pcchen
pcchen merged commit b0b7a79 into master Jul 7, 2026
19 checks passed
@pcchen
pcchen deleted the fix/ci-merge-git-identity branch July 7, 2026 12:54
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