SQLite best practices for Go — WAL mode, foreign_keys, busy_timeout, SetMaxOpenConns, context-aware queries, transactions, migrations
98
99%
Does it follow best practices?
Impact
97%
2.36xAverage score across 5 eval scenarios
Passed
No known issues
A small team needs a lightweight background task queue implemented in Go with SQLite as the backing store. This replaces Redis/RabbitMQ for a low-traffic internal tool. The service runs as an HTTP server that accepts tasks and processes them in the background.
The service needs to support:
Each task has: id, task_type, payload (JSON text), priority, status, attempts, max_attempts, error_message, created_at, updated_at, completed_at.
The claim operation is critical -- it must atomically find the highest-priority pending task and mark it as processing in a single transaction to prevent race conditions.
Produce:
main.go -- HTTP server with routesdb.go -- Database connection and migrationsqueue.go -- Task queue operations (submit, claim, complete, fail, retry, list)handlers.go -- HTTP handlersgo.mod -- Module fileThe code should be complete Go with no placeholders or TODO comments.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
sqlite-go-best-practices
verifiers