Skip to content

[BUG] Slicer integrate union commit fails without ambient git identity (GATE-ERROR) #1056

Description

@Defilan

Bug Description

The slicer's integrate step fails with GATE-ERROR when it runs in an environment that has no git author identity configured (the in-cluster foreman-agent pod), because the union commit is a bare git commit that relies on ambient user.name/user.email.

Steps to Reproduce

  1. Run a sliced Workload where every slice reaches GO (so integrate actually runs).
  2. integrate is scheduled on a foreman-agent pod whose git clone has no user.name/user.email in any config scope.
  3. pkg/foreman/slicer/integrate.go builds the union and calls git commit -m <msg>.

Expected Behavior

The union commit lands regardless of the pod's ambient git config, so integrate produces GATE-PASS and reconcile runs.

Actual Behavior

integrate: commit union: exit status 128: Author identity unknown
fatal: unable to auto-detect email address (got 'unknown@foreman-agent-<hash>.(none)')

integrate returns GATE-ERROR and reconcile cascade-fails, even though all slices were green. The whole Workload fails on a missing git identity, not on any code problem.

Observed on the first live lab run where all slices reached GO (the graduated slicer, epic #1033).

Root Cause

integrate.go commits the union with a bare git commit, relying on ambient identity. The coder's own commits do not hit this because pkg/foreman/agent/repo/branch.go sets GIT_COMMITTER_NAME=foreman / GIT_COMMITTER_EMAIL=foreman@llmkube.dev; the slicer integrate path never got the same treatment. The package's unit tests miss it because the test fixture (initRepo) configures a local identity, masking the production condition.

Proposed Fix

Pass the foreman bot identity explicitly on the union commit: git -c user.name=foreman -c user.email=foreman@llmkube.dev commit -m <msg>, matching repo/branch.go. Add a regression test that runs Integrate with no ambient git identity and asserts the union commit lands under the bot identity.

Environment

Additional Context

Surfaced alongside #1054 (branch-name collisions across re-runs) during the first end-to-end lab validation of the graduated slicer. The dependsOn gating and cascade-fail behavior worked correctly; this is the last blocker to a clean integrate to reconcile pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/foremanForeman: the agentic fleet orchestrator add-onbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions