{"record":{"id":"ee4c539bb44b80f1","repo":"JuliusBrussee/caveman","slug":"cachebench-observation-d-missing-provider-or-qua","errorCode":null,"errorMessage":"cachebench: observation %d missing provider or quality evidence provenance","messagePattern":"cachebench: observation (.+?) missing provider or quality evidence provenance","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/observed.go","lineNumber":204,"sourceCode":"\t\t\"provider counters prove reads and writes only for supplied records; evaluator binds but does not inspect retained response artifacts\",\n\t\t\"quality_passed is supplied by external task verifier; evaluator binds but does not inspect retained grader artifacts\",\n\t\t\"report does not prove omitted requests, tail completeness, production prevalence, invoice spend, or verified savings\",\n\t}\n\treturn report, nil\n}\n\nfunc validateObservationRecords(records []ObservationRecord) error {\n\tseen := make(map[string]bool, len(records))\n\tfor index, record := range records {\n\t\tif record.Schema != ObservationSchema && record.Schema != ObservationSchemaV2 {\n\t\t\treturn fmt.Errorf(\"cachebench: observation %d schema %q\", index, record.Schema)\n\t\t}\n\t\tif !validBoundedText(record.RequestID, 512, false) || seen[record.RequestID] {\n\t\t\treturn fmt.Errorf(\"cachebench: observation %d empty or duplicate request_id\", index)\n\t\t}\n\t\tseen[record.RequestID] = true\n\t\tif !validBoundedText(record.Provider, 64, false) || !validBoundedText(record.Epoch, 1024, false) || !validBoundedText(record.QualityVerifier, 256, false) || !validBoundedText(record.ProfileID, 256, true) || !validBoundedText(record.EngineReason, 1024, true) || !validEvidenceSHA256(record.ProviderEvidenceSHA256) || !validEvidenceSHA256(record.QualityEvidenceSHA256) {\n\t\t\treturn fmt.Errorf(\"cachebench: observation %d missing provider or quality evidence provenance\", index)\n\t\t}\n\t\tif record.RequestBodySHA256 != \"\" && !validSHA256(record.RequestBodySHA256) {\n\t\t\treturn fmt.Errorf(\"cachebench: observation %d has invalid request body digest\", index)\n\t\t}\n\t\toptimizerIDs := map[string]bool{}\n\t\tfor _, optimizerID := range record.OptimizerIDs {\n\t\t\tif !validBoundedText(optimizerID, 256, false) || optimizerIDs[optimizerID] {\n\t\t\t\treturn fmt.Errorf(\"cachebench: observation %d has invalid optimizer identity\", index)\n\t\t\t}\n\t\t\toptimizerIDs[optimizerID] = true\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validSHA256(value string) bool {\n\treturn len(value) == 64 && strings.Trim(value, \"0123456789abcdef\") == \"\"\n}","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cachebench/observed.go#L186-L222","documentation":"Error \"cachebench: observation %d missing provider or quality evidence provenance\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cachebench/observed.go:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include provider or quality evidence provenance in the observation."],"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"}