Skip to content

fix(mcp): drop the duplicated scheduling methods on stubClient - #11323

Merged
mudler merged 1 commit into
masterfrom
fix/mcp-stub-duplicate-scheduling
Aug 3, 2026
Merged

fix(mcp): drop the duplicated scheduling methods on stubClient#11323
mudler merged 1 commit into
masterfrom
fix/mcp-stub-duplicate-scheduling

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

master does not compile

vet: core/http/endpoints/mcp/localai_assistant_test.go:157:19:
method stubClient.ListScheduling already declared at
core/http/endpoints/mcp/localai_assistant_test.go:87:19

Reproduced on bd076376b (current master HEAD).

Cause

Two fixes for the same breakage landed. By the time #11318 merged, the four Scheduling methods were already present at lines 87-99, in interface order after ListNodes. #11318 appended its own copy after GetRouterDecisions at lines 157-171.

The two blocks are in different parts of the file, so git merged both without a textual conflict and nothing flagged the collision. Duplicate methods on the same type are a compile error, so the package went straight back to not typechecking.

That one is on me: #11318 was opened against a base that had already moved, and I did not re-check before it merged.

Fix

Remove the appended copy, keep the one in interface order. Pure deletion, 16 lines, no behaviour change.

Verification

  • go vet ./core/http/endpoints/mcp/ clean.
  • go test ./core/http/endpoints/mcp/ passes.
  • Diff is deletion-only (1 file changed, 16 deletions(-)).

master does not compile:

    vet: core/http/endpoints/mcp/localai_assistant_test.go:157:19:
    method stubClient.ListScheduling already declared at
    core/http/endpoints/mcp/localai_assistant_test.go:87:19

Two fixes for the same breakage landed. The four Scheduling methods were
already present at lines 87-99, in interface order after ListNodes, by
the time #11318 merged; #11318 appended its own copy after
GetRouterDecisions. The two blocks sit in different parts of the file, so
git merged both without a conflict and nothing flagged it.

Remove the appended copy and keep the one in interface order. Pure
deletion, no behaviour change.

Verified: go vet clean on ./core/http/endpoints/mcp/, and
go test ./core/http/endpoints/mcp/ passes.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude Code:claude-opus-5 [Read] [Edit] [Bash]
@localai-bot localai-bot added the bug Something isn't working label Aug 3, 2026
@mudler
mudler merged commit e231104 into master Aug 3, 2026
70 checks passed
@mudler
mudler deleted the fix/mcp-stub-duplicate-scheduling branch August 3, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants