Repository navigation
fix(tool): say how many skill matches a query left out - #811
Merged
Ishaan Gangwani (ishaan1124) merged 2 commits intoSep 29, 2026
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
September 28, 2026 19:22
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/skill-query-truncation-notice
branch
from
September 29, 2026 04:50
381a24c to
92cc701
Compare
searchSkills caps at 8 by default and the query branch emitted those 8 with no total, so a broad query read as the full result set. The category branch two blocks down already reports its count; rank the whole candidate set so the same note can be given here.
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/skill-query-truncation-notice
branch
from
September 29, 2026 10:38
92cc701 to
6a22439
Compare
# Conflicts: # CHANGELOG.md
Ishaan Gangwani (ishaan1124)
merged commit Sep 29, 2026
7df6ca1
into
synthetic-sciences:main
8 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The query branch of the skill tool called
searchSkills(params.query, candidates)and printed the result.searchSkillsends with.slice(0, limit)andlimitdefaults to 8, so the tool saw at most 8 matches and the output carried no total and no hint that anything was dropped.The category-browse branch two blocks below — the same kind of bounded list — is careful about exactly this:
Why it matters
A ranked list of 8 with no total reads as "these are the relevant skills". The 9th-best match is dropped from the end with no signal, so the model has no reason to try a narrower query or different wording.
This is the common case, not an edge case: the bundled library is ~371 skills, so any broad capability query ("RNA", "statistics", "visualization") matches far more than 8.
Verified on this machine with the existing 43-skill fixture —
query: "biology"returns exactly 8 of 43 matches, with nothing in the output indicating the other 35.Verification
Extends the existing 43-skill case in
test/skill/discovery.test.ts. With the source reverted but the test kept, it fails on exactly the missing note:After the fix:
The test asserts both directions: the broad query reports
of 43 matchesand the "narrow the query" hint, and the existing narrowRNA QCquery gets no such note — so the sentence cannot appear on results that are already complete.The change
if (params.query && !selected) { - const matched = searchSkills(params.query, candidates) + // searchSkills caps at 8 by default, and a bare list of 8 reads as + // "these are the matches" rather than "the best 8 of many". Rank the + // whole candidate set so the note can say how many were dropped. + const ranked = searchSkills(params.query, candidates, candidates.length) + const matched = ranked.slice(0, 8) if (matched.length === 0) {The 8-result cap and the ranking are unchanged; only the reporting is. The search itself already scored every candidate before slicing, so passing a larger limit costs no extra scoring.
bun run typecheckclean; touched files are Prettier-clean (checked on LF-normalized copies — this checkout hascore.autocrlf=true, which makes Prettier flag every file in the repo).Note on pre-existing failures
test/skill/discovery.test.tshas other pre-existing failures in this Windows checkout, and they vary run to run (1 pass / 5 fail to 5 pass / 1 fail on unmodifiedmain). They are path-separator and timing assertions unrelated to this change; the targeted case above is green and fails without the fix.Fixes #810