Skip to content

test(mcp): cover per-definition callers truncation - #1846

Open
bompus wants to merge 1 commit into
colbymchenry:mainfrom
bompus:test/callers-per-definition-truncation
Open

test(mcp): cover per-definition callers truncation#1846
bompus wants to merge 1 commit into
colbymchenry:mainfrom
bompus:test/callers-per-definition-truncation

Conversation

@bompus

@bompus bompus commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

codegraph_callers only groups by definition when the same name has more than one definition. The truncation test on main used a single hot function, so the grouped distinct definitions / … +N more assertion failed even though the flat Showing 20 of 26 marker is correct for that fixture.

This change gives hot two definitions so that assertion matches the product path. Handler behavior is unchanged.

Test plan

  • fnm exec --using codegraph npx vitest run __tests__/mcp-callers-truncation.test.ts --minWorkers 1 --maxWorkers 1 (5/5 pass)

A single hot definition only produces the flat capped list; two same-name defs are required to assert the per-section cut marker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant