fix(dev-mcp): stop injecting agent identity into git Author/Committer - #3787
Open
mikeboysen wants to merge 1 commit into
Open
fix(dev-mcp): stop injecting agent identity into git Author/Committer#3787mikeboysen wants to merge 1 commit into
mikeboysen wants to merge 1 commit into
Conversation
Agent shells set user.name and user.email via GIT_CONFIG_* at command-line scope, which beats the human operator's ~/.gitconfig and repo-local config. Vercel (and similar GitHub-linked deploys) then refuse previews because the commit author is an agent npub/email, not a verifiable GitHub account. Keep NIP-98 credential helper + NIP-GS signing on the agent key. Drop only the user.name / user.email pair so Author/Committer fall through to the human identity Nest prompts already require for trailers. Co-authored-by: Mike Boysen <mikeboysen@outlook.com> Signed-off-by: Mike Boysen <mikeboysen@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent shells (via
buzz-dev-mcpshim) injectuser.name/user.emailthroughGIT_CONFIG_*at command line scope. That beats the human operator's~/.gitconfigand repo-local identity, so every agent commit lands with an agent npub /<pubkey>@relayAuthor/Committer.Vercel (and similar GitHub-linked preview deploys) then fail with GitHub couldn't verify an account for the commit, because the author is not a GitHub account on the project. This has been constant and blocking for operators using agents on Vercel-connected repos (e.g. Job Mapper PR #6).
Change
In
crates/buzz-dev-mcp/src/shim.rsbuild_git_env:user.nameanduser.emailgpg.x509.program,user.signingkey, etc.)Author/Committer fall through to the human identity Nest prompts already require for trailers. Auth and signing stay on the agent key — they do not need Author/Committer to match the agent.
Validation
shim.rsupdated: assertuser.name/user.emailare absent; assert signing + credential entries remain (8 entries).cargo testcould not run on this Windows agent host (missing MSVClink.exe/ C++ build tools). Relying on CI forbuzz-dev-mcptests.git var GIT_AUTHOR_IDENT/GIT_COMMITTER_IDENTshould show the human identity from git config, not the agent npubgit config --list --show-originshould not showcommand line:user.name/user.emailfrom the shimRelated
GIT_CONFIG_COUNT+GIT_CONFIG_KEY_*/VALUE_*beforegit commitNone found on open PRs for this exact identity-injection failure mode.