Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoConfig = errors.New("no .moa/verify.json found — create one to define verification checks")
ErrNoConfig is returned by Execute when the project has no .moa/verify.json. Callers that gate on check results (e.g. the goal verifier) use it to tell "no checks defined" apart from "checks defined but failing".
Functions ¶
func FormatResult ¶
FormatResult produces a human-readable summary. Only failed checks include their output.
Types ¶
type Check ¶
type Check struct {
Name string `json:"name"`
Command string `json:"command"`
Timeout string `json:"timeout,omitempty"` // Go duration string, default "5m"
}
Check defines a single verification step.
type CheckResult ¶
type CheckResult struct {
Name string
Command string
Passed bool
Output string // combined stdout+stderr
ExitCode int
TimedOut bool
Elapsed time.Duration
}
CheckResult holds the outcome of a single check execution.
type Config ¶
type Config struct {
Checks []Check `json:"checks"`
}
Config holds the verification configuration loaded from .moa/verify.json.
func LoadConfig ¶
LoadConfig reads .moa/verify.json from cwd. Returns (nil, nil) if the file doesn't exist (feature disabled). Returns (nil, error) if the file exists but is invalid.
type Result ¶
type Result struct {
Checks []CheckResult
AllPass bool
}
Result holds the outcome of all checks.
func Execute ¶
Execute is the single entry point for running verification. Both the verify tool and the TUI /verify command call this.
func ExecuteWithConfig ¶
ExecuteWithConfig runs verification with a pre-loaded config. Used by the tool to support check filtering.