{"record":{"id":"3f4309e043c910b9","repo":"JuliusBrussee/caveman","slug":"ccr-unknown-object-type-q","errorCode":null,"errorMessage":"ccr: unknown object type %q","messagePattern":"ccr: unknown object type %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store.go","lineNumber":103,"sourceCode":"\tCurrentness        Currentness `json:\"currentness\"`\n\tLifecycle          Lifecycle   `json:\"lifecycle\"`\n\tDependencies       []string    `json:\"dependencies\"`\n\tOriginalByteLength int         `json:\"original_byte_length\"`\n\tStoredByteLength   int         `json:\"stored_byte_length\"`\n\tData               []byte      `json:\"data\"`\n}\n\nvar objectTypes = map[ObjectType]struct{}{\n\tObjectFileObservation: {}, ObjectSearchResult: {}, ObjectCommandResult: {},\n\tObjectTestResult: {}, ObjectBuildResult: {}, ObjectDiffSnapshot: {},\n\tObjectTaskContract: {}, ObjectTaskDecision: {}, ObjectExecutionState: {},\n\tObjectDocumentationExcerpt: {}, ObjectBrowserSnapshot: {},\n\tObjectRepositoryMap: {}, ObjectEvidenceBundle: {},\n}\n\nfunc prepareObject(obj Object) (Object, error) {\n\tif _, ok := objectTypes[obj.Type]; !ok {\n\t\treturn Object{}, fmt.Errorf(\"ccr: unknown object type %q\", obj.Type)\n\t}\n\tif strings.TrimSpace(obj.SessionID) == \"\" {\n\t\treturn Object{}, errors.New(\"ccr: typed object session_id is required\")\n\t}\n\tif obj.Currentness == \"\" {\n\t\tobj.Currentness = Current\n\t}\n\tif obj.Currentness != Current && obj.Currentness != Stale && obj.Currentness != Archived {\n\t\treturn Object{}, fmt.Errorf(\"ccr: unknown currentness %q\", obj.Currentness)\n\t}\n\tif obj.Lifecycle == \"\" {\n\t\tobj.Lifecycle = Hot\n\t}\n\tif obj.Lifecycle != Hot && obj.Lifecycle != Warm && obj.Lifecycle != Cold && obj.Lifecycle != LifecycleArchived {\n\t\treturn Object{}, fmt.Errorf(\"ccr: unknown lifecycle %q\", obj.Lifecycle)\n\t}\n\tif obj.CreatedAt.IsZero() {\n\t\tobj.CreatedAt = time.Now().UTC()","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/engine/ccr/store.go#L85-L121","documentation":"Error \"ccr: unknown object type %q\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at engine/ccr/store.go:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a known ccr object type."],"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-15T17:31:12.345Z"}