Documentation
¶
Overview ¶
Package pipeline runs the configurable validation steps inside a worktree and implements the "clean push gate": a push is allowed only when every required step passes. It executes shell commands and never pushes anything itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
StopOnFailure bool
DefaultTimeout time.Duration
Env map[string]string
Steps []Step
}
Config is the runtime validation configuration.
func FromConfig ¶
func FromConfig(c config.ValidationConfig) (Config, error)
FromConfig converts the YAML-facing config into a runtime Config, parsing duration strings.
type Result ¶
type Result struct {
Steps []StepResult `json:"steps"`
Passed bool `json:"passed"`
Failed []StepResult `json:"failed,omitempty"`
Duration time.Duration `json:"duration"`
}
Result is the aggregate pipeline outcome.
func (Result) FailureDigest ¶
FailureDigest renders a compact summary of failed steps for an agent to fix.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes validation pipelines.
type Step ¶
type Step struct {
Name string
Run string
Timeout time.Duration
ContinueOnError bool // failure is recorded but does NOT block the gate
WorkdirRel string
Env map[string]string
}
Step is one validation command.
type StepResult ¶
type StepResult struct {
Name string `json:"name"`
Status StepStatus `json:"status"`
ExitCode int `json:"exit_code"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
Duration time.Duration `json:"duration"`
Advisory bool `json:"advisory,omitempty"` // continue_on_error step
}
StepResult captures one step's execution.
type StepStatus ¶
type StepStatus string
StepStatus is the outcome of a single step.
const ( StepPassed StepStatus = "passed" StepFailed StepStatus = "failed" StepTimedOut StepStatus = "timed_out" StepSkipped StepStatus = "skipped" )