Skip to content

fix(tui): report reconnecting instead of unknown tool for promoted-but-unmounted calls - #1082

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-8021-promoted-but-unmounted-tools-fail-at-call-time-tool_search
Sep 16, 2026
Merged

TheGreatAxios merged 4 commits into
mainfrom
cl-8021-promoted-but-unmounted-tools-fail-at-call-time-tool_search

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary: the live call gate now distinguishes a registry miss on a gate-activated (promoted) name — its server dropped between search and call — from a never-activated miss. Activated misses return a reconnecting/retry-shortly error; plain misses keep the exact unknown tool string. Both production gates (TUI session, exec) pass the activation predicate; the wire hold-off / flushPromotions machinery is untouched.

Verification: red-then-green regression test in src/tui/dynamic-tool-runner.test.ts; bun test on dynamic-tool-runner, assemble-runtime, tool-search, exec runner suites plus src/tui/runner (87 pass, 0 fail); oxfmt/oxlint clean on changed files; tsc shows only the pre-existing vendor semver error (proven on pristine HEAD via stash).

Fixes CL-8021

@linear-code

linear-code Bot commented Sep 16, 2026

Copy link
Copy Markdown

CL-8021

…t-unmounted calls

Summary: the live call gate now distinguishes a registry miss on a gate-activated (promoted) name — its server dropped between search and call — from a never-activated miss. Activated misses return a reconnecting/retry-shortly error; plain misses keep the exact unknown tool string. Both production gates (TUI session, exec) pass the activation predicate; the wire hold-off machinery is untouched.

Verification: bun test on dynamic-tool-runner, assemble-runtime, tool-search, exec runner suites plus src/tui/runner (87 pass, 0 fail); oxfmt/oxlint clean on changed files; tsc shows only the pre-existing vendor semver error (proven on pristine HEAD via stash).
Strip a single leading <segment>. prefix on registry miss and retry the lookup, so harness-namespaced calls such as default.mcp__linear__list_releases dispatch through the gate. Miss paths keep the exact reconnecting and unknown-tool strings with the original name.
A harness-namespaced call (default.<stripped>) misses the registry under its original name even when <stripped> was activated. Check isActivated with the stripped form too so an activated-but-unmounted tool reports reconnecting instead of unknown tool. Miss-branch strings still use the original name; never-activated misses keep the exact unknown-tool string. Adds keeper tests: dotted registration wins over bare suffix, prefixed activated miss reports reconnecting under the original name, gate-reject on a normalized call reports the stripped name.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8021-promoted-but-unmounted-tools-fail-at-call-time-tool_search branch from d0a1dcf to def6dbf Compare September 16, 2026 02:08
@TheGreatAxios
TheGreatAxios enabled auto-merge (squash) September 16, 2026 02:08
@TheGreatAxios
TheGreatAxios merged commit ab3afcd into main Sep 16, 2026
13 checks passed
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