testplan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 16 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 testplan selects CI fuzz campaigns from committed changes. It does not replace the full integration suite or infer correctness from skipped work.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Changed

func Changed(root, base, head string) (paths []string, full bool, failure error)

Changed returns committed changed paths. A missing/initial baseline selects a full campaign instead of interpreting missing evidence as an empty diff.

func IncludeChangedTestImports

func IncludeChangedTestImports(root, base string, changed []string, packages []Package) error

IncludeChangedTestImports accounts for initialization in normally imported packages, even when only an unrelated ordinary test references that import. Unchanged import lists do not broaden helper-based target selection. Missing historical files or unreadable evidence conservatively affect every target in the owning package. Called only with a validated, available base revision.

Types

type Package

type Package struct {
	ImportPath   string
	Directory    string
	Imports      []string
	TestImports  []string
	XTestImports []string
	TestFiles    []string
	Targets      []Target
}

func Discover

func Discover(root string) ([]Package, error)

Discover enumerates actual build-selected Go test files; new fuzz targets therefore join CI automatically. It never executes a test or reads .gp and generated Go as separate test definitions. Generation consistency must run before discovery in CI.

type Plan

type Plan struct {
	Version    string      `json:"version"`
	Full       bool        `json:"full"`
	Changed    []string    `json:"changed"`
	Selections []Selection `json:"selections"`
}

func Select

func Select(changed []string, packages []Package, forceFull bool) Plan

Select conservatively follows production AND test import edges. Changes to test files select their declared fuzz targets, not unrelated campaigns. Corpus edits select exactly the named target. Fixture edits select their owning package and consumers; examples additionally feed Java/native/language. Unknown file ownership and build/tooling changes fall back to all targets.

type Selection

type Selection struct {
	Target  Target   `json:"target"`
	Reasons []string `json:"reasons"`
}

type Target

type Target struct {
	Package string   `json:"package"`
	Name    string   `json:"name"`
	File    string   `json:"file"`
	Inputs  []string `json:"inputs"`
}

Jump to

Keyboard shortcuts

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