JuliusBrussee/caveman · error

cachebench: -observations and -corpus are mutually exclusive

Error message

cachebench: -observations and -corpus are mutually exclusive

What it means

Error "cachebench: -observations and -corpus are mutually exclusive" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cmd/cachebench/main.go:51

		traceIn         = flag.String("trace-in", "", "request trace JSONL required with -observations")
		traceOut        = flag.String("trace-out", "", "write generated provider request trace as JSONL")
		corpusPath      = flag.String("corpus", "", "LMCache agent corpus file, or - for stdin")
		corpusFormat    = flag.String("corpus-format", cachebench.CorpusFormatLMCacheJSONL, "lmcache-jsonl or hf-rows")
		corpusName      = flag.String("corpus-name", "lmcache-agentic-traces", "corpus name recorded in report")
		corpusLicense   = flag.String("corpus-license", "", "corpus license recorded in report")
		corpusRevision  = flag.String("corpus-revision", "", "immutable corpus revision recorded in report")
		corpusMaxRows   = flag.Int("corpus-max-rows", 100000, "fail closed above this many corpus rows")
		corpusMaxSess   = flag.Int("corpus-max-sessions", 10000, "fail closed above this many corpus sessions")
		corpusMaxBytes  = flag.Int64("corpus-max-bytes", 1<<30, "fail closed above this many retained corpus bytes")
	)
	flag.Parse()
	target := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minRequests}
	var (
		report cachebench.Report
		err    error
	)
	if *observations != "" && *corpusPath != "" {
		fatal(fmt.Errorf("cachebench: -observations and -corpus are mutually exclusive"))
	}
	if *observations != "" {
		if *traceIn == "" {
			fatal(fmt.Errorf("cachebench: -trace-in required with -observations"))
		}
		report, err = observedReport(*observations, *traceIn, target)
	} else if *corpusPath != "" {
		if *traceIn != "" {
			fatal(fmt.Errorf("cachebench: -trace-in cannot be combined with -corpus"))
		}
		providers, providerErr := selectProviders(*providerList)
		if providerErr != nil {
			fatal(providerErr)
		}
		report, err = corpusReport(*corpusPath, *corpusFormat, cachebench.CorpusMetadata{
			Name: *corpusName, License: *corpusLicense, Revision: *corpusRevision,
		}, cachebench.CorpusLimits{
			MaxRows: *corpusMaxRows, MaxSessions: *corpusMaxSess, MaxRetainedBytes: *corpusMaxBytes,

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Pass either -observations or -corpus, not both.

When it happens

Trigger: Thrown at cacheengine/cmd/cachebench/main.go:51 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/e34fc58acbb2f5da. Report an issue: GitHub.