{"record":{"id":"eae55e20f4bac790","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-list-rows-w","errorCode":null,"errorMessage":"ccr typed object list rows: %w","messagePattern":"ccr typed object list rows: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":641,"sourceCode":"\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.\nfunc (s *Store) FindTaskDecision(decisionID string) (Object, error) {\n\tobj, err := scanObject(s.db.QueryRow(\n\t\t`SELECT `+objectColumns+` FROM typed_objects\n\t\t WHERE object_type = ? AND json_extract(CAST(data AS TEXT), '$.decision_id') = ?\n\t\t ORDER BY created_at DESC, object_id DESC LIMIT 1`,\n\t\tObjectTaskDecision, decisionID,\n\t))\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 task decision find: %w\", err)","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L623-L659","documentation":"Wraps rows.Err() after iterating typed-object rows in ListSessionObjects. The query started fine but the streaming read failed partway (I/O or driver error), so the listing cannot be trusted as complete.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:641 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for I/O or lock causes","Retry the listing","Verify database file health on persistent failures"],"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"}