JuliusBrussee/caveman · error

quality runner is required

Error message

quality runner is required

What it means

Raised by RunManifestWithQuality (and RunManifestWithSystem with quality opts): QualityOptions.Runner is nil. The LLM-in-the-loop quality layer cannot run without an injected model runner, so the harness fails closed instead of silently skipping quality grading.

Solutions

  1. Provide a QualityOptions with a non-nil Runner (a gateway client or the deterministic AnswerKeyModel for smoke tests)
  2. Drop the quality layer entirely by using RunManifest without quality options
  3. In CI, inject the deterministic local runner; in release jobs, the real gateway runner
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at engine/evals/harness.go:190 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/dbd6b235205d16ea. Report an issue: GitHub.

Appendix: source

Thrown at engine/evals/harness.go:190

// ReadEmbeddedFixture reads one built-in fixture file.
func ReadEmbeddedFixture(name string) ([]byte, error) {
	return fixturesFS.ReadFile("fixtures/" + name)
}

// RunManifest replays an arbitrary manifest, reading fixture files via read.
// It is exported so tests can seed a deliberately-failing manifest and assert
// the gate fails closed.
func RunManifest(m Manifest, read func(name string) ([]byte, error)) (Report, error) {
	return runManifest(context.Background(), m, read, nil)
}

// RunManifestWithQuality is RunManifest plus the LLM-in-the-loop quality layer.
// The runner is injected so CI can use a deterministic local runner while release
// jobs can call a real gateway/model.
func RunManifestWithQuality(ctx context.Context, m Manifest, read func(name string) ([]byte, error), opts QualityOptions) (Report, error) {
	if opts.Runner == nil {
		return Report{}, fmt.Errorf("quality runner is required")
	}
	return runManifest(ctx, m, read, &opts)
}

// RunManifestWithSystem runs a caller-supplied system-under-test through the
// same graders and optional quality layer as the built-in engine.
func RunManifestWithSystem(ctx context.Context, m Manifest, read func(name string) ([]byte, error), system TransformRunner, opts *QualityOptions) (Report, error) {
	if system == nil {
		return Report{}, fmt.Errorf("system runner is required")
	}
	if opts != nil && opts.Runner == nil {
		return Report{}, fmt.Errorf("quality runner is required")
	}
	return runManifestWithSystem(ctx, m, read, system, opts)
}

func runManifest(ctx context.Context, m Manifest, read func(name string) ([]byte, error), quality *QualityOptions) (Report, error) {
	store, err := ccr.OpenMemory()

View on GitHub (pinned to 766dce6b13)