{"record":{"id":"3802b3674fe60938","repo":"earendil-works/pi","slug":"storage-3802b3","errorCode":"storage","errorMessage":"Lane ${lane} points at missing open operation ${laneRow.open_operation_id}","messagePattern":"Lane (.+?) points at missing open operation (.+?)","errorType":"exception","errorClass":"SessionError","httpStatus":null,"severity":"error","filePath":"packages/session-backends/sqlite-node/src/sqlite/storage/records.ts","lineNumber":89,"sourceCode":"}\n\nexport function readOpenOperationRows(\n\tdb: SqliteDatabase,\n\tsessionId: string,\n\tlane: string,\n\t_options: { limit?: number } = {},\n): RecordRow[] {\n\tconst laneRow = sql`SELECT open_operation_id FROM lanes WHERE session_id = ${sessionId} AND lane = ${lane}`.get<{\n\t\topen_operation_id: string | null;\n\t}>(db);\n\tif (!laneRow?.open_operation_id) return [];\n\n\tconst record = sql`SELECT session_id, seq, id, lane, run_id, type, op_kind, timestamp, payload\n\t\tFROM records\n\t\tWHERE session_id = ${sessionId}\n\t\t\tAND id = ${laneRow.open_operation_id}`.get<RecordRow>(db);\n\tif (!record) {\n\t\tthrow new SessionError(\"storage\", `Lane ${lane} points at missing open operation ${laneRow.open_operation_id}`);\n\t}\n\tif (record.lane !== lane || record.type !== \"operation_started\") {\n\t\tthrow new SessionError(\"storage\", `Lane ${lane} points at invalid open operation ${laneRow.open_operation_id}`);\n\t}\n\treturn [record];\n}\n","sourceCodeStart":71,"sourceCodeEnd":96,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/session-backends/sqlite-node/src/sqlite/storage/records.ts#L71-L96","documentation":"Error \"Lane ${lane} points at missing open operation ${laneRow.open_operation_id}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/session-backends/sqlite-node/src/sqlite/storage/records.ts:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The lane's open operation row is missing; the database is inconsistent, repair or recreate it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}