{"record":{"id":"8276c5d878a387f2","repo":"JuliusBrussee/caveman","slug":"cachebench-provider-q-population-d-cannot-meet","errorCode":null,"errorMessage":"cachebench: provider %q population %d cannot meet minimum eligible requests %d","messagePattern":"cachebench: provider %q population (.+?) cannot meet minimum eligible requests (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay.go","lineNumber":457,"sourceCode":"// sample gate even if every captured request proves cache eligible.\nfunc ValidateReplayTarget(records []TraceRecord, target Target) error {\n\tif err := validateTarget(target); err != nil {\n\t\treturn err\n\t}\n\tif len(records) == 0 {\n\t\treturn errors.New(\"cachebench: replay trace is empty\")\n\t}\n\tcounts := map[string]int{}\n\tfor _, record := range records {\n\t\tprovider := strings.ToLower(strings.TrimSpace(record.Provider))\n\t\tif provider == \"\" {\n\t\t\treturn fmt.Errorf(\"cachebench: replay request %q has empty provider\", record.RequestID)\n\t\t}\n\t\tcounts[provider]++\n\t}\n\tfor provider, count := range counts {\n\t\tif count < target.MinEligibleRequest {\n\t\t\treturn fmt.Errorf(\"cachebench: provider %q population %d cannot meet minimum eligible requests %d\", provider, count, target.MinEligibleRequest)\n\t\t}\n\t}\n\treturn nil\n}\n\n// Run validates full population, prepares equivalent bodies, then dispatches replay.\nfunc (runner ReplayRunner) Run(ctx context.Context, records []TraceRecord, emit func(ReplayResult) error) error {\n\tif runner.Engine == nil || runner.Transport == nil || runner.Verifier == nil || emit == nil {\n\t\treturn errors.New(\"cachebench: replay engine, transport, verifier, and emitter required\")\n\t}\n\tif _, err := ValidateReplay(records, runner.Limits, runner.TimeScale); err != nil {\n\t\treturn err\n\t}\n\tprepared, err := runner.prepare(ctx, records)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif runner.Target != nil {","sourceCodeStart":439,"sourceCodeEnd":475,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay.go#L439-L475","documentation":"ValidateReplayTarget determined that even if every captured request for a provider were cache eligible, the population could not reach target.MinEligibleRequest — the sample gate is mathematically unsatisfiable, so the run is rejected up front.","triggerScenarios":"Thrown at cacheengine/cachebench/replay.go:457 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Capture more traffic for the under-populated provider","Lower MinEligibleRequest in the target"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}