cli

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package cli dispatches subcommands, parses flags with the standard library, constructs the single injected logger, and maps outcomes onto the harness exit codes.

Index

Constants

View Source
const (
	ExitAdmitted     = 0
	ExitRejected     = 1
	ExitInconclusive = 2
	ExitAborted      = 130
)

Exit codes. They are the harness's contract with any caller.

View Source
const DefaultEvidenceLimit = 100

DefaultEvidenceLimit is how many findings "--evidence top" keeps. A report of a well-kept brownfield repository runs past a megabyte of JSON, which is a whole context window for the agents that read it; the ordered top of the set plus the summary is a few tens of kilobytes and every omitted row remains resolvable by fingerprint.

View Source
const DefaultVerifyTimeout = 20 * time.Minute

DefaultVerifyTimeout bounds a change admission run. Repository audits are unbounded by default because their cost scales with the codebase.

Twenty minutes because ten was not enough for this harness to judge its own release commit on a CI runner: the race suite of a repository whose tests build git fixtures and run the full pipeline is six minutes on its own. A timeout bounds cost and never quality, so the budget is set where a real change on a real repository fits, and the report says where the time went.

View Source
const Version = "0.10.0"

Version is the harness version recorded in every report.

Variables

This section is empty.

Functions

func Main

func Main(ctx context.Context, args []string, streams Streams) int

Main dispatches one invocation and returns the process exit code.

func Run

func Run(ctx context.Context) int

Run is the process entry point used by cmd/goharness.

Types

type LogOptions

type LogOptions struct {
	Verbosity int
	JSON      bool
}

LogOptions configures the single logger a run uses.

type Streams

type Streams struct {
	Out io.Writer
	Err io.Writer
}

Streams are the output sinks a command writes to.

Jump to

Keyboard shortcuts

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