{"record":{"id":"5c7e33f97361da3b","repo":"JuliusBrussee/caveman","slug":"cachebench-trace-in-required-with-observations","errorCode":null,"errorMessage":"cachebench: -trace-in required with -observations","messagePattern":"cachebench: -trace-in required with -observations","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cmd/cachebench/main.go","lineNumber":55,"sourceCode":"\t\tcorpusName      = flag.String(\"corpus-name\", \"lmcache-agentic-traces\", \"corpus name recorded in report\")\n\t\tcorpusLicense   = flag.String(\"corpus-license\", \"\", \"corpus license recorded in report\")\n\t\tcorpusRevision  = flag.String(\"corpus-revision\", \"\", \"immutable corpus revision recorded in report\")\n\t\tcorpusMaxRows   = flag.Int(\"corpus-max-rows\", 100000, \"fail closed above this many corpus rows\")\n\t\tcorpusMaxSess   = flag.Int(\"corpus-max-sessions\", 10000, \"fail closed above this many corpus sessions\")\n\t\tcorpusMaxBytes  = flag.Int64(\"corpus-max-bytes\", 1<<30, \"fail closed above this many retained corpus bytes\")\n\t)\n\tflag.Parse()\n\ttarget := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minRequests}\n\tvar (\n\t\treport cachebench.Report\n\t\terr    error\n\t)\n\tif *observations != \"\" && *corpusPath != \"\" {\n\t\tfatal(fmt.Errorf(\"cachebench: -observations and -corpus are mutually exclusive\"))\n\t}\n\tif *observations != \"\" {\n\t\tif *traceIn == \"\" {\n\t\t\tfatal(fmt.Errorf(\"cachebench: -trace-in required with -observations\"))\n\t\t}\n\t\treport, err = observedReport(*observations, *traceIn, target)\n\t} else if *corpusPath != \"\" {\n\t\tif *traceIn != \"\" {\n\t\t\tfatal(fmt.Errorf(\"cachebench: -trace-in cannot be combined with -corpus\"))\n\t\t}\n\t\tproviders, providerErr := selectProviders(*providerList)\n\t\tif providerErr != nil {\n\t\t\tfatal(providerErr)\n\t\t}\n\t\treport, err = corpusReport(*corpusPath, *corpusFormat, cachebench.CorpusMetadata{\n\t\t\tName: *corpusName, License: *corpusLicense, Revision: *corpusRevision,\n\t\t}, cachebench.CorpusLimits{\n\t\t\tMaxRows: *corpusMaxRows, MaxSessions: *corpusMaxSess, MaxRetainedBytes: *corpusMaxBytes,\n\t\t}, providers, target, *traceOut)\n\t} else {\n\t\tscenario := cachebench.DefaultScenario()\n\t\tscenario.Turns = *turns","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cmd/cachebench/main.go#L37-L73","documentation":"Error \"cachebench: -trace-in required with -observations\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cmd/cachebench/main.go:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -trace-in together with -observations."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}