Allow agent files to set git user identity (name/email) #94

Closed
opened 2026-05-28 20:53:08 -04:00 by didericis · 0 comments
Owner

Problem

git.user.name / git.user.email is a bottle-only field today (manifest.py _AGENT_KEYS rejects anything else in agent frontmatter). The only way to give an agent a distinct commit identity is to author a whole separate bottle — coupling commit attribution (a purpose/presentation concern) to the security boundary (the bottle). This is why e.g. a claude-dev-implementer bottle exists largely to carry one user.name.

Proposal

Let agent files declare git.user (name/email only). At launch the agent's git.user overlays the referenced bottle's git.user per-field (agent wins on non-empty), mirroring the existing extends: overlay from PRD 0025.

  • Keep git.remotes bottle-only — that block carries credentials (IdentityFile, KnownHostKey) and is boundary-relevant.
  • Apply the overlay at Manifest.bottle_for(), the single chokepoint both backends already use, so provisioners need no changes.

Why this is safe

Git author identity is not a credential or capability: push auth is the bottle's git.remotes token/key, and the author field is already forgeable from inside the bottle (git config user.email ... at runtime). The manifest field is only a default. Allowing agents to set it does not widen the attack surface; attribution integrity is a commit-signing concern, not an author-field one.

Follow-up: PRD + implementation.

## Problem `git.user.name` / `git.user.email` is a **bottle-only** field today (`manifest.py` `_AGENT_KEYS` rejects anything else in agent frontmatter). The only way to give an agent a distinct commit identity is to author a whole separate bottle — coupling commit attribution (a *purpose/presentation* concern) to the security boundary (the bottle). This is why e.g. a `claude-dev-implementer` bottle exists largely to carry one `user.name`. ## Proposal Let **agent** files declare `git.user` (name/email only). At launch the agent's `git.user` overlays the referenced bottle's `git.user` per-field (agent wins on non-empty), mirroring the existing `extends:` overlay from PRD 0025. - Keep `git.remotes` **bottle-only** — that block carries credentials (IdentityFile, KnownHostKey) and is boundary-relevant. - Apply the overlay at `Manifest.bottle_for()`, the single chokepoint both backends already use, so provisioners need no changes. ## Why this is safe Git author identity is **not a credential or capability**: push auth is the bottle's `git.remotes` token/key, and the author field is already forgeable from inside the bottle (`git config user.email ...` at runtime). The manifest field is only a default. Allowing agents to set it does not widen the attack surface; attribution integrity is a commit-*signing* concern, not an author-field one. Follow-up: PRD + implementation.
didericis added the Kind/Enhancement label 2026-05-28 20:53:40 -04:00
didericis-claude was assigned by didericis 2026-05-28 20:53:55 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#94