JuliusBrussee/caveman · error

cachebench: Hugging Face rows field must be array

Error message

cachebench: Hugging Face rows field must be array

What it means

Error "cachebench: Hugging Face rows field must be array" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/corpus.go:261

		key, ok := keyToken.(string)
		if !ok {
			return nil, errors.New("cachebench: invalid Hugging Face rows key")
		}
		if rootKeys[key] {
			return nil, fmt.Errorf("cachebench: duplicate Hugging Face field %q", key)
		}
		rootKeys[key] = true
		if key != "rows" {
			var ignored json.RawMessage
			if err := decoder.Decode(&ignored); err != nil {
				return nil, fmt.Errorf("cachebench: skip Hugging Face field %q: %w", key, err)
			}
			continue
		}
		foundRows = true
		start, err := decoder.Token()
		if err != nil || start != json.Delim('[') {
			return nil, errors.New("cachebench: Hugging Face rows field must be array")
		}
		for decoder.More() {
			var raw json.RawMessage
			if err := decoder.Decode(&raw); err != nil {
				return nil, fmt.Errorf("cachebench: decode Hugging Face row: %w", err)
			}
			if len(raw) > limits.MaxRowBytes {
				return nil, fmt.Errorf("cachebench: Hugging Face row exceeds %d bytes", limits.MaxRowBytes)
			}
			var wire hfRowWire
			if err := decodeOneJSON(raw, &wire); err != nil {
				return nil, fmt.Errorf("cachebench: decode Hugging Face row: %w", err)
			}
			row, err := validateCorpusWire(wire.Row, wire.RowIndex, limits)
			if err != nil {
				return nil, fmt.Errorf("cachebench: Hugging Face row %d: %w", wire.RowIndex, err)
			}
			if err := appendCorpusRow(&rows, sessions, &retainedBytes, row, limits); err != nil {

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. The Hugging Face rows field must be a JSON array.

When it happens

Trigger: Thrown at cacheengine/cachebench/corpus.go:261 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/71e355a22ea753fc. Report an issue: GitHub.