{"record":{"id":"7c56f9f4a5b9e8df","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-currentness-w","errorCode":null,"errorMessage":"ccr typed object currentness: %w","messagePattern":"ccr typed object currentness: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":590,"sourceCode":"\nfunc (s *Store) GetObject(id string) (Object, error) {\n\tobj, err := scanObject(s.db.QueryRow(`SELECT `+objectColumns+` FROM typed_objects WHERE object_id = ?`, id))\n\tif errors.Is(err, sql.ErrNoRows) {\n\t\treturn Object{}, ErrNotFound\n\t}\n\tif err != nil {\n\t\treturn Object{}, fmt.Errorf(\"ccr typed object get: %w\", err)\n\t}\n\treturn obj, nil\n}\n\nfunc (s *Store) SetObjectCurrentness(id string, currentness Currentness) error {\n\tif err := validateCurrentness(currentness); err != nil {\n\t\treturn err\n\t}\n\tresult, err := s.db.Exec(`UPDATE typed_objects SET currentness = ? WHERE object_id = ?`, currentness, id)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness: %w\", err)\n\t}\n\tn, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness rows: %w\", err)\n\t}\n\tif n == 0 {\n\t\treturn ErrNotFound\n\t}\n\treturn nil\n}\n\nfunc (s *Store) SetObjectLifecycle(id string, lifecycle Lifecycle) error {\n\tif err := validateLifecycle(lifecycle); err != nil {\n\t\treturn err\n\t}\n\tresult, err := s.db.Exec(`UPDATE typed_objects SET lifecycle = ? WHERE object_id = ?`, lifecycle, id)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object lifecycle: %w\", err)","sourceCodeStart":572,"sourceCodeEnd":608,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L572-L608","documentation":"Wrap in Store.SetObjectCurrentness: the UPDATE setting a typed object's currentness failed. The wrapped error is the SQLite failure; the id/currentness arguments may be fine while the store is locked or corrupt.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:590 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped driver error","Retry the update after the lock clears","Free storage budget if the disk is full"],"exampleFix":null,"handlingStrategy":"try-catch","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-14T05:17:10.506Z"}