Skip to content

Stabilize SQLite policy audits and maintenance JSON - #4366

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue4302-4338
Jul 7, 2026
Merged

Stabilize SQLite policy audits and maintenance JSON#4366
Widthdom merged 2 commits into
mainfrom
fix-issue4302-4338

Conversation

@Widthdom

@Widthdom Widthdom commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add info-level positive-evidence queries to sqlite-query-policy-surfaces for shared command creation, typed parameter helpers, identifier quoting, and PRAGMA helper usage.
  • Return a structured E008_DB_ERROR JSON envelope for early corrupt SQLite DB failures in status --json while preserving existing stderr behavior after a DB is query-ready.
  • Add wal_checkpoint_timing_note to real vacuum --json output and document the WAL checkpoint timing caveat in the English and Japanese developer guide sections.

Validation

  • dotnet build CodeIndex.sln -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunSearch_ListRecipesJsonIncludesBuiltInAuditMetadata_Issue3144|FullyQualifiedName~RunSearch_BuiltInRecipeSnapshotCoversNamesScopesAndQueries_Issue3692" -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunDefinition_CountOnlyOnReadOnlyDbMissingChunks_FailsLikeDefinition|FullyQualifiedName~RunStatus_CorruptDbJsonReturnsStructuredError_Issue4338|FullyQualifiedName~RunVacuum_JsonExplainsWalCheckpointTiming_Issue4338|FullyQualifiedName~WithDb_OpenFailureBranchesSanitizeExceptionMessages_Issue4124" -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -f net8.0 -p:UseSharedCompilation=false
  • Combined net8/net9 full test run completed with net9 passing; net8 hit a transient ReleaseWorkflow_DockerEntrypointDropsRootToRequestedUidGid timeout, and the net8-only rerun above passed.
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search --recipe sqlite-query-policy-surfaces --format count --summary-only --json --limit 5

Documentation And Changelog

  • Updated DEVELOPER_GUIDE.md in both English and Japanese sections for the vacuum --json WAL timing note.
  • Added changelog.d/unreleased/4302.fixed.md.
  • Added changelog.d/unreleased/4338.fixed.md.

Review

  • Ran adversarial review locally after implementation; the only issue found was over-broad JSON formatting for post-open query DB errors, which was narrowed and covered by the existing regression test.

Follow-Ups

  • None.

Fixes #4302
Fixes #4338

@Widthdom
Widthdom merged commit b82a32d into main Jul 7, 2026
9 checks passed
@Widthdom
Widthdom deleted the fix-issue4302-4338 branch July 7, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit SQLite maintenance, migration, WAL, and prune boundaries Audit SQLite command, migration, PRAGMA, and metadata contract surfaces

1 participant