website/versioned_docs/version-1.0.0/cli-reference/merge-slot.md
Generated from bd help --doc merge-slot
Merge-slot gates serialize conflict resolution in the merge queue.
A merge slot is an exclusive access primitive: only one agent can hold it at a time. This prevents "monkey knife fights" where multiple polecats race to resolve conflicts and create cascading conflicts.
Each rig has one merge slot bead: <prefix>-merge-slot (labeled gt:slot). The slot uses:
Examples: bd merge-slot create # Create merge slot for current rig bd merge-slot check # Check if slot is available bd merge-slot acquire # Try to acquire the slot bd merge-slot release # Release the slot
bd merge-slot
Attempt to acquire the merge slot for exclusive access.
If the slot is available (status=open), it will be acquired:
If the slot is held (status=in_progress), the command fails unless --wait is passed, which adds the requester to the waiters queue.
Use --holder to specify who is acquiring (default: BEADS_ACTOR env var).
bd merge-slot acquire [flags]
Flags:
--holder string Who is acquiring the slot (default: BEADS_ACTOR)
--wait Add to waiters list if slot is held
Check if the merge slot is available or held.
Returns:
bd merge-slot check
Create a merge slot bead for serialized conflict resolution.
The slot ID is automatically generated based on the beads prefix (e.g., gt-merge-slot). The slot is created with status=open (available).
bd merge-slot create
Release the merge slot after conflict resolution is complete.
Sets status back to open and clears the holder field. If there are waiters, the highest-priority waiter should then acquire.
bd merge-slot release [flags]
Flags:
--holder string Who is releasing the slot (for verification)