Skip to content

fix(mcp): import cc-switch servers without sqlite3 - #14069

Merged
esengine merged 2 commits into
esengine:studiofrom
pei711:fix/mcp-import-sqlite-14053
Oct 21, 2026
Merged

esengine merged 2 commits into
esengine:studiofrom
pei711:fix/mcp-import-sqlite-14053

Conversation

@pei711

@pei711 pei711 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Read cc-switch MCP entries with the bundled SQLite driver in read-only mode, removing the external sqlite3 requirement.

Cause

The importer invoked the sqlite3 executable for schema inspection and row reads, but stock Windows installs do not include it.

Blast radius

This changes SQLite-backed cc-switch MCP imports; the legacy JSON fallback remains in place.

Neighbouring behaviours tested

Tests cover the Reasonix-specific enablement column, legacy Codex fallback, empty database handling, and Windows drive-path DSN encoding. The database fixtures now use the bundled driver.

Why this layer

internal/contract/config owns cc-switch config decoding and already depends on the pure-Go SQLite driver through the module.

Issues

Fixes #14053

Verification

  • go test ./internal/contract/config — passed without a sqlite3 executable installed.
  • go vet ./internal/contract/config — passed.
  • git diff --check — passed.
  • go test ./... — unrelated failures in internal/state/trustedstate and internal/state/memory; filesystem-related trustedstate failures reproduce on clean baseline HEAD, and the memory ordering test passes in isolated baseline runs.

Disclosure

  • AI assistance was used for this change.

@pei711
pei711 requested a review from esengine as a code owner October 21, 2026 04:49
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-21T04:49:40.078065Z f46f6fa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the config Configuration & setup (internal/config) label Oct 21, 2026
esengine
esengine previously approved these changes Oct 21, 2026

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: the bundled modernc driver is already a dependency, the read-only DSN keeps the old sqlite3 -readonly semantics, the schema probe and row read are equivalent to the old two commands, and the Windows drive-path DSN has its own test. I also ran the cc-switch tests on this head locally. Approving; merge after the checks are green.

@github-actions github-actions Bot added the desktop Wails desktop app (desktop/**) label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The checks on this head fail for one reason, and it is ours to fix before merging: the nested desktop/ module compiles reasonix/internal/contract/config, which now imports modernc.org/sqlite, but desktop/go.mod and desktop/go.sum do not carry it. Every desktop job dies with missing go.sum entry for module providing package modernc.org/sqlite (imported by reasonix/internal/contract/config), and go build ./cmd/... under desktop/ reproduces it locally.

Running go mod tidy inside desktop/ fixes it (I tried it on this head: desktop/go.mod +9 lines, desktop/go.sum +46, and the build passes). Could you commit that to this PR? The code review itself is done and I'll re-approve the new head as soon as the checks are green.

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving 8b60e89: the only change since my review is the go mod tidy output in desktop/, and the desktop jobs now pass.

@esengine
esengine merged commit 4882d2a into esengine:studio Oct 21, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: mcp import requires an external sqlite3 binary, so cc-switch import fails on stock Windows

2 participants