failure

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package failure explains why a finding stopped: which stage failed (the repository gate, the investigation, the remediation or the pull request's review), which run and attempt, the outcome code and the message.

The Finding carries the pieces but not the answer. status.lastFailureReason is a single "outcome: message" string with several writers, and none of the transitions that do not fail clears it, so on its own it can name an earlier attempt's failure. Describe reads the phase log to find the edge that ended the finding and reports a failure only when that edge was one, so the status page and the tracking issue never show a stale reason as the current one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Failure

type Failure struct {
	Stage Stage
	// Run names the Investigation or Remediation child that failed; empty for
	// the repository and review stages.
	Run string
	// Attempt is the failed run's attempt ordinal; zero when there is no run.
	Attempt int32
	// Outcome is the run's outcome code (the envelope vocabulary, such as
	// commit_failed or timeout); empty when the failure has none.
	Outcome string
	// Message is the detail, without the outcome prefix.
	Message string
}

Failure is why a finding stopped.

func Describe

func Describe(f *v1alpha1.Finding) *Failure

Describe returns why f stopped, or nil when f is not Failed or HandedOff or the edge that ended it was not a failure: a verdict hand-off, a tracking issue a human closed, or a finding with no phase history.

func (*Failure) Summary

func (f *Failure) Summary() string

Summary is a one-line, message-free account of the failure for places that must not repeat agent output verbatim, such as a public tracking issue: "the remediation failed on attempt 2: commit_failed".

type Stage

type Stage string

Stage names the part of the pipeline that failed.

const (
	// StageRepository: the gate could not resolve a repository to work on
	// and handed the finding to humans.
	StageRepository Stage = "repository"
	// StageInvestigation: the investigation ran out of attempts, or failed in
	// a way another attempt cannot fix.
	StageInvestigation Stage = "investigation"
	// StageRemediation: the remediation ran out of attempts, or failed in a
	// way another attempt cannot fix.
	StageRemediation Stage = "remediation"
	// StageReview: the remediation's pull request was closed without being
	// merged.
	StageReview Stage = "review"
)

The stages a finding can stop in.

Jump to

Keyboard shortcuts

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