{"record":{"id":"dcfb0e4465485e18","repo":"JuliusBrussee/caveman","slug":"cachebench-corpus-line-d-w","errorCode":null,"errorMessage":"cachebench: corpus line %d: %w","messagePattern":"cachebench: corpus line (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/corpus.go","lineNumber":211,"sourceCode":"\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)\n\t\t}\n\t\trow, err := validateCorpusWire(wire, line-1, limits)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: corpus line %d: %w\", line, err)\n\t\t}\n\t\tif err := appendCorpusRow(&rows, sessions, &retainedBytes, row, limits); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: corpus line %d: %w\", line, err)\n\t\t}\n\t}\n\tif err := scanner.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"cachebench: read corpus: %w\", err)\n\t}\n\treturn rows, nil\n}\n\nfunc readHFRows(reader io.Reader, limits CorpusLimits) ([]CorpusRow, error) {\n\tdecoder := json.NewDecoder(reader)\n\tfirst, err := decoder.Token()","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/corpus.go#L193-L229","documentation":"A single JSONL line in the LM Cache corpus could not be processed; the wrapped error indicates whether JSON decoding, row validation, or append limits failed. The line number locates the offending record in the input stream.","triggerScenarios":"Thrown at cacheengine/cachebench/corpus.go:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error and the cited line in the corpus file","Fix or drop the malformed row and regenerate the corpus"],"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"}