Repository navigation
fix(sessions): commit as the deployment's bot in every agent session - #545
Merged
Merged
Conversation
Agent containers had no git identity, so the first commit failed with "Author identity unknown" and the agent then picked an author itself. The identity comes from DOMAIN, so a self-hosted deployment commits as its own noreply address. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
…git-identity * origin/develop: fix(pull-requests): return the GitLab head pipeline from pull_request_checks (#546) # Conflicts: # CHANGELOG.md
Merged
artempartos
added a commit
that referenced
this pull request
Nov 26, 2026
Agent sessions commit as noreply@<deployment domain> since #545, which is [email protected] in production. The service-account match only took *@aixle.com, so a bot-opened PR failed DCO on every agent commit that the agent did not happen to sign off itself (#900). Signed-off-by: Artem Petrov <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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 containers had no git identity. The first
git commitin every session failed withAuthor identity unknown … unable to auto-detect email address, on GitHub, GitLab and Bitbucket alike. The agent then retried with-c user.name=… -c user.email=…and picked an author itself, so every agent commit cost an extra failed step and its author was unpredictable.GitCredentials::SessionGitSetup.identity_envsetsGIT_AUTHOR_NAME/GIT_AUTHOR_EMAILandGIT_COMMITTER_NAME/GIT_COMMITTER_EMAILto Aixle Flow<noreply@<DOMAIN>>. The domain comes fromSettings.domainwithout its port, which is the sourceApplicationMaileruses for itsnoreply@sender, so a self-hosted deployment commits as its own address.AgentBaseStrategy#build_env_varsadds it to every agent container, not only sessions with code-host repositories. It covers Azure DevOps repos and repositories the agent clones itself.git config: git ranksGIT_*aboveuser.*config and-c, so an agent cannot swap in an identity it made up. An explicitgit commit --authorstill sets the author, and the committer stays the bot.Type of change
How was this tested?
test/services/container_strategies/agent_session_strategy_test.rb: the container env carries the fourGIT_*variables, with the port dropped from the domain.test/services/container_strategies/andtest/services/git_credentials/run locally in Docker against a private database: 218 runs, 0 failures. rubocop clean on the changed files.webimage, with the four variables set:git commit, thengit -c user.name=Agent -c [email protected] commit. Both commits come out asAixle Flow <[email protected]>for author and committer.The full suite runs on CI.
Checklist
git commit -s).organization has executed the Corporate CLA.
make check_allpasses locally (tests, rubocop, brakeman, eslint, typescript).[Unreleased]in CHANGELOG.md.🤖 Generated with Claude Code