fix(slicer): give the union commit an explicit git identity#1057
Open
Defilan wants to merge 1 commit into
Open
fix(slicer): give the union commit an explicit git identity#1057Defilan wants to merge 1 commit into
Defilan wants to merge 1 commit into
Conversation
The integrate agent builds the union commit in a pod whose clone has no user.name/user.email in any git config scope. A bare `git commit` there dies with "Author identity unknown" (exit 128), so integrate returns GATE-ERROR and reconcile cascade-fails even when every slice is green. Pass the foreman bot identity (foreman <foreman@llmkube.dev>) explicitly via `git -c`, matching repo/branch.go which does the same for the coder's own commits. Add a regression test that runs Integrate with no ambient git identity and asserts the union commit lands under the bot identity; the existing fixture masked this by configuring a local identity. Fixes defilantech#1056 Signed-off-by: Christopher Maher <chris@mahercode.io>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
What
Give the slicer's union commit an explicit git author identity, so
integratesucceeds in a pod that has nouser.name/user.emailconfigured.Why
Fixes #1056. On the first end-to-end lab run where every slice reached GO,
integrateran on the in-cluster foreman-agent pod and died at the union commit:integrate.gocommitted the union with a baregit commit, relying on ambient git identity the pod's clone does not have. That surfaced asGATE-ERROR, cascade-failingreconcileeven though all slices were green. The coder's own commits avoid this becauserepo/branch.goalready setsGIT_COMMITTER_NAME=foreman/GIT_COMMITTER_EMAIL=foreman@llmkube.dev; the slicer integrate path never got the same treatment. The package's unit tests missed it because the fixture (initRepo) configures a local identity, masking the production condition.How
integrate.go: passgit -c user.name=foreman -c user.email=foreman@llmkube.dev commit -m <msg>, matching the foreman bot identity used for the coder's commits.TestIntegrate_NoAmbientGitIdentity: neutralizes global/system git config, strips the fixture's local identity, runsIntegrate, and asserts the union commit lands under the foreman bot identity. Fails before the fix (wrong author on a dev box, or the exit-128 error in CI/pod), passes after.Testing
go test ./pkg/foreman/slicer/— all pass, including the new regression test.go build ./...,go vet ./pkg/foreman/slicer/,golangci-lint run ./pkg/foreman/slicer/...— clean.integratepast the union commit (this PR removes the need for that workaround).Checklist
go build ./...passesAssisted-by: Claude (Anthropic) — analysis, regression test, and patch; reviewed by the maintainer.