Skip to content

Commit 2f7940d

Browse files
author
Bruce Hauman
committed
Remove eval history tracking and fix error semantics tests
- Remove unused eval history tracking from eval/core.clj - Update eval tool tests to expect error? true for error cases
1 parent 9214780 commit 2f7940d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/clojure_mcp/tools/eval/core.clj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@
7272
session-type (or session-type :default)
7373
conn (nrepl/open-connection nrepl-client)]
7474

75-
;; Push to eval history if available
76-
(when-let [state (::nrepl/state nrepl-client)]
77-
(swap! state update :clojure-mcp.repl-tools/eval-history conj form-str))
78-
7975
(try
8076
(let [session-id (nrepl/ensure-session nrepl-client conn session-type)
8177
eval-id (nrepl/new-eval-id)

test/clojure_mcp/tools/eval/tool_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
(testing "Evaluation with error"
103103
(let [result (test-tool-execution "(throw (Exception. \"test error\"))")]
104-
(is (false? (:error? result)))
104+
(is (true? (:error? result)))
105105
(is (= 1 (count (:result result))))
106106
(is (str/includes? (first (:result result)) "test error"))
107107
(is (str/includes? (first (:result result)) "Execution error"))))
@@ -123,7 +123,7 @@
123123
(testing "Evaluation with runtime error (no pre-evaluation linting)"
124124
;; With delimiter-only checking, syntax errors are caught at runtime
125125
(let [result (test-tool-execution "(def ^:dynamic 1)")]
126-
(is (false? (:error? result)))
126+
(is (true? (:error? result)))
127127
(is (= 1 (count (:result result))))
128128
;; Should have error from evaluation, not from linting
129129
(is (str/includes? (first (:result result)) "Syntax error")))))

0 commit comments

Comments
 (0)