fix(rig): check witness/state.json instead of witness/rig (gm-2ej)
Witnesses don't have git clones like other agents. The detection was checking for witness/rig which doesn't exist. Now correctly checks for witness/state.json which is created by AddRig. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,12 @@ 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