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
- Variables
- func Attribute(ctx context.Context, in Input) ledger.RegressionFoundPayload
- func CommitTask(ctx context.Context, dir, prefix, sha string) (string, error)
- func DefaultRef(ctx context.Context, dir string) string
- func Line(p ledger.RegressionFoundPayload) string
- func SubjectTask(prefix, subject string) string
- type Input
- type Range
Constants ¶
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 ¶
var ( FoundBy = []string{"bisect", "blame", "none"} Confidences = []string{"confirmed", "likely", Unclear} Repros = []string{"obvious", "full", "skipped", "unconfirmed"} )
Values each flag takes, for the command to check.
Functions ¶
func Attribute ¶
func Attribute(ctx context.Context, in Input) ledger.RegressionFoundPayload
Attribute is the regression_found payload for in.
func CommitTask ¶
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 ¶
DefaultRef is the ref branchTask reads the default branch as.
func Line ¶
func Line(p ledger.RegressionFoundPayload) string
Line is what the plan's `Regression of:` header and the command print.
func SubjectTask ¶
SubjectTask is the id a commit subject opens with, "" for none: the last rule CommitTask tries, for a caller that already holds the subject.
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.