regression

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 15 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 regression traces a bug task's root cause to the task that shipped it, and classifies how that task's review or judge let the fault through. The agent picks the commit and the lines; everything here is a lookup, and a lookup that fails leaves a note instead of an error, because attribution never stops a run.

Index

Constants

View Source
const (
	Missed        = "missed"
	Skipped       = "skipped"
	Unreviewed    = "unreviewed"
	JudgedProceed = "judged-proceed"
	OutOfReach    = "out-of-reach"

	OriginTask = "task"
	PreF10     = "pre-f10"
	OutsideF10 = "outside-f10"

	Unclear = "unclear"
)

Classes, Origins and the rest of the payload's words.

Variables

View Source
var (
	FoundBy     = []string{"bisect", "blame", "none"}
	Confidences = []string{"confirmed", "likely", Unclear}
	Repros      = []string{"obvious", "full", "traced", "trusted", "skipped", "unconfirmed"}
)

Values each flag takes, for the command to check.

Functions

func Attribute

Attribute is the regression_found payload for in.

func ChangeTask added in v0.65.0

func ChangeTask(change string) string

ChangeTask is the task a Change: trailer's value names. `FT-9.2` is FT-9's second PR, so it names FT-9.

func CommitTask

func CommitTask(ctx context.Context, dir, prefix, sha string) (string, error)

CommitTask is the task sha belongs to: its Task: trailer, its Change: trailer, an unmerged branch holding it, or a subject that opens with an id; "" when none names one. Attribution and history share it, so they never disagree on which task owns a commit.

func DefaultRef

func DefaultRef(ctx context.Context, dir string) string

DefaultRef is the ref branchTask reads the default branch as.

func Line

Line is what the plan's `Regression of:` header and the command print.

func SubjectTask

func SubjectTask(prefix, subject string) string

SubjectTask is the id a commit subject opens with, "" for none: the last rule CommitTask tries, for a caller that already holds the subject.

func TrailerTask added in v0.65.0

func TrailerTask(tasks, changes []string) string

TrailerTask is the task a commit's trailers name, "" for none. Task: names a bundle's lead, else Change: names the task with its PR's .n. Every reader of commit trailers calls it, so none tells a different owner.

Types

type Input

type Input struct {
	Dir         string // the repository
	StorageRoot string
	Prefix      string // the tracker's id prefix
	Base        string // the revision the lines are numbered in; HEAD when empty
	Commit      string // empty when none was found
	Lines       []Range
	FoundBy     string
	Confidence  string
	Repro       string
	Class       string // only OutOfReach, which a reading of the code decides
}

Input is what the agent settled: the introducing commit, the faulty lines at Base, how it found them, and the repro outcome of the debug pass.

type Range

type Range struct {
	Path       string
	Start, End int
}

Range is lines Start to End of Path, both included, in Base's numbering.

func ParseRange

func ParseRange(s string) (Range, error)

ParseRange reads `path:start-end` or `path:line`.

func (Range) String

func (r Range) String() string

Jump to

Keyboard shortcuts

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