Skip to content

harden: register Windsurf/Devin via direct JSON writes (drop mcpsync from installer)#522

Merged
justrach merged 1 commit into
release/0.2.5824from
fix/installer-direct-windsurf-devin
Jun 1, 2026
Merged

harden: register Windsurf/Devin via direct JSON writes (drop mcpsync from installer)#522
justrach merged 1 commit into
release/0.2.5824from
fix/installer-direct-windsurf-devin

Conversation

@justrach

@justrach justrach commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Why

The Windsurf/Devin registration (PR #521) drove mcpsync sync. But mcpsync ≤0.0.4 flattens a server's nested env into a phantom transport-less server and drops env vars — it corrupted real configs during testing (Codex node_repl.env → "invalid transport"; malformed gitagent.env in 4 tools). Root cause is fixed in justrach/mcpsync#3, but the installer auto-installs whatever mcpsync is currently live, so it shouldn't depend on the fix being out.

What

Windsurf (~/.codeium/windsurf/mcp_config.json) and Devin (~/.config/devin/config.json) both use a standard mcpServers JSON object — so register codedb the same way the other four tools are: a direct, additive python write of just the codedb entry, guarded by the tool's presence (_register_json_mcp).

This:

  • can't drop a server's env/headers (only the codedb key is written),
  • can't create phantom servers,
  • needs no mcpsync (no extra download/network dependency),
  • preserves Devin's non-mcpServers peer keys,
  • is a no-op when the tool isn't installed.

nuke.zig already deregisters both (unchanged).

Tested

Sandbox: a Windsurf server with env + a Devin config with peer keys → codedb added to both, env and peer keys preserved, ~/.mcpconfig.json never created. bash -n install/install.sh clean.

Net: −43/+25 lines vs the mcpsync version (simpler and safer).

… from installer

The mcpsync-based registration added in the Windsurf/Devin PR could corrupt a
user's configs: mcpsync (≤0.0.4) flattened a server's nested env into a phantom
transport-less server and dropped env vars. (Fixed upstream in
justrach/mcpsync#3, but the installer auto-installs whatever mcpsync is live.)

Windsurf and Devin both use a standard mcpServers JSON object, so register
codedb the same way the other tools are — a direct, additive python write of
just the codedb entry, guarded by the tool's presence. This:
  • can't drop a server's env/headers (only the codedb key is written),
  • can't create phantom servers,
  • needs no mcpsync (no extra download / network dependency),
  • preserves Devin's non-mcpServers peer keys.

nuke.zig already deregisters both (unchanged). Verified in a sandbox: env-
bearing servers and peer keys preserved, codedb added, ~/.mcpconfig.json never
touched. install.sh is `bash -n` clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@justrach justrach merged commit 79fa472 into release/0.2.5824 Jun 1, 2026
1 check passed
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

Benchmark Regression Report

Thresholds: 10.00% and 50,000 ns absolute delta

NOISE means the percentage threshold was exceeded, but the absolute delta was too small to fail CI.

Tool Base (ns) Head (ns) Delta Abs Delta (ns) Status
codedb_bundle 85281 86518 +1.45% +1237 OK
codedb_changes 10713 11227 +4.80% +514 OK
codedb_context 804424 806620 +0.27% +2196 OK
codedb_deps 305 285 -6.56% -20 OK
codedb_edit 46574 45533 -2.24% -1041 OK
codedb_find 9512 10184 +7.06% +672 OK
codedb_hot 25442 24480 -3.78% -962 OK
codedb_outline 29052 28463 -2.03% -589 OK
codedb_read 15831 14857 -6.15% -974 OK
codedb_search 21160 21273 +0.53% +113 OK
codedb_snapshot 57096 57660 +0.99% +564 OK
codedb_status 10076 9511 -5.61% -565 OK
codedb_symbol 18867 18667 -1.06% -200 OK
codedb_tree 31448 32156 +2.25% +708 OK
codedb_word 12116 11749 -3.03% -367 OK

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.

1 participant