Remove StateIdle and idle polecat concept
The transient polecat model says: "Polecats exist only while working." This removes the deprecated StateIdle and updates the codebase: - Remove StateIdle from polecat/types.go (keep StateActive for legacy data) - Update manager.go: Get() returns StateDone (not StateIdle) when no work - Update manager.go: Add/Recreate return StateWorking (not StateIdle) - Remove zombie scan logic from deacon.go (no idle polecats to scan for) - Update tests to reflect new behavior The correct lifecycle is now: - Spawn: polecat created with work (StateWorking) - Work: sessions cycle, sandbox persists - Done: polecat signals completion (StateDone) - Nuke: Witness destroys sandbox 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,10 +19,9 @@ const (
|
||||
// StateStuck means the polecat needs assistance.
|
||||
StateStuck State = "stuck"
|
||||
|
||||
// Legacy states for backward compatibility during transition.
|
||||
// New code should not use these.
|
||||
StateIdle State = "idle" // Deprecated: use StateWorking
|
||||
StateActive State = "active" // Deprecated: use StateWorking
|
||||
// StateActive is deprecated: use StateWorking.
|
||||
// Kept only for backward compatibility with existing data.
|
||||
StateActive State = "active"
|
||||
)
|
||||
|
||||
// IsWorking returns true if the polecat is currently working.
|
||||
@@ -32,9 +31,9 @@ func (s State) IsWorking() bool {
|
||||
|
||||
// IsActive returns true if the polecat session is actively working.
|
||||
// For transient polecats, this is true for working state and
|
||||
// legacy idle/active states (treated as working).
|
||||
// legacy active state (treated as working).
|
||||
func (s State) IsActive() bool {
|
||||
return s == StateWorking || s == StateIdle || s == StateActive
|
||||
return s == StateWorking || s == StateActive
|
||||
}
|
||||
|
||||
// Polecat represents a worker agent in a rig.
|
||||
|
||||
Reference in New Issue
Block a user