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)
|
return m.ClearIssue(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// loadFromBeads derives polecat state from beads assignee field.
|
// loadFromBeads gets polecat info from beads assignee field.
|
||||||
// State is derived as follows:
|
// State is simple: issue assigned → working, no issue → idle.
|
||||||
// - If an issue is assigned to this polecat and is open/in_progress: StateWorking
|
// We don't interpret issue status (ZFC: Go is transport, not decision-maker).
|
||||||
// - If no issue assigned: StateIdle
|
|
||||||
func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
||||||
polecatPath := m.polecatDir(name)
|
polecatPath := m.polecatDir(name)
|
||||||
branchName := fmt.Sprintf("polecat/%s", name)
|
branchName := fmt.Sprintf("polecat/%s", name)
|
||||||
@@ -572,20 +571,13 @@ func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
|||||||
}, nil
|
}, 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
|
state := StateIdle
|
||||||
issueID := ""
|
issueID := ""
|
||||||
if issue != nil {
|
if issue != nil {
|
||||||
issueID = issue.ID
|
issueID = issue.ID
|
||||||
switch issue.Status {
|
state = StateWorking
|
||||||
case "open", "in_progress":
|
|
||||||
state = StateWorking
|
|
||||||
case "closed":
|
|
||||||
state = StateDone
|
|
||||||
default:
|
|
||||||
// Unknown status, assume working if assigned
|
|
||||||
state = StateWorking
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Polecat{
|
return &Polecat{
|
||||||
|
|||||||
Reference in New Issue
Block a user