Skip to content

refactor: drop retired backward-compat code#62

Merged
hashiiiii merged 1 commit into
mainfrom
refactor/remove-backward-compat-code
Jul 8, 2026
Merged

refactor: drop retired backward-compat code#62
hashiiiii merged 1 commit into
mainfrom
refactor/remove-backward-compat-code

Conversation

@hashiiiii

Copy link
Copy Markdown
Owner

Summary

Remove three pieces of code kept only to preserve compatibility with retired internal implementations: the prerelease MCP protocol version 2024-10-07, and the extension's push-less synchronous diff pipeline.

Motivation

Closes #59.

PrefabLens is pre-1.0, so no deprecation cycle is required. The 2024-10-07 MCP version was accepted only because the (now-removed) TypeScript SDK/host echoed it; it is not a released MCP spec version. The extension's if (!push) "Compatibility path" is a second, fully synchronous pipeline that no production caller uses — every semanticDiff request originates in a tab content script, which always supplies push.

Changes

  • cli/src/mcp.zig: drop 2024-10-07 from supported_versions and its comment. A client that sends it now negotiates to the default 2025-06-18 (already covered by the "falls back to the default version for unknown ones" test). Remove the 2024-10-07-echo regression test.
  • extension/src/background/handler.ts: make push required on Handler.semanticDiff, delete the push-less compatibility branch (and the then-dead repoKey local), and update the resolveRemaining comment that referenced it. The two-stage push pipeline is now the only path.
  • extension/src/background/index.ts: supply push unconditionally via a thin adapter that no-ops for a (non-existent) non-tab sender, instead of passing undefined.
  • extension/src/background/handler.test.ts: migrate the suite to the push API. A new resolveFully helper drives a request to its final push and returns the fully-resolved response, so the resolution assertions read the pipeline's end state unchanged.

Testing

  • zig build lint → clean; zig build test → pass; zig build perf → 50000 objects in 140 ms (ceiling 600 ms).
  • extension: tsc --noEmit → clean, biome ci . → exit 0, vitest run → 142 passed (13 files), npm run build → ok.

@github-actions github-actions Bot added cli CLI and MCP server (Zig) extension VS Code extension (TypeScript) labels Jul 8, 2026
@hashiiiii
hashiiiii merged commit 9590724 into main Jul 8, 2026
9 checks passed
@hashiiiii
hashiiiii deleted the refactor/remove-backward-compat-code branch July 8, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI and MCP server (Zig) extension VS Code extension (TypeScript)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove redundant backward-compatibility code

1 participant