{"record":{"id":"67a5d62304dd2101","repo":"JuliusBrussee/caveman","slug":"cachebench-verifier-returned-incomplete-or-mismat","errorCode":null,"errorMessage":"cachebench: verifier returned incomplete or mismatched evidence","messagePattern":"cachebench: verifier returned incomplete or mismatched evidence","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay.go","lineNumber":62,"sourceCode":"\tVerifier  string          `json:\"verifier\"`\n\tEvidence  json.RawMessage `json:\"evidence\"`\n}\n\n// ParseVerificationCommandOutput validates and binds external grader evidence.\nfunc ParseVerificationCommandOutput(raw []byte, requestID string) (TaskVerification, error) {\n\traw = bytes.TrimSpace(raw)\n\tif !validUniqueJSONObject(raw) {\n\t\treturn TaskVerification{}, errors.New(\"cachebench: verifier returned duplicate or invalid JSON\")\n\t}\n\tdecoder := json.NewDecoder(bytes.NewReader(raw))\n\tdecoder.DisallowUnknownFields()\n\tvar result VerificationCommandOutput\n\tif decoder.Decode(&result) != nil {\n\t\treturn TaskVerification{}, errors.New(\"cachebench: verifier returned invalid JSON\")\n\t}\n\tvar trailing any\n\tif 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\")) {\n\t\treturn TaskVerification{}, errors.New(\"cachebench: verifier returned incomplete or mismatched evidence\")\n\t}\n\treturn TaskVerification{Passed: result.Passed, Verifier: result.Verifier, Evidence: append([]byte(nil), raw...)}, nil\n}\n\n// ReplayLimits bounds paid population, schedule, and concurrency.\ntype ReplayLimits struct {\n\tMaxRequests             int\n\tMaxDeclaredBilledTokens int64\n\tMaxGap                  time.Duration\n\tMaxScheduleDrift        time.Duration\n\tMaxConcurrency          int\n\tRequireGroundedTiming   bool\n\tRequireProviderTokens   bool\n}\n\n// ReplayPreflight is zero-network validation and declared-budget summary.\ntype ReplayPreflight struct {\n\tRequests                          int      `json:\"requests\"`","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay.go#L44-L80","documentation":"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.","triggerScenarios":"Thrown at cacheengine/cachebench/replay.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Have the verifier echo the same request_id it received for the graded request","Set the schema field to the exact expected VerificationCommandOutput schema constant","Fill all required fields (verifier name, passed, evidence object) before emitting"],"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"}