Skip to content

Commit deb9b00

Browse files
cliffhallclaude
andcommitted
test(sequentialthinking): mark the tests that pin known bugs
These suites are characterization tests: they assert today's behavior so the SDK v2 migration can show it changed nothing. Some of them pin behavior that is wrong, and a reader could not tell those from the tests that pin correct behavior. Each test that pins a known bug now carries a marker line directly above it: // KNOWN BUG #<issue>: pins current (wrong) behavior; the fix changes this assertion. or, where no issue is filed: // KNOWN BUG (no issue): <what's wrong>; the fix changes this assertion. so `git grep "KNOWN BUG"` lists exactly the bug-pinning tests. Marked: #4721 (annotations on a stateful tool), #4813 (Object.prototype branchId, in thinking and thought-logging), and three logging quirks with no issue ("revising thought undefined", "ID: undefined", a box sized from the coloured header). Not marked: the #4651 regression guards (fixed) and the #799 description length, which is a client-side limit rather than a server bug. Comments only; no assertion changed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 86806cc commit deb9b00

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎src/sequentialthinking/__tests__/thinking.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ describe("sequentialthinking thought processing", () => {
284284
// the failed call still advances thoughtHistoryLength. PR #4814 fixes this;
285285
// these assertions change with it.
286286
describe("#4813: branchId colliding with an Object.prototype key", () => {
287+
// KNOWN BUG #4813: pins current (wrong) behavior; the fix changes this assertion.
287288
it.each(["constructor", "__proto__", "toString", "hasOwnProperty"])(
288289
"fails the call for branchId %j",
289290
async (branchId) => {
@@ -309,6 +310,7 @@ describe("sequentialthinking thought processing", () => {
309310
},
310311
);
311312

313+
// KNOWN BUG #4813: pins current (wrong) behavior; the fix changes this assertion.
312314
it("still counts the failed thought in the history and does not list the branch", async () => {
313315
await conn.think(thought({ branchFromThought: 1, branchId: "alt" }));
314316
const failed = await conn.think(

‎src/sequentialthinking/__tests__/thought-logging.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ describe("sequentialthinking thought logging", () => {
9898
]);
9999
});
100100

101+
// KNOWN BUG (no issue): the header reads "revising thought undefined" when revisesThought is unset; the fix changes this assertion.
101102
it("prints 'undefined' for a revision with no revisesThought", async () => {
102103
await conn!.think(thought({ thought: "x", isRevision: true }));
103104
expect(logged()).toEqual([
@@ -114,6 +115,7 @@ describe("sequentialthinking thought logging", () => {
114115
]);
115116
});
116117

118+
// KNOWN BUG (no issue): a branchFromThought with no branchId draws a Branch header reading "ID: undefined"; the fix changes this assertion.
117119
it("draws a branch header even when no branch is recorded (no branchId)", async () => {
118120
await conn!.think(thought({ thought: "fork", branchFromThought: 2 }));
119121
expect(logged()).toEqual([
@@ -154,6 +156,7 @@ describe("sequentialthinking thought logging", () => {
154156
expect(logged()).toEqual([]);
155157
});
156158

159+
// KNOWN BUG #4813: pins current (wrong) behavior; the fix changes this assertion.
157160
// #4813: the push throws before the box is drawn.
158161
it("logs nothing for a #4813 branch-id collision", async () => {
159162
await conn!.think(
@@ -163,6 +166,7 @@ describe("sequentialthinking thought logging", () => {
163166
});
164167
});
165168

169+
// KNOWN BUG (no issue): the border counts the header's colour escape codes, so the box is drawn wider than its text; the fix changes this assertion.
166170
// The border is sized from header.length, and the header carries chalk's
167171
// escape codes, so when colour is on the box is wider than its visible text.
168172
it("sizes the border from the coloured header, escape codes included", async () => {

‎src/sequentialthinking/__tests__/tools-list.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// identity and capabilities, and the one tool's name, title, description,
33
// annotations, input schema and output schema, exactly as SDK 1.x emits them
44
// today. These are characterization tests: where today's value is known to be
5-
// wrong (#4721 annotations, #799 description length) the test pins the current
6-
// value and cites the issue, so the fix shows up as a deliberate assertion
7-
// change rather than a silent drift.
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.
89

910
import { describe, it, expect, beforeAll, afterAll } from "vitest";
1011
import { createRequire } from "node:module";
@@ -51,6 +52,7 @@ describe("sequentialthinking: initialize and tools/list", () => {
5152
expect(tool.title).toBe("Sequential Thinking");
5253
});
5354

55+
// KNOWN BUG #4721: pins current (wrong) behavior; the fix changes this assertion.
5456
// #4721: the server keeps a thought history and branch map that every call
5557
// mutates, so readOnlyHint: true and idempotentHint: true are wrong for it.
5658
// Pinned as they are today; the fix changes this assertion on purpose.

0 commit comments

Comments
 (0)