verify

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package verify runs a user-supplied shell command after each loop iteration and reports its outcome. The result is folded into the next iteration's prompt so the assistant can react to test/build failures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Cmd      string
	Stdout   string
	Stderr   string
	Combined string
	ExitCode int
	Duration time.Duration
	TimedOut bool
	Err      error
}

Result captures the outcome of a verify run.

func Run

func Run(ctx context.Context, cmd, workingDir string, timeout time.Duration, maxBytes int) *Result

Run executes cmd via `sh -c` from workingDir with the given timeout (<=0 means no timeout). It captures stdout, stderr, and a merged stream (truncated to maxBytes per stream when maxBytes > 0).

func (*Result) Success

func (r *Result) Success() bool

Success reports whether the verify command exited cleanly.

Jump to

Keyboard shortcuts

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