Skip to content

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

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

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.
@bompus

bompus commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded: #1862 landed the same per-definition truncation coverage with a stronger fixture (exact-named hot.ts + other-hot.ts, pinning that a filename is not an overload per #1809). The assertions here are identical to what is now on main, so there is nothing left to carry over. Thanks for the review bandwidth.

@bompus bompus closed this Sep 15, 2026
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