refactor(zfc): derive state from files instead of in-memory cache
Apply ZFC (Zero Forge Cache) principle across git error handling and feed curation. Agents now observe raw git output and make their own decisions rather than relying on pre-interpreted error types. - Add GitError type with raw stdout/stderr for observation - Add SwarmGitError following the same pattern - Remove in-memory deduplication maps from Curator - Curator now reads state from feed/events files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
b92e46474a
commit
131dac91c8
@@ -5,7 +5,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -312,7 +311,8 @@ 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 {
|
||||
if errors.Is(err, git.ErrMergeConflict) {
|
||||
// ZFC: Check for conflict via GitError method instead of sentinel error
|
||||
if gitErr, ok := err.(*git.GitError); ok && gitErr.HasConflict() {
|
||||
_ = e.git.AbortMerge()
|
||||
return ProcessResult{
|
||||
Success: false,
|
||||
|
||||
Reference in New Issue
Block a user