Skip to content

Commit ba5b22e

Browse files
ci: fix tool-count smoke check after moduleRegistrar refactor
The Phase-2 refactor replaced direct server.registerTool() calls with a register() wrapper returned by moduleRegistrar(), so the dist/*.js output no longer contains 180 matches of the old pattern. The CI smoke check was counting 2 (just the ones remaining inside registry.js) and failing with "Expected 180+". Switch the grep to count register("arcane_ — matches every tool registration site in dist/tools/*.js exactly once (verified locally: 180). Also updates the same stale verification snippet in CLAUDE.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 901a5d5 commit ba5b22e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ jobs:
3838

3939
- name: Verify tool count
4040
run: |
41-
TOTAL=$(grep -rc "registerTool(" dist/tools/*.js | awk -F: '{sum+=$2} END {print sum}')
41+
# After the tool-filtering refactor each module registers via the
42+
# `register("arcane_...", ...)` wrapper returned by moduleRegistrar,
43+
# so we count those instead of the former `server.registerTool(`.
44+
TOTAL=$(grep -rc 'register("arcane_' dist/tools/*.js | awk -F: '{sum+=$2} END {print sum}')
4245
echo "Found $TOTAL tool registrations"
4346
if [ "$TOTAL" -lt 180 ]; then echo "FAIL: Expected 180+"; exit 1; fi
4447

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ All tools use `server.registerTool()` with:
4141
3. Classify annotations: list/get = readOnly, delete/prune = destructive, external calls = openWorld
4242
4. Use `toolHandler()` wrapper — return a plain string, it handles the MCP response envelope
4343
5. Register in `src/tools/index.ts`
44-
6. Verify: `npm run build && grep -c "registerTool(" src/tools/*.ts | awk -F: '{sum+=$2} END {print sum}'`
44+
6. Verify: `npm run build && grep -rc 'register("arcane_' dist/tools/*.js | awk -F: '{sum+=$2} END {print sum}'` (expect 180)
4545

4646
### Resources & Prompts
4747

0 commit comments

Comments
 (0)