fix: remove vestigial state.json files from agent directories
Agent directories (witness/, refinery/, mayor/) contained state.json files with last_active timestamps that were never updated, making them stale and misleading. This change removes: - initAgentStates function that created vestigial state.json files - AgentState type and related Load/Save functions from config package - MayorStateValidCheck from doctor checks - requesting_* lifecycle verification (dead code - flags were never set) - FileStateJSON constant and MayorStatePath function Kept intact: - daemon/state.json (actively used for daemon runtime state) - crew/<name>/state.json (operational CrewWorker metadata) - Agent state tracking via beads (the ZFC-compliant approach) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ func createTestRig(t *testing.T, root, name string) {
|
||||
t.Fatalf("mkdir rig: %v", err)
|
||||
}
|
||||
|
||||
// Create agent dirs
|
||||
// Create agent dirs (witness, refinery, mayor)
|
||||
for _, dir := range AgentDirs {
|
||||
dirPath := filepath.Join(rigPath, dir)
|
||||
if err := os.MkdirAll(dirPath, 0755); err != nil {
|
||||
@@ -48,12 +48,6 @@ func createTestRig(t *testing.T, root, name string) {
|
||||
}
|
||||
}
|
||||
|
||||
// Create witness state.json (witnesses don't have clones, just state)
|
||||
witnessState := filepath.Join(rigPath, "witness", "state.json")
|
||||
if err := os.WriteFile(witnessState, []byte(`{"role":"witness"}`), 0644); err != nil {
|
||||
t.Fatalf("write witness state: %v", err)
|
||||
}
|
||||
|
||||
// Create some polecats
|
||||
polecatsDir := filepath.Join(rigPath, "polecats")
|
||||
for _, polecat := range []string{"Toast", "Cheedo"} {
|
||||
|
||||
Reference in New Issue
Block a user