{"record":{"id":"f71c5a87bf0754c9","repo":"JuliusBrussee/caveman","slug":"cachebench-corpus-input-exceeds-byte-limit-d","errorCode":null,"errorMessage":"cachebench: corpus input exceeds byte limit %d","messagePattern":"cachebench: corpus input exceeds byte limit (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/corpus.go","lineNumber":158,"sourceCode":"\t\treturn AgentCorpus{}, errors.New(\"cachebench: invalid corpus metadata\")\n\t}\n\tvar err error\n\tlimits, err = normalizedCorpusLimits(limits)\n\tif err != nil {\n\t\treturn AgentCorpus{}, err\n\t}\n\tlimited := &io.LimitedReader{R: reader, N: limits.MaxInputBytes + 1}\n\tvar rows []CorpusRow\n\tswitch format {\n\tcase CorpusFormatLMCacheJSONL:\n\t\trows, err = readLMCacheJSONL(limited, limits)\n\tcase CorpusFormatHFRows:\n\t\trows, err = readHFRows(limited, limits)\n\tdefault:\n\t\treturn AgentCorpus{}, fmt.Errorf(\"cachebench: unsupported corpus format %q\", format)\n\t}\n\tif limited.N <= 0 {\n\t\treturn AgentCorpus{}, fmt.Errorf(\"cachebench: corpus input exceeds byte limit %d\", limits.MaxInputBytes)\n\t}\n\tif err != nil {\n\t\treturn AgentCorpus{}, err\n\t}\n\tif len(rows) == 0 {\n\t\treturn AgentCorpus{}, errors.New(\"cachebench: empty corpus\")\n\t}\n\treturn AgentCorpus{Metadata: metadata, Rows: rows, SHA256: corpusDigest(rows), Bytes: corpusRetainedBytes(rows)}, nil\n}\n\nfunc normalizedCorpusLimits(limits CorpusLimits) (CorpusLimits, error) {\n\tdefaults := DefaultCorpusLimits()\n\tif limits.MaxRows <= 0 {\n\t\tlimits.MaxRows = defaults.MaxRows\n\t}\n\tif limits.MaxSessions <= 0 {\n\t\tlimits.MaxSessions = defaults.MaxSessions\n\t}","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cachebench/corpus.go#L140-L176","documentation":"Error \"cachebench: corpus input exceeds byte limit %d\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cachebench/corpus.go:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the corpus input below the byte limit."],"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-15T17:31:12.345Z"}