bd help --doc gate.
Gates are async wait conditions that block workflow steps.
Gates are created automatically when a formula step has a gate field.
They must be closed (manually or via watchers) for the blocked step to proceed.
Gate types:
human - Requires manual bd close (Phase 1)
timer - Expires after timeout (Phase 2)
gh:run - Waits for GitHub workflow (Phase 3)
gh:pr - Waits for PR merge (Phase 3)
bead - Waits for cross-rig bead to close (Phase 4)
For bead gates, await_id format is <rig>:<bead-id> (e.g., “other-project:op-abc123”).
Examples:
bd gate list # Show all open gates
bd gate list —all # Show all gates including closed
bd gate check # Evaluate all open gates
bd gate check —type=bead # Evaluate only bead gates
bd gate resolve <id> # Close a gate manually
bd gate add-waiter
Register an agent as a waiter on a gate bead. When the gate closes, the waiter will receive a wake notification via ‘bd gate wake’. The waiter is typically the worker’s address (e.g., “my-project/workers/agent-1”). This is used by ‘bd done —phase-complete’ to register for gate wake notifications.bd gate check
Evaluate gate conditions and automatically close resolved gates. By default, checks all open gates. Use —type to filter by gate type. Gate types: gh - Check all GitHub gates (gh:run and gh:pr) gh:run - Check GitHub Actions workflow runs gh:pr - Check pull request merge status timer - Check timer gates (auto-expire based on timeout) bead - Check cross-rig bead gates all - Check all gate types GitHub gates use the ‘gh’ CLI to query status:- gh:run checks ‘gh run view <id> —json status,conclusion’
- gh:pr checks ‘gh pr view <id> —json state,title’
- gh:run: status=completed AND conclusion=success
- gh:pr: state=MERGED
- timer: current time > created_at + timeout
- bead: target bead status=closed
- gh:run: status=completed AND conclusion in (failure, canceled)
- gh:pr: state=CLOSED
bd gate create
Create an ad-hoc gate issue that blocks another issue until resolved. The blocked issue will not appear in ‘bd ready’ until the gate is resolved via ‘bd gate resolve’. Gate types: human - Requires manual ‘bd gate resolve’ (default) timer - Auto-resolves after —timeout duration gh:run - Waits for GitHub Actions workflow gh:pr - Waits for PR merge Examples: bd gate create —blocks bd-abc bd gate create —type=human —blocks bd-abc —reason=“Need design review” bd gate create —type=timer —blocks bd-abc —timeout=2h bd gate create —type=gh:pr —blocks bd-abc —await-id=42bd gate discover
Discovers GitHub workflow run IDs for gates awaiting CI/CD completion. This command finds open gates with await_type=“gh:run” that don’t have an await_id, queries recent GitHub workflow runs, and matches them using heuristics:- Branch name matching
- Commit SHA matching
- Time proximity (runs within 5 minutes of gate creation)