Documentation
¶
Overview ¶
Package testselection owns the conservative affected-Go-package selection policy used by the separate local feedback command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct {
Path string `json:"path"`
Reasons []string `json:"reasons"`
RequiredTests []string `json:"required_tests,omitempty"`
}
Package is one selected Go package and its stable, accumulated reasons.
type Policy ¶
type Policy struct {
Version int `json:"version"`
MetaSuites []SuitePolicy `json:"meta_suites"`
GeneratedGoPatterns []string `json:"generated_go_patterns"`
}
Policy is the versioned repository selection policy.
type Result ¶
type Result struct {
Version int `json:"version"`
Outcome string `json:"outcome"`
Packages []Package `json:"packages"`
Suites []Suite `json:"suites"`
Reasons []string `json:"reasons,omitempty"`
}
Result is machine-consumable selection evidence. Outcome is selected, empty, widened, or refused; refused is returned alongside an error to retain the diagnostic when package discovery is unavailable.
func Select ¶
Select discovers repository packages then selects changed package ownership, their reverse dependents, and declared meta suites. Production dependency effects close transitively; test-only imports select their importing package without falsely making that package's production consumers affected. Any shared or uncertain path widens visibly; unavailable package discovery refuses rather than guessing at a partial dependency graph.
type Suite ¶
type Suite struct {
ID string `json:"id"`
Package string `json:"package"`
Tests []string `json:"tests"`
Reasons []string `json:"reasons"`
}
Suite is one selected declared suite and its stable, accumulated reasons.
type SuitePolicy ¶
type SuitePolicy struct {
ID string `json:"id"`
Package string `json:"package"`
Tests []string `json:"tests"`
}
SuitePolicy declares one closed set of representative top-level proving units. Suite IDs, packages, and proving-unit names are repository policy, not operator-supplied regular expressions.