flaky

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: GPL-3.0 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 flaky is CommitBrief's deterministic, static flaky-test anti-pattern detector (ADR-0022). Unlike the LLM review path it produces reproducible findings from the diff alone: it scans the added lines of changed test files for high-precision anti-patterns (hard-coded sleeps, unseeded randomness, …) and emits standard render.Finding values — no JSON-schema change, no provider call. Recall is intentionally secondary to precision: a noisy commit-stage gate erodes trust.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector turns a parsed diff into deterministic flaky-test findings. The catalog localizes finding text to the resolved output language (ADR-0021); the Severity value stays the English wire vocabulary, as for LLM findings.

func New

func New(cat *i18n.Catalog) *Detector

New returns a Detector that localizes finding text via cat.

func (*Detector) Detect

func (d *Detector) Detect(parsed diff.Diff) []render.Finding

Detect scans the added lines of every changed test file in parsed and returns the matched anti-patterns as findings. The returned slice is non-nil only when there are findings; order follows file → hunk → line.

Jump to

Keyboard shortcuts

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