🐛 fix(kanban): pin worker git identity to host config at spawn - #14
Merged
Merged
Conversation
Dispatched kanban workers clone/branch a repo and commit their work, but the worker's runtime would author branch commits under a synthesized per-profile identity (e.g. `<name>@<host>.local`) when the cloned repo carried no local git identity. Because that author differs from the squash-merge author, GitHub auto-appends a `Co-authored-by:` trailer for it into every squash merge commit body — baking an unwanted author into git metadata on each merge. Resolve the host's canonical `git config user.name` / `user.email` once at spawn and pin them into the worker subprocess env as GIT_AUTHOR_* / GIT_COMMITTER_*. Env-level git identity overrides repo-local and global config, so every worker commit is authored as the host maintainer regardless of what identity the worker's runtime would otherwise set — which means a squash-merge finds no distinct author and adds no trailer. Identity is omitted (not set empty) when the host config can't be resolved, so git's own config chain still applies and the spawn never crashes. This is a forward, non-destructive fix: it stops new trailers at the source on every repo a worker touches and needs no history rewrite.
cwest
marked this pull request as ready for review
June 28, 2026 16:33
cwest
added a commit
that referenced
this pull request
Jul 1, 2026
Pin a dispatcher-spawned worker's git identity to the host config at spawn time so worker commits carry the correct author instead of a container default. upstream-pending: fork PR #14
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.
Problem
Dispatched kanban workers clone/branch a repo and commit their work. When the
cloned repo carries no local git identity, the worker's runtime authors branch
commits under a synthesized per-profile identity (e.g.
<name>@<host>.local).Because that author differs from the squash-merge author, GitHub's
squash-merge auto-appends a
Co-authored-by: <name> <name@…>trailer for itinto every merge commit body — baking an unwanted author into git metadata on
each merge. The squash author is correct; only the auto-derived co-author
trailer is wrong, and it recurs on every merge.
Fix
Resolve the host's canonical
git config user.name/user.emailonce atspawn (
_default_spawn) and pin them into the worker subprocess env asGIT_AUTHOR_*/GIT_COMMITTER_*. Env-level git identity overrides repo-localand global config, so every worker commit is authored as the host maintainer
regardless of what identity the worker's runtime would otherwise set. With all
branch commits sharing the squash author, GitHub finds no distinct author and
adds no trailer.
worker touches; no history rewrite.
HERMES_*config var — the identity valueis read from the host's existing git config, the source of truth.
so git's own config chain still applies and the spawn never crashes.
Tests
tests/hermes_cli/test_kanban_worker_git_identity.py(4 tests):GIT_AUTHOR_*/GIT_COMMITTER_*from resolved identity_resolve_worker_git_identityreads both keys fromgit configNone(not empty strings) when config is missingVerification:
regressions (the one failing
hermes_clitest is a pre-existing systemd testthat fails identically on the base branch — macOS has no systemd).
user.emailset to a persona commits as the personabare, but commits as the host identity when the
GIT_*env vars are set —confirming the override prevents the squash co-author trailer.
ruff checkclean on both changed files; commit signed (good signature).Draft pending review.