{"record":{"id":"58f377c609b5e2cd","repo":"JuliusBrussee/caveman","slug":"cachebench-request-q-is-not-cacheable-s","errorCode":null,"errorMessage":"cachebench: request %q is not cacheable: %s","messagePattern":"cachebench: request %q is not cacheable: (.+?)","errorType":"exception","errorClass":"ReplayRunError","httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay.go","lineNumber":528,"sourceCode":"\t\t}\n\t\toptimized, err := runner.Engine.Optimize(ctx, native)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: optimize request %q: %w\", record.RequestID, err)\n\t\t}\n\t\tequivalent := bytes.Equal(native.Body, optimized.Body)\n\t\tif optimized.Applied {\n\t\t\tequivalent = ModelVisibleEquivalent(native.Body, optimized.Body)\n\t\t}\n\t\tif !equivalent {\n\t\t\treturn nil, &ReplayRunError{\n\t\t\t\tRequestID: record.RequestID, FailureCode: \"model_visible_mismatch\",\n\t\t\t\tErr: fmt.Errorf(\"cachebench: request %q failed model-visible equivalence\", record.RequestID),\n\t\t\t}\n\t\t}\n\t\tif optimized.Decision != cacheengine.DecisionApply && optimized.Decision != cacheengine.DecisionObserveOnly && optimized.Reason != cacheengine.ReasonBelowMinimum {\n\t\t\treturn nil, &ReplayRunError{\n\t\t\t\tRequestID: record.RequestID, FailureCode: \"engine_not_cacheable\",\n\t\t\t\tErr: fmt.Errorf(\"cachebench: request %q is not cacheable: %s\", record.RequestID, optimized.Reason),\n\t\t\t}\n\t\t}\n\t\tprepared = append(prepared, preparedReplay{record: record, optimized: optimized})\n\t}\n\treturn prepared, nil\n}\n\nfunc validatePreparedReplayTarget(prepared []preparedReplay, target Target) error {\n\tif err := validateTarget(target); err != nil {\n\t\treturn err\n\t}\n\tproviders := map[string]bool{}\n\teligible := map[string]int{}\n\tfor _, item := range prepared {\n\t\tprovider := strings.ToLower(strings.TrimSpace(item.record.Provider))\n\t\tproviders[provider] = true\n\t\tif item.optimized.Decision == cacheengine.DecisionApply || item.optimized.Decision == cacheengine.DecisionObserveOnly {\n\t\t\teligible[provider]++","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay.go#L510-L546","documentation":"The engine's decision for this request was neither Apply nor ObserveOnly — the request is not cacheable, so it cannot contribute to the replay's cache evaluation. The decision/reason string is included in the message.","triggerScenarios":"Thrown at cacheengine/cachebench/replay.go:528 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Exclude non-cacheable requests from the replay trace","Inspect the engine reason to understand why eligibility was denied"],"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-14T05:17:10.506Z"}