feat(slot): Add merge-slot gate for serialized conflict resolution

Adds a new slot bead type and merge-slot commands for serializing
conflict resolution in the merge queue. This prevents "monkey knife
fights" where multiple polecats race to resolve conflicts.

- Add TypeSlot to bead types
- Add Holder field to Issue struct
- Add bd merge-slot create/check/acquire/release commands
- Add Holder field to UpdateArgs in RPC protocol

(gt-4u49x)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
furiosa
2026-01-02 18:03:27 -08:00
committed by Steve Yegge
parent b8f9dabcb5
commit 0c7dcee3ac
4 changed files with 552 additions and 1 deletions

View File

@@ -164,6 +164,8 @@ type UpdateArgs struct {
// Gate fields
AwaitID *string `json:"await_id,omitempty"` // Condition identifier for gates (run ID, PR number, etc.)
Waiters []string `json:"waiters,omitempty"` // Mail addresses to notify when gate clears
// Slot fields
Holder *string `json:"holder,omitempty"` // Who currently holds the slot (for type=slot beads)
}
// CloseArgs represents arguments for the close operation

View File

@@ -142,6 +142,10 @@ func updatesFromArgs(a UpdateArgs) map[string]interface{} {
if len(a.Waiters) > 0 {
u["waiters"] = a.Waiters
}
// Slot fields
if a.Holder != nil {
u["holder"] = *a.Holder
}
return u
}