Skip to content

Fix read-only SQLite database handling - #2712

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue1730-1798-1794
May 31, 2026
Merged

Fix read-only SQLite database handling#2712
Widthdom merged 3 commits into
mainfrom
fix-issue1730-1798-1794

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Added --read-only / --immutable query database opens via SQLite immutable read-only URIs.
  • Checkpoint WAL before read-only fallback and expose fallback/checkpoint diagnostics in status JSON.
  • Restrict POSIX database, WAL, and SHM files to 0600 and expose db_file_mode.

Validation

  • dotnet build
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedNameQueryCommandRunnerTests.RunStatus_ReadOnlyFlagOpensImmutableUriAndReportsModeFields|FullyQualifiedNameIndexCommandRunnerTests.Run_ReadOnlyFlag_ReturnsUsageError|FullyQualifiedNameDatabaseTests.DbContext_NewDatabaseRestrictsFileModeOnPosix|FullyQualifiedNameJsonOutputSnapshotTests.RunStatus_JsonOutput_MatchesGolden|FullyQualifiedName~CliFlagSchemaTests"
  • dotnet test was attempted, but existing Git commit signing configuration failed Git-based tests with an SSH signing-key passphrase error.

Documentation and changelog

  • Updated DEVELOPER_GUIDE.md.
  • Added changelog.d/unreleased/1730.added.md.
  • Added changelog.d/unreleased/1794.security.md.
  • Added changelog.d/unreleased/1798.fixed.md.

Follow-up candidates

Fixes #1730
Fixes #1798
Fixes #1794

@Widthdom
Widthdom merged commit c84da86 into main May 31, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue1730-1798-1794 branch May 31, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant