{"record":{"id":"00525a17161ea86a","repo":"JuliusBrussee/caveman","slug":"cachebench-hugging-face-row-d-w","errorCode":null,"errorMessage":"cachebench: Hugging Face row %d: %w","messagePattern":"cachebench: Hugging Face row (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/corpus.go","lineNumber":277,"sourceCode":"\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('}') {\n\t\treturn nil, errors.New(\"cachebench: malformed Hugging Face rows object\")\n\t}\n\tvar trailing any\n\tif err := decoder.Decode(&trailing); err != io.EOF {\n\t\treturn nil, errors.New(\"cachebench: trailing JSON after Hugging Face rows object\")\n\t}\n\tif !foundRows {\n\t\treturn nil, errors.New(\"cachebench: Hugging Face response has no rows field\")","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/corpus.go#L259-L295","documentation":"Per-row validation (decodeOneJSON or validateCorpusWire) failed for the indexed Hugging Face row; the wrapped error names the exact cause. This is the row-level wrap inside the rows array loop of readHFRows.","triggerScenarios":"Thrown at cacheengine/cachebench/corpus.go:277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Follow the wrapped error to the specific field that failed validation","Fix or remove the cited row and rebuild 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"}