65d5e9de830a3888a3549c495c9032e3485e799e
nextGlobalSequence()/nextSessionSequence() computed MAX+1 with two extra SELECT round-trips, guarded only by an in-process mutex — two processes on the same correx.db (CLI + server) could read the same MAX and collide on the unique index. Compute both the global sequence and session_sequence as MAX+1 subqueries inside the INSERT and RETURNING the assigned values. SQLite serializes writers, so the subqueries are atomic across processes; the unique index is the backstop. Also removes the two pre-SELECTs per append.
fix: workflow inference chain — surface llama-server errors, user-turn-last, bundle-relative prompts
Description
No description provided
Languages
Kotlin
88.4%
Go
11.4%
Python
0.2%