Show the writer-blocked state in index_freshness / project_overview #304

Open
opened 2026-09-26 17:03:22 +02:00 by buildagent · 0 comments
Member

Follow-up from v0.32.2 (PR #303).

Current behaviour: when another process holds the SQLite write lock, the daemon writer now backs off (BEGIN IMMEDIATE, 25 ms→1 s) and writes a line to daemon.log. Nothing is shown in a tool reply. An agent that sees stale answers cannot tell "writer is blocked by another process" from "still indexing".

Wanted: index_freshness and project_overview carry a writer_blocked field that says since when the writer has been blocked and names the lock holder where it is known. The render in server.rs is the missing piece.

Test: hold a write lock on index.db from a second connection, then assert the field is present. Mutation: remove the render and the test fails.

Follow-up from v0.32.2 (PR #303). **Current behaviour:** when another process holds the SQLite write lock, the daemon writer now backs off (`BEGIN IMMEDIATE`, 25 ms→1 s) and writes a line to `daemon.log`. Nothing is shown in a tool reply. An agent that sees stale answers cannot tell "writer is blocked by another process" from "still indexing". **Wanted:** `index_freshness` and `project_overview` carry a `writer_blocked` field that says since when the writer has been blocked and names the lock holder where it is known. The render in `server.rs` is the missing piece. **Test:** hold a write lock on `index.db` from a second connection, then assert the field is present. Mutation: remove the render and the test fails.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#304
No description provided.