refactor: remove polecat state derivation from issue status (gt-gaxo.4)
ZFC cleanup: Go should be message transport, not decision-maker. Before: loadFromBeads used switch on issue.Status to derive polecat state (open/in_progress -> working, closed -> done). After: Simple rule - has issue assigned = working, no issue = idle. We do not interpret what issue.Status means; that is for Claude in the Deacon molecule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1921
.beads/issues.jsonl
1921
.beads/issues.jsonl
File diff suppressed because it is too large
Load Diff
@@ -549,10 +549,9 @@ func (m *Manager) Reset(name string) error {
|
||||
return m.ClearIssue(name)
|
||||
}
|
||||
|
||||
// loadFromBeads derives polecat state from beads assignee field.
|
||||
// State is derived as follows:
|
||||
// - If an issue is assigned to this polecat and is open/in_progress: StateWorking
|
||||
// - If no issue assigned: StateIdle
|
||||
// loadFromBeads gets polecat info from beads assignee field.
|
||||
// State is simple: issue assigned → working, no issue → idle.
|
||||
// We don't interpret issue status (ZFC: Go is transport, not decision-maker).
|
||||
func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
||||
polecatPath := m.polecatDir(name)
|
||||
branchName := fmt.Sprintf("polecat/%s", name)
|
||||
@@ -572,20 +571,13 @@ func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Derive state from issue
|
||||
// Simple rule: has issue = working, no issue = idle
|
||||
// We don't interpret issue.Status - that's for Claude to decide
|
||||
state := StateIdle
|
||||
issueID := ""
|
||||
if issue != nil {
|
||||
issueID = issue.ID
|
||||
switch issue.Status {
|
||||
case "open", "in_progress":
|
||||
state = StateWorking
|
||||
case "closed":
|
||||
state = StateDone
|
||||
default:
|
||||
// Unknown status, assume working if assigned
|
||||
state = StateWorking
|
||||
}
|
||||
state = StateWorking
|
||||
}
|
||||
|
||||
return &Polecat{
|
||||
|
||||
Reference in New Issue
Block a user