verify

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package verify executes verification steps defined in task frontmatter.

It runs bash commands and assertion checks with configurable timeouts and dry-run support, capturing output and exit codes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	ProjectRoot string
	DryRun      bool
	FailFast    bool
	Timeout     time.Duration
	Verbose     bool
	LogFunc     func(format string, args ...any) // called before each step
}

Options configures verify execution.

type Result

type Result struct {
	Steps   []StepResult `json:"steps"`
	Passed  int          `json:"passed"`
	Failed  int          `json:"failed"`
	Pending int          `json:"pending"`
	Skipped int          `json:"skipped"`
}

Result holds the aggregate outcome of all verify steps.

func Run

func Run(steps []model.VerifyStep, opts Options) *Result

Run executes the given verify steps and returns the aggregate result.

func (*Result) HasFailures

func (r *Result) HasFailures() bool

HasFailures returns true if any bash step failed.

type StepResult

type StepResult struct {
	Index    int        `json:"index"`
	Type     string     `json:"type"`
	Status   StepStatus `json:"status"`
	Command  string     `json:"command,omitempty"`
	Dir      string     `json:"dir,omitempty"`
	Check    string     `json:"check,omitempty"`
	Stdout   string     `json:"stdout,omitempty"`
	Stderr   string     `json:"stderr,omitempty"`
	ExitCode int        `json:"exit_code,omitempty"`
	Duration string     `json:"duration,omitempty"`
	Warning  string     `json:"warning,omitempty"`
}

StepResult holds the outcome of a single verify step.

type StepStatus

type StepStatus string

StepStatus represents the outcome of a single verification step.

const (
	StatusPass    StepStatus = "pass"
	StatusFail    StepStatus = "fail"
	StatusPending StepStatus = "pending"
	StatusSkip    StepStatus = "skip"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL