feat(control): suggest nearest methods on an unknown control call - #339
Open
jeffcrouse wants to merge 1 commit into
Open
feat(control): suggest nearest methods on an unknown control call#339jeffcrouse wants to merge 1 commit into
jeffcrouse wants to merge 1 commit into
Conversation
An unknown control method returned a flat "unknown method: <x>" with no hint — so `POST /connect` (a plausible guess for the visual-edge method, which is actually `connect_nodes`) was a dead end. Silent-ish for an LLM/human driver: you can't tell a typo from a missing feature. Dispatch now appends "did you mean: a, b, c?" — ranking handler keys by prefix match, then substring, then Levenshtein distance (dropping far matches), with ties broken by shorter name so the closest candidate leads. `/connect` -> connect_nodes, connect_mapping, connect_control_to_param; `/get_map` -> get_mappings, ...; a nonsense method still gets no suggestions. General (helps every future typo). No new method / behavior change beyond error text -> MCP parity unaffected. Full ctest 99/99. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QB6eSNJE55ru3g4vsL77GT
jeffcrouse
enabled auto-merge (squash)
August 11, 2026 14:00
Contributor
Production gate (core): ✅ PASS
|
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
An unknown control method returned a flat
unknown method: <x>with no hint — soPOST /connect(a plausible guess for the visual-edge method, which is actuallyconnect_nodes) was a dead end. Silent-ish for an LLM/human driver: you can't tell a typo from a missing feature.Fix
Dispatch now appends
— did you mean: a, b, c?, ranking handler keys by prefix match → substring → Levenshtein distance (dropping far matches), ties broken by shorter name so the closest candidate leads.Verification
/connect→connect_nodes, connect_mapping, connect_control_to_param;/get_map→get_mappings, …; a nonsense method still gets no suggestions. General (helps every future typo). No new method → MCP parity unaffected. Full ctest 99/99.🤖 Generated with Claude Code
https://claude.ai/code/session_01QB6eSNJE55ru3g4vsL77GT