{"record":{"id":"139e3fe87afa46e0","repo":"JuliusBrussee/caveman","slug":"cache-replay-execute-requires-accept-live-cost","errorCode":null,"errorMessage":"cache-replay: -execute requires -accept-live-cost, -output, and -verifier-command","messagePattern":"cache-replay: -execute requires -accept-live-cost, -output, and -verifier-command","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cmd/cache-replay/main.go","lineNumber":253,"sourceCode":"\t}\n\tpreflight, err := cachebench.ValidateReplay(records, limits, *timeScale)\n\tif err != nil {\n\t\tfatalConfig(err)\n\t}\n\ttarget := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minEligible}\n\tif err := cachebench.ValidateReplayTarget(records, target); err != nil {\n\t\tfatalConfig(err)\n\t}\n\tif !*executeReplay {\n\t\twriteStdout(map[string]any{\n\t\t\t\"schema\": \"caveman.cachebench.replay-preflight.v1\", \"execute\": false,\n\t\t\t\"trace_sha256\": traceSHA, \"preflight\": preflight, \"target\": target,\n\t\t\t\"message\": \"preflight only; no provider request sent\",\n\t\t})\n\t\treturn\n\t}\n\tif !*acceptCost || *outputPath == \"\" || !filepath.IsAbs(*outputPath) || *verifierPath == \"\" || !filepath.IsAbs(*verifierPath) {\n\t\tfatalConfig(errors.New(\"cache-replay: -execute requires -accept-live-cost, -output, and -verifier-command\"))\n\t}\n\tverifierInfo, err := os.Stat(*verifierPath)\n\tif err != nil || !verifierInfo.Mode().IsRegular() {\n\t\tfatalConfig(errors.New(\"cache-replay: verifier command must be an existing regular file\"))\n\t}\n\tif err := validateProviderCredentials(records); err != nil {\n\t\tfatalConfig(err)\n\t}\n\tenvironment, err := verifierEnvironment(verifierEnv)\n\tif err != nil {\n\t\tfatalConfig(err)\n\t}\n\ttransport, err := cachebench.NewHTTPReplayTransport(cachebench.HTTPReplayConfig{\n\t\tCredentials: cachebench.HTTPReplayCredentials{\n\t\t\tOpenAIAPIKey: os.Getenv(\"OPENAI_API_KEY\"), AnthropicAPIKey: os.Getenv(\"ANTHROPIC_API_KEY\"),\n\t\t\tGeminiAPIKey: os.Getenv(\"GEMINI_API_KEY\"), BedrockAPIKey: os.Getenv(\"AWS_BEARER_TOKEN_BEDROCK\"),\n\t\t\tAWS: awssig.Credentials{AccessKeyID: os.Getenv(\"AWS_ACCESS_KEY_ID\"), SecretAccessKey: os.Getenv(\"AWS_SECRET_ACCESS_KEY\"), SessionToken: os.Getenv(\"AWS_SESSION_TOKEN\")},\n\t\t},","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cmd/cache-replay/main.go#L235-L271","documentation":"-execute was requested without the full live-execution contract: -accept-live-cost (cost acknowledgment), a -output path, and a -verifier-command. Live replay spends real money and writes evidence, so all three must be present together.","triggerScenarios":"Thrown at cacheengine/cmd/cache-replay/main.go:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add -accept-live-cost, an absolute -output path, and -verifier-command alongside -execute","Run without -execute to do a zero-cost preflight first"],"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"}