Skip to content

Commit be799c9

Browse files
committed
Name every harness in the marketplace listing too
The harness list is written out in four places. Adding Cursor, opencode and Gemini updated three of them and missed marketplace.json, which holds two descriptions of its own and still offered to search Claude Code and Codex. That is the first text anyone reads, before the README and before the plugin is installed. A test now holds every shipped description to naming all five, so the next harness cannot be added to some of them.
1 parent 3abf7c3 commit be799c9

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{
99
"name": "agsearch",
1010
"source": "./",
11-
"description": "Search your past Claude Code and Codex sessions from inside Claude"
11+
"description": "Search your past Claude Code, Codex, Cursor, opencode and Gemini CLI sessions from inside Claude"
1212
}
1313
],
14-
"description": "agsearch: search your past Claude Code and Codex sessions from inside Claude"
14+
"description": "agsearch: search your past Claude Code, Codex, Cursor, opencode and Gemini CLI sessions from inside Claude"
1515
}

‎tests/test_adapters.py‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import json
1111
import os
12+
import pathlib
1213
import sqlite3
1314
import tempfile
1415
import unittest
@@ -64,6 +65,41 @@ def test_unknown_source_falls_back_to_claude(self):
6465
self.assertIs(ag._source("harness-from-the-future"), ag.SOURCES["cc"])
6566

6667

68+
class ShippedDescriptionTests(unittest.TestCase):
69+
"""Every user-facing description has to name every harness agsearch indexes.
70+
71+
They are written out in four files, and adding the fifth harness updated three of them.
72+
A reader met the marketplace listing before anything else and it still said two.
73+
"""
74+
75+
# How each source is spelled in prose, which is not always its column label.
76+
PROSE = {"cc": "Claude Code", "codex": "Codex", "cursor": "Cursor",
77+
"opencode": "opencode", "gemini": "Gemini"}
78+
79+
def described_files(self):
80+
root = pathlib.Path(__file__).resolve().parents[1]
81+
for rel in (".claude-plugin/plugin.json", ".claude-plugin/marketplace.json"):
82+
blob = json.loads((root / rel).read_text())
83+
stack = [blob]
84+
while stack:
85+
node = stack.pop()
86+
if isinstance(node, dict):
87+
if isinstance(node.get("description"), str):
88+
yield rel, node["description"]
89+
stack.extend(node.values())
90+
elif isinstance(node, list):
91+
stack.extend(node)
92+
93+
def test_every_harness_is_named(self):
94+
self.assertEqual(set(self.PROSE), set(ag.SOURCES), "a source has no prose spelling")
95+
seen = 0
96+
for rel, text in self.described_files():
97+
seen += 1
98+
for source, prose in self.PROSE.items():
99+
self.assertIn(prose, text, "%s omits %s: %r" % (rel, source, text))
100+
self.assertGreaterEqual(seen, 3, "expected several descriptions to check")
101+
102+
67103
class ResumeRecipeTests(unittest.TestCase):
68104
def plan(self, source, sid, path):
69105
d = tempfile.mkdtemp()

0 commit comments

Comments
 (0)