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:
gastown/crew/max
2026-01-09 22:31:55 -08:00
committed by Steve Yegge
parent 131dac91c8
commit f7d497ba07
4 changed files with 59 additions and 72 deletions

View File

@@ -214,10 +214,16 @@ func TestNotARepo(t *testing.T) {
g := NewGit(dir)
_, err := g.CurrentBranch()
// ZFC: Check for not-a-repo via GitError method instead of sentinel error
// ZFC: Check for GitError with raw stderr for agent observation.
// Agents decide what "not a git repository" means, not Go code.
gitErr, ok := err.(*GitError)
if !ok || !gitErr.IsNotARepo() {
t.Errorf("expected GitError with IsNotARepo(), got %v", err)
if !ok {
t.Errorf("expected GitError, got %T: %v", err, err)
return
}
// Verify raw stderr is available for agent observation
if gitErr.Stderr == "" {
t.Errorf("expected GitError with Stderr, got empty stderr")
}
}