Skip to content

fix(dev-mcp): stop injecting agent identity into git Author/Committer - #3787

Open
mikeboysen wants to merge 1 commit into
block:mainfrom
mikeboysen:fix/agent-git-identity-human
Open

fix(dev-mcp): stop injecting agent identity into git Author/Committer#3787
mikeboysen wants to merge 1 commit into
block:mainfrom
mikeboysen:fix/agent-git-identity-human

Conversation

@mikeboysen

Copy link
Copy Markdown

Summary

Agent shells (via buzz-dev-mcp shim) inject user.name / user.email through GIT_CONFIG_* at command line scope. That beats the human operator's ~/.gitconfig and repo-local identity, so every agent commit lands with an agent npub / <pubkey>@relay Author/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.rs build_git_env:

  • Stop setting user.name and user.email
  • Keep NIP-98 credential helper + keyfile + NIP-GS signing (gpg.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

  • Unit tests in shim.rs updated: assert user.name / user.email are absent; assert signing + credential entries remain (8 entries).
  • Local cargo test could not run on this Windows agent host (missing MSVC link.exe / C++ build tools). Relying on CI for buzz-dev-mcp tests.
  • Receipts for operators after Desktop ships this build:
    • git var GIT_AUTHOR_IDENT / GIT_COMMITTER_IDENT should show the human identity from git config, not the agent npub
    • git config --list --show-origin should not show command line: user.name / user.email from the shim

Related

  • Channel report from Job Mapper (MikeB / Coder diagnostic, 2026-07-30)
  • Workaround until this ships: agents unset GIT_CONFIG_COUNT + GIT_CONFIG_KEY_* / VALUE_* before git commit

None found on open PRs for this exact identity-injection failure mode.

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>
@mikeboysen
mikeboysen requested a review from a team as a code owner July 30, 2026 18:56
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.

1 participant