{"record":{"id":"cfdb761f3ec971bd","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-dependencies-w","errorCode":null,"errorMessage":"ccr typed object dependencies: %w","messagePattern":"ccr typed object dependencies: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":499,"sourceCode":"\tcase errors.Is(err, sql.ErrNoRows):\n\t\treturn nil, ErrNotFound\n\tcase err != nil:\n\t\treturn nil, fmt.Errorf(\"ccr metadata get: %w\", err)\n\t}\n\treturn metadata, nil\n}\n\n// PutObject stores one immutable typed working-memory object. Repeated puts of\n// the same content-derived ID are idempotent; currentness changes use\n// SetObjectCurrentness so invalidation stays explicit.\nfunc (s *Store) PutObject(input Object) (string, error) {\n\tobj, err := prepareObject(input)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdeps, err := json.Marshal(obj.Dependencies)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"ccr typed object dependencies: %w\", err)\n\t}\n\tused, err := s.storageBytes()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"ccr typed object budget: %w\", err)\n\t}\n\tvar existingBytes int64\n\terr = s.db.QueryRow(`SELECT length(data)+length(dependencies_json) FROM typed_objects WHERE object_id=?`, obj.ID).Scan(&existingBytes)\n\tif errors.Is(err, sql.ErrNoRows) {\n\t\texistingBytes = 0\n\t} else if err != nil {\n\t\treturn \"\", fmt.Errorf(\"ccr typed object budget: %w\", err)\n\t}\n\tif used-existingBytes+int64(len(obj.Data)+len(deps)) > s.maxBytes {\n\t\treturn \"\", fmt.Errorf(\"ccr typed object put: %w\", ErrBudgetExceeded)\n\t}\n\tresult, err := s.db.Exec(\n\t\t`INSERT INTO typed_objects (\n\t\t object_id, object_type, content_hash, source, created_at, repository_state,","sourceCodeStart":481,"sourceCodeEnd":517,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/engine/ccr/store_sqlite.go#L481-L517","documentation":"Error \"ccr typed object dependencies: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:499 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the typed object dependency error and retry."],"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"}