{"record":{"id":"2dcce783abbbf2f1","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-list-w","errorCode":null,"errorMessage":"ccr typed object list: %w","messagePattern":"ccr typed object list: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":629,"sourceCode":"\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}\n\tdefer rows.Close()\n\tobjects := make([]Object, 0)\n\tfor rows.Next() {\n\t\tobj, err := scanObject(rows)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"ccr typed object list scan: %w\", err)\n\t\t}\n\t\tobjects = append(objects, obj)\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"ccr typed object list rows: %w\", err)\n\t}\n\treturn objects, nil\n}\n\n// FindTaskDecision returns one Decision Ledger object by its stable decision\n// ID. Callers still validate the versioned decision schema before rendering it.","sourceCodeStart":611,"sourceCodeEnd":647,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L611-L647","documentation":"Wraps the typed_objects SELECT failure in Store.ListSessionObjects. The session listing query itself errored (lock, corruption, driver issue) as opposed to returning an empty list, which would be a normal result.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:629 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the underlying cause","Retry the listing after transient contention clears","Recreate the store if the table is corrupt"],"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-14T00:17:10.932Z"}