JuliusBrussee/caveman · error

cachebench: unsupported corpus format %q

Error message

cachebench: unsupported corpus format %q

What it means

Error "cachebench: unsupported corpus format %q" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/corpus.go:155

		return AgentCorpus{}, errors.New("cachebench: nil corpus reader")
	}
	if !validBoundedText(metadata.Name, 512, false) || !validBoundedText(metadata.License, 256, true) || !validBoundedText(metadata.Revision, 512, true) {
		return AgentCorpus{}, errors.New("cachebench: invalid corpus metadata")
	}
	var err error
	limits, err = normalizedCorpusLimits(limits)
	if err != nil {
		return AgentCorpus{}, err
	}
	limited := &io.LimitedReader{R: reader, N: limits.MaxInputBytes + 1}
	var rows []CorpusRow
	switch format {
	case CorpusFormatLMCacheJSONL:
		rows, err = readLMCacheJSONL(limited, limits)
	case CorpusFormatHFRows:
		rows, err = readHFRows(limited, limits)
	default:
		return AgentCorpus{}, fmt.Errorf("cachebench: unsupported corpus format %q", format)
	}
	if limited.N <= 0 {
		return AgentCorpus{}, fmt.Errorf("cachebench: corpus input exceeds byte limit %d", limits.MaxInputBytes)
	}
	if err != nil {
		return AgentCorpus{}, err
	}
	if len(rows) == 0 {
		return AgentCorpus{}, errors.New("cachebench: empty corpus")
	}
	return AgentCorpus{Metadata: metadata, Rows: rows, SHA256: corpusDigest(rows), Bytes: corpusRetainedBytes(rows)}, nil
}

func normalizedCorpusLimits(limits CorpusLimits) (CorpusLimits, error) {
	defaults := DefaultCorpusLimits()
	if limits.MaxRows <= 0 {
		limits.MaxRows = defaults.MaxRows
	}

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Use a supported corpus format.

When it happens

Trigger: Thrown at cacheengine/cachebench/corpus.go:155 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/ff2c0d7abd8c311d. Report an issue: GitHub.