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:
gastown/crew/max
2026-01-09 22:23:44 -08:00
committed by Steve Yegge
parent b92e46474a
commit 131dac91c8
5 changed files with 258 additions and 140 deletions

View File

@@ -214,8 +214,10 @@ func TestNotARepo(t *testing.T) {
g := NewGit(dir)
_, err := g.CurrentBranch()
if err != ErrNotARepo {
t.Errorf("expected ErrNotARepo, got %v", err)
// ZFC: Check for not-a-repo via GitError method instead of sentinel error
gitErr, ok := err.(*GitError)
if !ok || !gitErr.IsNotARepo() {
t.Errorf("expected GitError with IsNotARepo(), got %v", err)
}
}