{"record":{"id":"c4bddf5d111dd90a","repo":"JuliusBrussee/caveman","slug":"cache-replay-concurrent-response-and-verifier-buf","errorCode":null,"errorMessage":"cache-replay: concurrent response and verifier buffers exceed %d bytes","messagePattern":"cache-replay: concurrent response and verifier buffers exceed (.+?) bytes","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cmd/cache-replay/main.go","lineNumber":222,"sourceCode":"\tmaxResponseBytes := flag.Int64(\"max-response-bytes\", 16<<20, \"maximum retained provider response bytes/request\")\n\tproviderTimeout := flag.Duration(\"provider-timeout\", 2*time.Minute, \"hard timeout per provider request (1s-1h)\")\n\tverifierPath := flag.String(\"verifier-command\", \"\", \"task verifier executable; receives one JSON object on stdin\")\n\tverifierOutputBytes := flag.Int64(\"max-verifier-output-bytes\", 16<<20, \"maximum verifier JSON bytes/request\")\n\ttargetRate := flag.Float64(\"target\", .97, \"required request and token cache-hit rate\")\n\tminEligible := flag.Int(\"min-requests\", 100, \"minimum eligible requests/provider\")\n\tallowInsecureLoopback := flag.Bool(\"allow-insecure-loopback\", false, \"allow HTTP only for explicit loopback test base URLs\")\n\tallowCustomBaseURL := flag.Bool(\"allow-custom-base-url\", false, \"confirm credentials may be sent to explicit custom HTTPS base URLs\")\n\tverifierTimeout := flag.Duration(\"verifier-timeout\", 5*time.Minute, \"hard timeout per task-verifier invocation\")\n\tflag.Var(&verifierArgs, \"verifier-arg\", \"verifier argument; repeatable, no shell parsing\")\n\tflag.Var(&verifierEnv, \"verifier-env\", \"environment variable exposed to verifier; repeatable\")\n\tflag.Var(&baseURLs, \"base-url\", \"test/custom provider base URL as provider=https://host; repeatable\")\n\tflag.Parse()\n\n\tif *tracePath == \"\" || !filepath.IsAbs(*tracePath) || *maxRequests <= 0 || *maxRequests > maxReplayRequests || *maxTokens <= 0 || *maxTraceBytes <= 0 || *maxTraceBytes > maxReplayTraceBytes || *maxResponseBytes <= 0 || *maxResponseBytes > 256<<20 || *providerTimeout < time.Second || *providerTimeout > time.Hour || *verifierOutputBytes <= 0 || *verifierOutputBytes > 256<<20 || *verifierTimeout <= 0 || *maxScheduleDrift <= 0 || *maxConcurrency <= 0 || *maxConcurrency > 1024 {\n\t\tfatalConfig(errors.New(\"cache-replay: -trace and positive request/token/trace/response/verifier limits required\"))\n\t}\n\tif (*maxResponseBytes+*verifierOutputBytes)*int64(*maxConcurrency) > maxReplayInflightBytes {\n\t\tfatalConfig(fmt.Errorf(\"cache-replay: concurrent response and verifier buffers exceed %d bytes\", maxReplayInflightBytes))\n\t}\n\tif len(baseURLs) > 0 && !*allowCustomBaseURL {\n\t\tfatalConfig(errors.New(\"cache-replay: custom base URLs require -allow-custom-base-url\"))\n\t}\n\trecords, traceSHA, err := readTrace(*tracePath, *maxTraceBytes, *maxRequests)\n\tif err != nil {\n\t\tfatalConfig(err)\n\t}\n\tlimits := cachebench.ReplayLimits{\n\t\tMaxRequests: *maxRequests, MaxDeclaredBilledTokens: *maxTokens, MaxGap: *maxGap, MaxScheduleDrift: *maxScheduleDrift,\n\t\tMaxConcurrency:        *maxConcurrency,\n\t\tRequireGroundedTiming: !*allowUngrounded, RequireProviderTokens: !*allowEstimatedTokens,\n\t}\n\tpreflight, err := cachebench.ValidateReplay(records, limits, *timeScale)\n\tif err != nil {\n\t\tfatalConfig(err)\n\t}\n\ttarget := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minEligible}","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cmd/cache-replay/main.go#L204-L240","documentation":"Error \"cache-replay: concurrent response and verifier buffers exceed %d bytes\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cmd/cache-replay/main.go:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower the response and verifier buffer limits so their sum fits the byte cap."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}