JuliusBrussee/caveman · error

cachebench: verifier returned incomplete or mismatched…

Error message

cachebench: verifier returned incomplete or mismatched evidence

What it means

Raised in ParseVerificationCommandOutput after a successful decode: the bound fields are inconsistent with expectations — e.g. schema constant mismatch or the request_id differing from the requestID argument. The verifier must echo back the exact request it graded; mismatched or partial evidence is rejected to prevent cross-request attribution errors.

Solutions

  1. Have the verifier echo the same request_id it received for the graded request
  2. Set the schema field to the exact expected VerificationCommandOutput schema constant
  3. Fill all required fields (verifier name, passed, evidence object) before emitting
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cacheengine/cachebench/replay.go:62 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/67a5d62304dd2101. Report an issue: GitHub.

Appendix: source

Thrown at cacheengine/cachebench/replay.go:62

	Verifier  string          `json:"verifier"`
	Evidence  json.RawMessage `json:"evidence"`
}

// ParseVerificationCommandOutput validates and binds external grader evidence.
func ParseVerificationCommandOutput(raw []byte, requestID string) (TaskVerification, error) {
	raw = bytes.TrimSpace(raw)
	if !validUniqueJSONObject(raw) {
		return TaskVerification{}, errors.New("cachebench: verifier returned duplicate or invalid JSON")
	}
	decoder := json.NewDecoder(bytes.NewReader(raw))
	decoder.DisallowUnknownFields()
	var result VerificationCommandOutput
	if decoder.Decode(&result) != nil {
		return TaskVerification{}, errors.New("cachebench: verifier returned invalid JSON")
	}
	var trailing any
	if decoder.Decode(&trailing) != io.EOF || result.Schema != VerificationSchema || result.RequestID != requestID || !validBoundedText(result.Verifier, 256, false) || len(result.Evidence) == 0 || !json.Valid(result.Evidence) || bytes.Equal(bytes.TrimSpace(result.Evidence), []byte("null")) {
		return TaskVerification{}, errors.New("cachebench: verifier returned incomplete or mismatched evidence")
	}
	return TaskVerification{Passed: result.Passed, Verifier: result.Verifier, Evidence: append([]byte(nil), raw...)}, nil
}

// ReplayLimits bounds paid population, schedule, and concurrency.
type ReplayLimits struct {
	MaxRequests             int
	MaxDeclaredBilledTokens int64
	MaxGap                  time.Duration
	MaxScheduleDrift        time.Duration
	MaxConcurrency          int
	RequireGroundedTiming   bool
	RequireProviderTokens   bool
}

// ReplayPreflight is zero-network validation and declared-budget summary.
type ReplayPreflight struct {
	Requests                          int      `json:"requests"`

View on GitHub (pinned to 766dce6b13)