Fix: Prevent SQLite ENOENT/SIGSEGV, auto-create dirs, automate GitHub Releases#16
Merged
cto-new[bot] merged 1 commit intoNov 4, 2025
Conversation
…irs, automate releases Fixes segfaults caused by ENOENT errors during SQLite file operations by ensuring database directories exist before opening, disabling mmap to prevent crashes when db files are missing, and enabling WAL mode with a 5s busy timeout for concurrency. Also auto-creates the upload directory on startup for file uploads, logs errors if creation fails, and updates .gitignore for WAL/shm files. CI workflow now automatically creates GitHub Releases and artifacts on tag push. This improves reliability (no more memory errors if db/upload directory absent), concurrency, and streamlines the release process. No migration is necessary for existing databases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a critical segmentation fault caused by ENOENT errors in SQLite, improves database and upload reliability, and automates release creation for tagged versions.
Details
PRAGMA mmap_size=0), avoiding segfaults when db files go missing.gitignoreto ignore SQLite WAL/shm filesWarning: Task VM test is not passing, cto.new will perform much better if you fix the setup