refactor: drop retired backward-compat code#62
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-07MCP version was accepted only because the (now-removed) TypeScript SDK/host echoed it; it is not a released MCP spec version. The extension'sif (!push)"Compatibility path" is a second, fully synchronous pipeline that no production caller uses — everysemanticDiffrequest originates in a tab content script, which always suppliespush.Changes
cli/src/mcp.zig: drop2024-10-07fromsupported_versionsand its comment. A client that sends it now negotiates to the default2025-06-18(already covered by the "falls back to the default version for unknown ones" test). Remove the2024-10-07-echo regression test.extension/src/background/handler.ts: makepushrequired onHandler.semanticDiff, delete the push-less compatibility branch (and the then-deadrepoKeylocal), and update theresolveRemainingcomment that referenced it. The two-stage push pipeline is now the only path.extension/src/background/index.ts: supplypushunconditionally via a thin adapter that no-ops for a (non-existent) non-tab sender, instead of passingundefined.extension/src/background/handler.test.ts: migrate the suite to the push API. A newresolveFullyhelper 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.