fix(zfc): remove strings.Contains conflict detection from Go code
hq-hcil1: Remove deprecated HasConflict/HasAuthFailure/IsNotARepo/HasRebaseConflict methods that violated ZFC by having Go code decide error types based on stderr parsing. Changes: - Remove deprecated helper methods from GitError and SwarmGitError - Export GetConflictingFiles() which uses git porcelain output (diff --diff-filter=U) - Update CheckConflicts(), engineer.go, and integration.go to use GetConflictingFiles() - Update tests to verify raw stderr is available for agent observation ZFC principle: Go code transports raw output to agents; agents observe and decide. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
131dac91c8
commit
f7d497ba07
@@ -311,8 +311,10 @@ func (e *Engineer) doMerge(ctx context.Context, branch, target, sourceIssue stri
|
||||
}
|
||||
_, _ = fmt.Fprintf(e.output, "[Engineer] Merging with message: %s\n", mergeMsg)
|
||||
if err := e.git.MergeNoFF(branch, mergeMsg); err != nil {
|
||||
// ZFC: Check for conflict via GitError method instead of sentinel error
|
||||
if gitErr, ok := err.(*git.GitError); ok && gitErr.HasConflict() {
|
||||
// ZFC: Use git's porcelain output to detect conflicts instead of parsing stderr.
|
||||
// GetConflictingFiles() uses `git diff --diff-filter=U` which is proper.
|
||||
conflicts, conflictErr := e.git.GetConflictingFiles()
|
||||
if conflictErr == nil && len(conflicts) > 0 {
|
||||
_ = e.git.AbortMerge()
|
||||
return ProcessResult{
|
||||
Success: false,
|
||||
|
||||
Reference in New Issue
Block a user