Join our community: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
backend/src/lib/indexer-state.ts creates the singleton indexer_state row on first access; if the worker and an admin reset endpoint both start cold at the same time, two concurrent inserts can race on the same conceptual singleton before the unique constraint kicks in, and the failure path is not handled gracefully.
Acceptance criteria
Files to touch
backend/src/lib/indexer-state.ts
Out of scope
Does not change the indexer_state schema.
Why this matters
backend/src/lib/indexer-state.ts creates the singleton indexer_state row on first access; if the worker and an admin reset endpoint both start cold at the same time, two concurrent inserts can race on the same conceptual singleton before the unique constraint kicks in, and the failure path is not handled gracefully.
Acceptance criteria
Files to touch
backend/src/lib/indexer-state.tsOut of scope
Does not change the indexer_state schema.