sqlQueryTool (execute_sql) was listed in BUILTIN_TOOL_CATALOG and
available in the CLI AGENT_TOOL_REGISTRY, but was never imported or
registered in the Electron-specific TOOL_REGISTRY. Users who enabled
the tool via the assistant config panel would trigger a missing-tool
error at inference time.
Add sqlQueryTool to the Electron registry following the same
adaptSharedTool pattern used by all other analysis tools. Add a
catalog/registry drift guard test (name + category) covering all
BUILTIN_TOOL_CATALOG entries, enabled via
--experimental-test-module-mocks to mock Electron runtime deps.
Document the general-over-specific assertion rule in AGENTS.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
thinkingLevels was excluded from the mergeDefaults whitelist in
PreferencesManager, so user choices were silently dropped on every
save/load cycle and never written to preferences.json.
Add the field to the Preferences interface, DEFAULTS, and mergeDefaults
so the existing backendPersist → savePreferences pipeline can write and
restore it correctly. Adds regression tests covering the save/load
round-trip, multi-save merge, and legacy-file backward compatibility.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MCP server checks the gate at startup and exits before opening stdio if
the data directory requires a newer runtime. Desktop HTTP API maps
DataDirCompatibilityError (including wrapped causes) to a 409 response
so the renderer can surface a clear upgrade prompt.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Harden the startup migration path: fail fast and show an error dialog if
schema migration cannot complete. Repair the gate retroactively for
databases that were already migrated before the gate system existed.
Raise the gate after every import path (full import, incremental import,
stream import) and after opening any database that already carries a
current-segment schema. Centralise gate-raising inside DatabaseManager so
call sites cannot accidentally skip it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use the packaged app version (not Electron's dev-mode 0.0.0) across all
compatibility checks. Make DatabaseManager require a RuntimeIdentity so
every gate write carries a verified version and kind.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>