JuliusBrussee/caveman · error
cachebench: session row
Error message
cachebench: session %q row %d: %w
What it means
A per-row failure while summarising or expanding a corpus session (the wrapped error carries the cause, e.g. request building or validation); the session id and row index pinpoint the offending request.
Solutions
- Follow the wrapped error for the underlying cause
- Fix or remove the cited row within the named session
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cacheengine/cachebench/corpus.go:550 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18).
Data as JSON: /api/errors/1fe0b410a21a8b8b.
Report an issue: GitHub.
Appendix: source
Thrown at cacheengine/cachebench/corpus.go:550
summary := CorpusSummary{
Name: corpus.Metadata.Name, License: corpus.Metadata.License, Revision: corpus.Metadata.Revision,
SHA256: corpus.SHA256, Sessions: len(sessions), Requests: len(corpus.Rows), Sources: map[string]int{},
RetainedBytes: corpus.Bytes,
TokenBasis: counter.Name() + " estimate over canonical message JSON",
}
if summary.RetainedBytes == 0 {
summary.RetainedBytes = corpusRetainedBytes(corpus.Rows)
}
turns := make([]int, 0, len(sessions))
for _, id := range order {
session := sessions[id]
turns = append(turns, len(session.Rows))
summary.Sources[corpusSource(id)]++
var previous []PrefixSegment
for index, row := range session.Rows {
prefix, err := corpusPrefix(row.Input, counter)
if err != nil {
return CorpusSummary{}, fmt.Errorf("cachebench: session %q row %d: %w", id, index, err)
}
eligible := prefixTokens(prefix)
summary.EstimatedInputTokens += int64(eligible)
if index > 0 {
reused := commonPrefixTokens(previous, prefix)
summary.EstimatedReusableTokens += int64(reused)
if reused > 0 {
summary.OpportunityRequestHitRate++
}
if len(prefix) > len(previous) && samePrefix(previous, prefix) {
summary.StrictPrefixExtensions++
} else {
summary.MutatedOrCompactedTransitions++
}
}
previous = prefix
}
}View on GitHub (pinned to 766dce6b13)