Repository navigation
fix: configure git identity before bundled-skill worktree commits - #730
Conversation
Bundled skills committed in fresh /tmp worktrees (and the main checkout) without configuring git identity. On runners that don't pre-seed one, the first commit fails with `Author identity unknown`, an empty branch gets pushed, and `gh pr create` fails with `No commits between main and <branch>`. Add a canonical "Configure git identity before the first commit" recipe to running-in-ci (loaded first by every skill) and reinforce it inline in the verbatim worktree-commit blocks in nightly (Step 7) and review-runs. Closes #729 Co-Authored-By: Claude <[email protected]>
tend-agent
left a comment
There was a problem hiding this comment.
The canonical rule + the Step 7 inline are a solid root fix, and --global over the issue's repo-local git config is the right call (a fresh worktree shares the runner's ~/.gitconfig). One residual gap, though, on a site #729 explicitly named.
The conflict-resolution commits in Step 3 run before any identity is configured. "Resolve conflicts on bot PRs" dispatches parallel subagents that each git add + git commit --no-edit in a fresh git worktree add /tmp/pr-<number> — and that step executes well before Step 7, where the inline git config --global now lives. So at the moment those commits fire:
- The main session hasn't reached Step 7 yet, so no
--globalidentity has been written to~/.gitconfig. - The commits run inside dispatched subagents, which are separate agent invocations and don't reliably load
running-in-ci, so the new canonical rule isn't guaranteed to reach them.
That leaves the conflict-resolution git commit --no-edit — one of the three sites #729 called out — still exposed to Author identity unknown.
Because git config --global writes to the runner's shared ~/.gitconfig (filesystem state, not shell state — it persists across bash calls and across subagents in the same runner), setting it once, early in the main session — before Step 3 dispatches subagents — would cover every downstream commit site (conflict-resolution subagents, Step 7, and any later worktree dance) in one shot, strictly more robustly than placing it only at Step 7. A natural home is Step 0 right after loading running-in-ci, or just ahead of the Step 3 dispatch.
Not blocking the improvement here — just flagging for a follow-up so the fix reaches the site that was actually observed failing.
The Step 3 conflict-resolution subagents git commit in fresh worktrees before Step 7's inline config runs, and as separate invocations don't reliably load running-in-ci — leaving the conflict-resolution site #729 named still exposed to `Author identity unknown`. Set the identity once in the main session before dispatching; --global writes to the shared ~/.gitconfig so subagents inherit it. Co-Authored-By: Claude <[email protected]>
Release 0.1.8. Bumps the generator to 0.1.8, syncs the lockfile, and adds the `## 0.1.8` CHANGELOG section (published verbatim as the GitHub Release notes). ### Fixed - **Bundled skills configure a git identity before committing in fresh worktrees.** The `nightly`, `running-in-ci`, and `review-runs` skills now set `git config --global user.name/email` before the bot's first commit, so a `/tmp` worktree (which inherits no identity) no longer fails with `Author identity unknown`, push an empty branch, and break `gh pr create`. ([#730](#730)) #728 (release-skill docs) and #727 (workflow regen) are internal and omitted from adopter-facing notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Regenerates tend's own `.github/workflows/tend-*.yaml` with the just-released generator (`uvx tend@latest init`, now 0.1.8). The diff is purely mechanical: the action pin bumps `max-sixty/tend/<harness>@0.1.7 → @0.1.8` and the generated-by header comment updates across all 8 workflows. Until this merges, tend's deployed workflows lag the 0.1.8 generator (e.g. the [#730](#730) git-identity fix in the bundled skills stays unreachable on tend itself). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Problem
Bundled skills that commit in a fresh
/tmpgit worktree(and in the main checkout) rungit commitwithout first configuring a git identity. On runners where the harness doesn't pre-seed one, the first commit fails withAuthor identity unknown, the branch gets pushed with no commit, andgh pr createthen fails withNo commits between main and <branch>. Sessions self-correct by setting an identity and recommitting, but they burn turns and momentarily push an empty branch. Per #729 this has fired on consecutive committing nightlies, making it structural rather than a one-off.The gap is systemic — the same
git commit-without-identity shape exists acrossnightly,review-runs,running-in-ci,triage,review, andci-fix.Solution
Fix it once at the root and reinforce at the documented failure sites:
running-in-ci/SKILL.md— new### Configure git identity before the first commitsubsection under PR Creation. Every skill loadsrunning-in-cifirst, so this is the canonical rule for all of them. Usesgit config --global(covers the main checkout and every worktree in one shot) with the GitHub noreply email form (<id>+<login>@users.noreply.github.com) so commits stay attributed to the bot and passverified-email push rules. Also annotated the Learning-from-Feedback worktree block to point at it.nightly/SKILL.md— inlined the identity config into the Step 7 verbatim ship block (the failure site in nightly: worktree commit fails on runners without a pre-seeded git identity #729). Shell state doesn't persist between bash calls, so it's self-contained there.review-runs/SKILL.md— annotated its worktree-commit block to set identity first.Testing
Skill-text fix — no generator unit test applies. Reproduced the mechanism locally:
git commitwith no configured identity fails withAuthor identity unknownboth in a fresh repo and a fresh worktree; settinggit config --global user.name/user.emaillets the same commit succeed.pre-commit(trailing-whitespace, typos, bang-backtick guard, install-tend sync) passes on all three changed files.Closes #729 — automated triage