Skip to content

Commit 9f688d4

Browse files
committed
test(agent): replay logged Linear issue queries against the live catalog
1 parent 93a4942 commit 9f688d4

2 files changed

Lines changed: 462 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { describe, expect, test } from "bun:test";
2+
3+
import { liveLinearCatalog } from "../../testkit/linear-mcp-catalog.js";
4+
import { createToolIndex } from "./tool-search.js";
5+
6+
const index = createToolIndex(() => liveLinearCatalog);
7+
8+
// Queries models sent while looking for a release's issues, at the limit
9+
// each one used; every one should shortlist list_issues.
10+
describe("tool_search on logged Linear issue queries", () => {
11+
test.each([
12+
[
13+
"Get a Linear release by URL or identifier and list its issues including titles, status, and descriptions",
14+
10,
15+
],
16+
["Linear retrieve pipeline release issue list and issue details", 5],
17+
["Linear list issues filtered by release ID or release slug", 5],
18+
["issue list", 5],
19+
] as const)("%p (limit %p) shortlists list_issues", (query, limit) => {
20+
expect(index.search(query, limit)).toContain("mcp__linear__list_issues");
21+
});
22+
23+
// Shortlisted only while "issue" and "issues" counted as two words; the
24+
// query splits between release and issue tools, and release tools match more
25+
// of its words.
26+
test.failing(
27+
'"Linear read pipeline release issues and issue details" (limit 5) shortlists list_issues',
28+
() => {
29+
expect(
30+
index.search(
31+
"Linear read pipeline release issues and issue details",
32+
5,
33+
),
34+
).toContain("mcp__linear__list_issues");
35+
},
36+
);
37+
});

0 commit comments

Comments
 (0)