JuliusBrussee/caveman · error

cachebench: empty corpus

Error message

cachebench: empty corpus

What it means

Error "cachebench: empty corpus" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/corpus.go:164

	}
	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
	}
	if limits.MaxSessions <= 0 {
		limits.MaxSessions = defaults.MaxSessions
	}
	if limits.MaxMessagesPerRequest <= 0 {
		limits.MaxMessagesPerRequest = defaults.MaxMessagesPerRequest
	}
	if limits.MaxRowBytes <= 0 {
		limits.MaxRowBytes = defaults.MaxRowBytes
	}

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Provide a corpus with at least one session/row.

When it happens

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