{"record":{"id":"954061027ffa4555","repo":"JuliusBrussee/caveman","slug":"cachebench-corpus-limits-exceed-hard-resource-cei","errorCode":null,"errorMessage":"cachebench: corpus limits exceed hard resource ceilings","messagePattern":"cachebench: corpus limits exceed hard resource ceilings","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/corpus.go","lineNumber":193,"sourceCode":"\t\tlimits.MaxSessions = defaults.MaxSessions\n\t}\n\tif limits.MaxMessagesPerRequest <= 0 {\n\t\tlimits.MaxMessagesPerRequest = defaults.MaxMessagesPerRequest\n\t}\n\tif limits.MaxRowBytes <= 0 {\n\t\tlimits.MaxRowBytes = defaults.MaxRowBytes\n\t}\n\tif limits.MaxMessageBytes <= 0 {\n\t\tlimits.MaxMessageBytes = defaults.MaxMessageBytes\n\t}\n\tif limits.MaxRetainedBytes <= 0 {\n\t\tlimits.MaxRetainedBytes = defaults.MaxRetainedBytes\n\t}\n\tif limits.MaxInputBytes <= 0 {\n\t\tlimits.MaxInputBytes = limits.MaxRetainedBytes\n\t}\n\tif limits.MaxRows > 1_000_000 || limits.MaxSessions > 1_000_000 || limits.MaxMessagesPerRequest > 100_000 || limits.MaxRowBytes > 256<<20 || limits.MaxMessageBytes > 128<<20 || limits.MaxInputBytes > 16<<30 || limits.MaxRetainedBytes > 16<<30 {\n\t\treturn CorpusLimits{}, errors.New(\"cachebench: corpus limits exceed hard resource ceilings\")\n\t}\n\treturn limits, nil\n}\n\nfunc readLMCacheJSONL(reader io.Reader, limits CorpusLimits) ([]CorpusRow, error) {\n\tscanner := bufio.NewScanner(reader)\n\tscanner.Buffer(make([]byte, 64*1024), limits.MaxRowBytes)\n\trows := make([]CorpusRow, 0)\n\tsessions := map[string]bool{}\n\tvar retainedBytes int64\n\tfor line := 1; scanner.Scan(); line++ {\n\t\traw := bytes.TrimSpace(scanner.Bytes())\n\t\tif len(raw) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tvar wire lmcacheRowWire\n\t\tif err := decodeOneJSON(raw, &wire); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: corpus line %d: %w\", line, err)","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cachebench/corpus.go#L175-L211","documentation":"Error \"cachebench: corpus limits exceed hard resource ceilings\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cachebench/corpus.go:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower corpus limits below the hard resource ceilings."],"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"}