JuliusBrussee/caveman · error
cachebench: observation request
Error message
cachebench: observation request %q provider/epoch mismatch
What it means
The observation record's provider or epoch does not match the trace record joined by the same request id. Provider/epoch mismatch means the observation was captured under a different deployment context than the trace.
Solutions
- Re-run observation capture against the same provider and epoch as the trace
- Correct the provider/epoch stamps if they were mislabelled
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cacheengine/cachebench/observed.go:62 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/f5fba2abde4f6b21.
Report an issue: GitHub.
Appendix: source
Thrown at cacheengine/cachebench/observed.go:62
}
if _, exists := byID[request.RequestID]; exists {
return Report{}, fmt.Errorf("cachebench: duplicate trace request %q", request.RequestID)
}
if strings.TrimSpace(request.Provider) == "" || strings.TrimSpace(request.Epoch) == "" || !validUniqueJSONObject(request.Body) || request.BodySHA256 == "" || request.BodySHA256 != bodyDigest(request.Body) {
return Report{}, fmt.Errorf("cachebench: trace request %q has invalid identity, body, or digest", request.RequestID)
}
if request.StableSegmentCount < 0 || request.StableSegmentCount > len(request.Prefix) || !validPrefix(request.Prefix) {
return Report{}, fmt.Errorf("cachebench: trace request %q has invalid prefix", request.RequestID)
}
byID[request.RequestID] = request
}
for _, record := range records {
request, exists := byID[record.RequestID]
if !exists {
return Report{}, fmt.Errorf("cachebench: observation request %q absent from trace", record.RequestID)
}
if record.Provider != request.Provider || record.Epoch != request.Epoch {
return Report{}, fmt.Errorf("cachebench: observation request %q provider/epoch mismatch", record.RequestID)
}
if record.RequestBodySHA256 == "" || record.RequestBodySHA256 != request.BodySHA256 {
return Report{}, fmt.Errorf("cachebench: observation request %q body digest mismatch", record.RequestID)
}
}
report, err := EvaluateObserved(records, target)
if err != nil {
return Report{}, err
}
report.EvidenceLimitations = append([]string{
"observation population exactly joined to supplied request trace by request ID and body SHA-256",
}, report.EvidenceLimitations...)
return report, nil
}
// ObservationReadLimits bounds JSONL evidence decoding.
type ObservationReadLimits struct {
MaxLineBytes intView on GitHub (pinned to 766dce6b13)