You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Node SQLite's actual readOnly option rather than the silently ignored readonly spelling for usage and credential-metadata databases.
Centralize database opening in a small tested helper. Existing queries remain read-only; the connection now enforces that boundary too.
Add real SQLite regression tests proving reads succeed, writes fail, and a missing database is not created.
Prepare patch version 2.5.1; no credentials or real user databases were accessed.
Verification
56 backend tests passed, including both new real-SQLite checks. Automated assistant-run checks, not human testing.
AI-assisted by dot (OpenAI). The runtime does not expose the exact underlying model ID. Publication follows the owner's task-specific exception and authorization to fix Studio QA issues.
No actionable comments were generated in the recent review.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 8607ed15-f587-4c4d-a0f0-a528bba2d26a
Commits
Reviewing files that changed from the base of the PR and between 91fc9d3 and 0615f60.
Files ignored due to path filters: 1
server/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 7
CHANGELOG.md
package.json
server/index.js
server/lib/native-credentials.js
server/lib/read-only-database.js
server/lib/read-only-database.test.js
server/package.json
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
The PR uses Node SQLite’s supported readOnly option for usage and credential-metadata databases, preventing writes and creation of missing database files.
The shared helper applies the option at both call sites; credential metadata reads remain limited to non-secret fields.
A real-SQLite regression test checks reads, rejected writes, and no file creation when the database is missing.
Test-run results and review findings were not provided.
Walkthrough
The change adds openReadOnlyDatabase, which opens SQLite databases with readOnly: true. Usage and credential database reads now use this helper. A regression test checks read access, rejected writes, and failure to create a missing database. The changelog and package versions are updated to 2.5.1.
Priority: Normal
Merge Risk: Minimal · up to 0615f
The read-only database change is ready to merge after normal checks; no blocking issue is established.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
@coderabbitai review
Please review the read-only SQLite boundary fix and regression coverage. Node's DatabaseSync uses readOnly, not readonly; both callers now share the correctly configured helper. Exact-head regression CI passed. Tests use synthetic databases only.
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
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
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
readOnlyoption rather than the silently ignoredreadonlyspelling for usage and credential-metadata databases.Verification
56 backend tests passed, including both new real-SQLite checks. Automated assistant-run checks, not human testing.
AI-assisted by dot (OpenAI). The runtime does not expose the exact underlying model ID. Publication follows the owner's task-specific exception and authorization to fix Studio QA issues.