|
1 | 1 | // Pins what a client sees when it connects and lists tools: the server's |
2 | 2 | // identity and capabilities, and the one tool's name, title, description, |
3 | 3 | // annotations, input schema and output schema, exactly as SDK 1.x emits them |
4 | | -// today. These are characterization tests: where today's value is known to be |
5 | | -// wrong (#4721 annotations) the test pins the current value and cites the |
6 | | -// issue, so the fix shows up as a deliberate assertion change rather than a |
7 | | -// silent drift. The 2781-character description (#799) is pinned as current |
8 | | -// design: the 1024 cap is an OpenAI/Azure client limit, not the MCP spec. |
| 4 | +// today. These are characterization tests. The annotations assert the values |
| 5 | +// fixed in #4721 (the tool is stateful, so neither read-only nor idempotent). |
| 6 | +// The 2781-character description (#799) is pinned as current design: the |
| 7 | +// 1024 cap is an OpenAI/Azure client limit, not the MCP spec. |
9 | 8 |
|
10 | 9 | import { describe, it, expect, beforeAll, afterAll } from "vitest"; |
11 | 10 | import { createRequire } from "node:module"; |
@@ -52,15 +51,15 @@ describe("sequentialthinking: initialize and tools/list", () => { |
52 | 51 | expect(tool.title).toBe("Sequential Thinking"); |
53 | 52 | }); |
54 | 53 |
|
55 | | - // KNOWN BUG #4721: pins current (wrong) behavior; the fix changes this assertion. |
56 | | - // #4721: the server keeps a thought history and branch map that every call |
57 | | - // mutates, so readOnlyHint: true and idempotentHint: true are wrong for it. |
58 | | - // Pinned as they are today; the fix changes this assertion on purpose. |
59 | | - it("carries today's annotations (#4721: read-only and idempotent, though the tool is stateful)", () => { |
| 54 | + // #4721: every call appends to the server's thought history, and a call with |
| 55 | + // both branchFromThought and branchId also appends to that branch, so the |
| 56 | + // tool is neither read-only nor idempotent. It is still not destructive (it |
| 57 | + // only appends) and not open-world. |
| 58 | + it("advertises the tool as stateful: not read-only, not idempotent, not destructive, closed-world", () => { |
60 | 59 | expect(tool.annotations).toEqual({ |
61 | | - readOnlyHint: true, |
| 60 | + readOnlyHint: false, |
62 | 61 | destructiveHint: false, |
63 | | - idempotentHint: true, |
| 62 | + idempotentHint: false, |
64 | 63 | openWorldHint: false, |
65 | 64 | }); |
66 | 65 | }); |
|
0 commit comments