Skip to content

Fix database metadata and validation issues - #2666

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue2025-2026-1988-2037
May 25, 2026
Merged

Fix database metadata and validation issues#2666
Widthdom merged 2 commits into
mainfrom
fix-issue2025-2026-1988-2037

Conversation

@Widthdom

@Widthdom Widthdom commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make metadata writes best-effort when codeindex_meta is absent.
  • Add metadata policy stamping and safe pruning of known deprecated null keys while preserving unknown future stamps.
  • Re-check column existence after acquiring the migration write lock for standalone ALTER TABLE flows.
  • Validate query and batch --db inputs before opening readers on empty/wrong-schema SQLite files.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedNameSetMeta_MissingMetaTable|FullyQualifiedNameInitializeSchema_PrunesKnownDeprecatedNullMetaKeys|FullyQualifiedNameEnsureColumn_RechecksAfterImmediateLockBeforeAlter|FullyQualifiedNameTryMigrateForRead_ConcurrentLegacyMigrations|FullyQualifiedNameWithDb_EmptySqliteFileRejectedBeforeQuery|FullyQualifiedNameRunBatch_EmptySqliteFileRejectedBeforeQuery" -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • codex adversarial review: No blocking/actionable issues found.

Changelog

  • changelog.d/unreleased/1988.fixed.md
  • changelog.d/unreleased/2025.fixed.md
  • changelog.d/unreleased/2026.fixed.md
  • changelog.d/unreleased/2037.fixed.md

Follow-up candidates

  • None.

Fixes #1988
Fixes #2025
Fixes #2026
Fixes #2037

@Widthdom
Widthdom merged commit df591c9 into main May 25, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2025-2026-1988-2037 branch May 25, 2026 03:12
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