{"agent":"claude","input":"An alert fired for this GORM and SQLite application: requests are failing with the error database is locked. The alert payload follows this prompt. Read go.mod, common/database.go, every use of Begin and Transaction, and every function that writes, first. The SQLite driver needs cgo, so make sure a C compiler is installed. Reproduce the error before changing anything: write a test that opens a database exactly as the application does and runs concurrent goroutines, once where each issues a single write and once where each reads and then writes inside one transaction. Record which shape fails, how quickly, and with what error. Then test each candidate fix separately with the same test and report the result of each: a busy timeout, WAL journal mode, immediate transaction locking, and limiting the pool to one open connection. Before recommending a pool limit, check whether any code path opens a transaction and then uses the package-level database handle inside it, and say what would happen to that path. Apply the fix that removes the failures without breaking any path, in the one place the connection is opened, for both the main and the test database. Clean up any extra files the new journal mode creates in tests and ignore them in git. Keep the concurrent test in the suite. Name the code path that matches the alert, or say that none in the repository does and what kind of change would introduce one. Run go test ./... and scripts/gofmt.sh and open a pull request with the reproduction output before and after and the result of every candidate you tried.","resources":[{"url":"https://github.com/your-org/your-app"}]}