{"record":{"id":"f703450b05b23988","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-lifecycle-w","errorCode":null,"errorMessage":"ccr typed object lifecycle: %w","messagePattern":"ccr typed object lifecycle: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":608,"sourceCode":"\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)\n\t}\n\tn, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object lifecycle rows: %w\", err)\n\t}\n\tif n == 0 {\n\t\treturn ErrNotFound\n\t}\n\treturn nil\n}\n\nfunc (s *Store) ListSessionObjects(sessionID string, limit int) ([]Object, error) {\n\tif limit <= 0 {\n\t\tlimit = 100\n\t}\n\tif limit > 10000 {\n\t\tlimit = 10000\n\t}","sourceCodeStart":590,"sourceCodeEnd":626,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L590-L626","documentation":"Wraps the UPDATE failure in SetObjectLifecycle. The lifecycle value is validated before the write, so this fires on driver-level failure — lock, full disk, or corruption — while transitioning an object's retention state.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:608 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped driver error","Retry the lifecycle transition later","Free storage budget or resolve competing writers"],"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"}