{"record":{"id":"a54a2d7ffb6a8eb1","repo":"JuliusBrussee/caveman","slug":"cachebench-hugging-face-row-exceeds-d-bytes","errorCode":null,"errorMessage":"cachebench: Hugging Face row exceeds %d bytes","messagePattern":"cachebench: Hugging Face row exceeds (.+?) bytes","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/corpus.go","lineNumber":269,"sourceCode":"\t\tif key != \"rows\" {\n\t\t\tvar ignored json.RawMessage\n\t\t\tif err := decoder.Decode(&ignored); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: skip Hugging Face field %q: %w\", key, err)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tfoundRows = true\n\t\tstart, err := decoder.Token()\n\t\tif err != nil || start != json.Delim('[') {\n\t\t\treturn nil, errors.New(\"cachebench: Hugging Face rows field must be array\")\n\t\t}\n\t\tfor decoder.More() {\n\t\t\tvar raw json.RawMessage\n\t\t\tif err := decoder.Decode(&raw); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: decode Hugging Face row: %w\", err)\n\t\t\t}\n\t\t\tif len(raw) > limits.MaxRowBytes {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: Hugging Face row exceeds %d bytes\", limits.MaxRowBytes)\n\t\t\t}\n\t\t\tvar wire hfRowWire\n\t\t\tif err := decodeOneJSON(raw, &wire); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: decode Hugging Face row: %w\", err)\n\t\t\t}\n\t\t\trow, err := validateCorpusWire(wire.Row, wire.RowIndex, limits)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: Hugging Face row %d: %w\", wire.RowIndex, err)\n\t\t\t}\n\t\t\tif err := appendCorpusRow(&rows, sessions, &retainedBytes, row, limits); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"cachebench: Hugging Face row %d: %w\", wire.RowIndex, err)\n\t\t\t}\n\t\t}\n\t\tif end, err := decoder.Token(); err != nil || end != json.Delim(']') {\n\t\t\treturn nil, errors.New(\"cachebench: malformed Hugging Face rows array\")\n\t\t}\n\t}\n\tif end, err := decoder.Token(); err != nil || end != json.Delim('}') {","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/corpus.go#L251-L287","documentation":"A single row inside the Hugging Face rows array, once decoded as raw JSON, is larger than CorpusLimits.MaxRowBytes. Oversized rows are rejected outright to bound memory during corpus ingestion.","triggerScenarios":"Thrown at cacheengine/cachebench/corpus.go:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Raise MaxRowBytes in CorpusLimits if the rows are legitimately large","Trim oversized conversations out of 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"}