Skip to content

Commit 5ae8b06

Browse files
committed
Fix CI failures on master
Two fixes: - read-chat missing-path test asserted a unix-style path in the error message, failing on Windows where io/file renders backslashes. Build the expected string with io/file too. - Marking MCP servers running right after tools listing introduced an unconditional second serverUpdated notification after prompts and resources listing, even when the server has none. That extra notification broke the mcp-remote list_changed integration test on all platforms. Only notify again when prompts or resources arrived.
1 parent 52b6f01 commit 5ae8b06

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Skip redundant MCP `tool/serverUpdated` notification after prompts/resources listing when the server has none.
6+
57
## 0.154.0
68

79
- Improve `/login` UX: markdown links, provider/method selection via `chat/askQuestion` when supported by client, GitHub Copilot login completes automatically, secrets not echoed.

src/eca/features/tools/mcp.clj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,14 @@
509509
(logger/info logger-tag (format "Started MCP server %s" name))
510510
;; Fetch after flipping to running: servers may take long or never
511511
;; answer these list requests, and they should not gate the status.
512-
(swap! db* assoc-in [:mcp-clients name :prompts] (list-server-prompts client list-timeout-ms))
513-
(swap! db* assoc-in [:mcp-clients name :resources] (list-server-resources client list-timeout-ms))
514-
(on-server-updated (->server name server-config :running @db*))
512+
(let [prompts (list-server-prompts client list-timeout-ms)
513+
resources (list-server-resources client list-timeout-ms)]
514+
(swap! db* assoc-in [:mcp-clients name :prompts] prompts)
515+
(swap! db* assoc-in [:mcp-clients name :resources] resources)
516+
;; Notify again only when something actually arrived, avoiding
517+
;; a redundant duplicate notification for servers without them.
518+
(when (or (seq prompts) (seq resources))
519+
(on-server-updated (->server name server-config :running @db*))))
515520
:ok)))
516521
(catch Exception e
517522
(try (pp/stop-client-transport! transport false) (catch Exception _))

test/eca/read_chat_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
(catch clojure.lang.ExceptionInfo e
422422
e))]
423423
(is e)
424-
(is (string/includes? (.getMessage e) "DB cache file not found: /nonexistent/path"))
424+
(is (string/includes? (.getMessage e) (str "DB cache file not found: " (io/file "/nonexistent/path"))))
425425
(is (string/includes? (.getMessage e) "Check --db-cache-path")))))
426426

427427
(deftest run-missing-workspace-derived-path-test

0 commit comments

Comments
 (0)