{"record":{"id":"a2ec2af2295f3c5b","repo":"JuliusBrussee/caveman","slug":"cachebench-no-replay-evidence","errorCode":null,"errorMessage":"cachebench: no replay evidence","messagePattern":"cachebench: no replay evidence","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay.go","lineNumber":248,"sourceCode":"// ReplayEvidenceSummary aggregates exact validated evidence population.\ntype ReplayEvidenceSummary struct {\n\tSchema                            string                  `json:\"schema\"`\n\tRequests                          int                     `json:\"requests\"`\n\tSuccessful                        int                     `json:\"successful\"`\n\tFailed                            int                     `json:\"failed\"`\n\tQualityPassed                     int                     `json:\"quality_passed\"`\n\tInputTokens                       int64                   `json:\"provider_total_input_tokens\"`\n\tOutputTokens                      int64                   `json:\"provider_output_tokens\"`\n\tTimingFaithful                    bool                    `json:\"timing_faithful\"`\n\tInputBudgetClaimedProviderCounted bool                    `json:\"input_budget_claimed_provider_counted\"`\n\tLatency                           LatencyDistribution     `json:\"latency\"`\n\tProviders                         []ProviderReplaySummary `json:\"providers\"`\n}\n\n// SummarizeReplayEvidence validates and aggregates replay records.\nfunc SummarizeReplayEvidence(records []ReplayEvidenceRecord) (ReplayEvidenceSummary, error) {\n\tif len(records) == 0 {\n\t\treturn ReplayEvidenceSummary{}, errors.New(\"cachebench: no replay evidence\")\n\t}\n\tsummary := ReplayEvidenceSummary{\n\t\tSchema: ReplaySummarySchema, Requests: len(records),\n\t\tTimingFaithful: true, InputBudgetClaimedProviderCounted: true,\n\t}\n\ttype accumulator struct {\n\t\tsummary   ProviderReplaySummary\n\t\tlatencies []int64\n\t}\n\tgroups := map[string]*accumulator{}\n\tseen := map[string]bool{}\n\tlatencies := make([]int64, 0, len(records))\n\tfor index, record := range records {\n\t\tif err := validateReplayEvidence(record); err != nil {\n\t\t\treturn ReplayEvidenceSummary{}, fmt.Errorf(\"cachebench: replay evidence %d: %w\", index, err)\n\t\t}\n\t\tif seen[record.RequestID] {\n\t\t\treturn ReplayEvidenceSummary{}, fmt.Errorf(\"cachebench: duplicate replay evidence request %q\", record.RequestID)","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay.go#L230-L266","documentation":"Raised when summing replay evidence: the aggregated evidence population is empty, so no ReplayEvidenceSummary can be produced. This fires before token/latency aggregation when zero validated evidence records were supplied.","triggerScenarios":"Thrown at cacheengine/cachebench/replay.go:248 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the replay to completion so at least one evidence record is emitted","Check upstream filters that may have dropped every record before summarization","Verify the evidence JSONL reader did not silently skip all lines"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}