Skip to content

Normalize maintenance database error handling - #4949

Merged
Widthdom merged 6 commits into
mainfrom
fix-issue4856
Jul 28, 2026
Merged

Normalize maintenance database error handling#4949
Widthdom merged 6 commits into
mainfrom
fix-issue4856

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • unify vacuum, backfill-fold, optimize / index --optimize, and db integrity failures behind a versioned maintenance database classifier
  • classify SQLite primary result codes and validation failures without depending on exception wording
  • redact absolute paths and file URIs as a whole by default, preserve caller-spelled relative paths, and keep --show-paths as the explicit diagnostic opt-in
  • preserve structured newer-schema, retry-exhausted lock, inaccessible-target, and optimize lock-holder diagnostics
  • keep human and JSON recovery guidance specific to the actual failure category

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false (0 warnings, 0 errors)
  • focused Issue Normalize maintenance error classification, redaction, and recovery hints #4856 and lock regression tests on .NET 8 / .NET 9: 25 passed per target framework
  • related maintenance regression tests on .NET 8 / .NET 9: 52 passed, 1 environment-dependent trimmed-publish test skipped per target framework
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore --verbosity minimal
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check
  • local cdidx status --check --json: index_matches_workspace: true
  • full Release suite was also exercised before final focused validation; each target framework hit one unrelated intermittent failure, and both isolated failing tests passed when rerun

Adversarial review

Two Codex adversarial-review rounds were completed. Actionable findings around newer-schema and retry-exhausted lock preservation, whole-path redaction, index --optimize preamble leakage, inaccessible preflight targets, relative-path spelling, and lock-holder details were addressed with regression coverage.

Documentation and changelog

  • updated the English and Japanese maintenance-error sections in USER_GUIDE.md
  • updated the English and Japanese coverage notes in TESTING_GUIDE.md
  • updated DEVELOPER_GUIDE.md
  • added changelog.d/unreleased/4856.fixed.md

Related: #1526, #4338

Fixes #4856

@Widthdom
Widthdom marked this pull request as ready for review July 28, 2026 09:55
@Widthdom
Widthdom merged commit b56ddbb into main Jul 28, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4856 branch July 28, 2026 09:59
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.

Normalize maintenance error classification, redaction, and recovery hints

1 participant