feat: Implement Step.Gate evaluation (Phase 1: Human Gates)
This implements Phase 1 of the Step.Gate feature (bd-7zka.2): - bd cook now creates gate issues for steps with gate fields - Gate issues have type=gate and block the gated step via dependency - bd list filters out gate issues by default (use --include-gates to show) - New bd gate command with list and resolve subcommands Gate types supported in Phase 1: - human: Manual closure via bd close or bd gate resolve Implementation details: - createGateIssue() in cook.go creates gate issues with proper metadata - collectSteps() creates gate dependencies when processing gated steps - IssueFilter.ExcludeTypes added to storage layer for type-based filtering - Gate command provides dedicated UX for gate management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,7 +183,8 @@ type Step struct {
|
||||
Children []*Step `json:"children,omitempty"`
|
||||
|
||||
// Gate defines an async wait condition for this step.
|
||||
// TODO(bd-7zka): Not yet implemented in bd cook. Will integrate with bd-udsi gates.
|
||||
// When set, bd cook creates a gate issue that blocks this step.
|
||||
// Close the gate issue (bd close bd-xxx.gate-stepid) to unblock.
|
||||
Gate *Gate `json:"gate,omitempty"`
|
||||
|
||||
// Loop defines iteration for this step.
|
||||
@@ -206,8 +207,9 @@ type Step struct {
|
||||
SourceLocation string `json:"-"` // Internal only, not serialized to JSON
|
||||
}
|
||||
|
||||
// Gate defines an async wait condition (integrates with bd-udsi).
|
||||
// TODO(bd-7zka): Not yet implemented in bd cook. Schema defined for future use.
|
||||
// Gate defines an async wait condition for formula steps.
|
||||
// When a step has a Gate, bd cook creates a gate issue that blocks the step.
|
||||
// The gate must be closed (manually or via watchers) to unblock the step.
|
||||
type Gate struct {
|
||||
// Type is the condition type: gh:run, gh:pr, timer, human, mail.
|
||||
Type string `json:"type"`
|
||||
|
||||
Reference in New Issue
Block a user