{"record":{"id":"4c76087fe625b726","repo":"vxcontrol/pentagi","slug":"no-tests-to-execute","errorCode":null,"errorMessage":"no tests to execute","messagePattern":"no tests to execute","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/providers/tester/runner.go","lineNumber":53,"sourceCode":"\tconfig := applyOptions(opts)\n\n\t// load test registry\n\tvar registry *testdata.TestRegistry\n\tvar err error\n\n\tif config.customRegistry != nil {\n\t\tregistry = config.customRegistry\n\t} else {\n\t\tregistry, err = testdata.LoadBuiltinRegistry()\n\t\tif err != nil {\n\t\t\treturn ProviderTestResults{}, fmt.Errorf(\"failed to load test registry: %w\", err)\n\t\t}\n\t}\n\n\t// collect all test requests\n\trequests := collectTestRequests(registry, prv, config)\n\tif len(requests) == 0 {\n\t\treturn ProviderTestResults{}, fmt.Errorf(\"no tests to execute\")\n\t}\n\n\t// execute tests in parallel\n\tresponses := executeTestsParallel(ctx, requests, config)\n\n\t// group results by agent type\n\treturn groupResults(responses), nil\n}\n\n// collectTestRequests gathers all test requests based on configuration\nfunc collectTestRequests(registry *testdata.TestRegistry, prv provider.Provider, config *testConfig) []testRequest {\n\tvar requests []testRequest\n\n\t// create agent type filter\n\tagentFilter := make(map[pconfig.ProviderOptionsType]bool)\n\tfor _, agentType := range config.agentTypes {\n\t\tagentFilter[agentType] = true\n\t}","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/providers/tester/runner.go#L35-L71","documentation":"TestProvider collected zero executable test requests after filtering the loaded registry, so there is nothing to run and it fails fast instead of returning empty results. collectTestRequests applies agent-type, group, and test-type filters on top of the registry; if every filter excludes everything, the slice is empty.","triggerScenarios":"Calling tester.TestProvider with options that over-filter: WithAgentTypes naming agent types with no registered cases, WithGroups naming a nonexistent group (registry.GetTestSuite fails and is only logged as a warning at runner.go:76-79), or a custom registry that is empty / contains no suites matching the requested groups.","commonSituations":"Typo in a group or agent-type option value; running the tester against a custom registry built programmatically but never populated; filtering to a test type the builtin registry does not define; expecting warnings for bad group names to be fatal but they are silently skipped (visible only in verbose mode).","solutions":["Print registry contents / enable verbose logging to see which groups and suites actually loaded.","Check the WithGroups/WithAgentTypes option values for typos against the registry's defined group names.","Remove or widen the restrictive filter options and re-run without filters to confirm the registry is non-empty.","If using WithCustomRegistry, verify it has at least one test suite whose group and agent types match the filters.","Fix the misspelled group name rather than relying on the silent warning path."],"exampleFix":"// before\ntester.TestProvider(ctx, prv, tester.WithGroups(\"file_edit\")) // typo: group is \"fileedit\"\n// after\ntester.TestProvider(ctx, prv, tester.WithGroups(\"fileedit\"))","handlingStrategy":"validation","validationCode":"// pre-check that filters will match something\nregistry, _ := testdata.LoadBuiltinRegistry()\nfor _, g := range groups {\n    if _, err := registry.GetTestSuite(g); err != nil {\n        return fmt.Errorf(\"group %q does not exist in registry\", g)\n    }\n}","typeGuard":null,"tryCatchPattern":"results, err := tester.TestProvider(ctx, prv, opts...)\nif err != nil {\n    if err.Error() == \"no tests to execute\" {\n        log.Fatalf(\"filters matched nothing — check WithGroups/WithAgentTypes values and registry contents\")\n    }\n    return err\n}","preventionTips":["Enable verbose logging so failed registry.GetTestSuite lookups are printed instead of silently skipped","Keep a test/test-list command that prints available group and agent-type names; copy values from it","Fail fast (or loudly) on unknown group names instead of warning-and-skipping","When using WithCustomRegistry, assert it is non-empty before calling TestProvider","Re-run without filters once to confirm the registry itself has cases"],"tags":["go","testing","configuration","empty-result"],"backgroundTag":"no-tests-matched-filters","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}