{"record":{"id":"c761caf92e8fefd0","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-lifecycle-rows-w","errorCode":null,"errorMessage":"ccr typed object lifecycle rows: %w","messagePattern":"ccr typed object lifecycle rows: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":612,"sourceCode":"\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}\n\trows, err := s.db.Query(`SELECT `+objectColumns+` FROM typed_objects WHERE session_id = ? ORDER BY created_at DESC, object_id DESC LIMIT ?`, sessionID, limit)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"ccr typed object list: %w\", err)\n\t}","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L594-L630","documentation":"Wraps the RowsAffected read after the lifecycle UPDATE in SetObjectLifecycle. The effect count could not be read, so whether the object exists and was transitioned is unknown and the operation fails closed.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:612 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped driver error","Retry the idempotent transition","Confirm the object id exists with GetObject first"],"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"}