Repository navigation
fix(explore): names the query spells that the index never saw are said, not glossed over - #2789
Merged
Merged
Conversation
colbymchenry
force-pushed
the
claude/issue-2462-build-skip-explore
branch
from
October 22, 2026 07:27
4ddd41b to
bb72ca6
Compare
…d, not glossed over Root cause: explore answers whatever the query's words match. When a name the query spelled is not in the index at all, the answer is built from the other words and says nothing about the missing ones. In the report, the tool projects under a .NET repo's root build/ folder are skipped by default. Asking for ReleaseNotesBuilder, ChangelogParser, PersistentData and AddFeatures returned an unrelated Program.Main and a C++ Parser, and the agent read the wrong code. The miss diagnostics (issue #2026) ran only when nothing at all matched. Fix: - Query tokens written like code names (a camelCase hump, snake_case, or a qualified name) that resolve to no node at all are checked with a new bounded probe, getUnseenNames. It reports names the index has never seen: no node called that in any case, and no name, qualified name or path, signature or docstring word starting with it. - A qualified name is judged by its member. Express's app.handle is indexed as handle, so the receiver alone never makes a name missing. - Names that pass are listed in a note right under the summary line, success-shaped. The note points to codegraph status and never to Read. It names the .gitignore re-include for a default-skipped folder like build/ as the user's choice, since indexing scope is the user's call. - A single word (Program, Main, How) is never named: it may be English. - The total-miss answer gains the same note. - The seeding's query tokenizer moved into one shared function, unchanged. The skip itself is unchanged here. On main a root build/ folder is still skipped by default: PRs 2681 and 2687 re-opened build folders below src/ only. The documented opt-in, !/build/ in .gitignore, indexes it, and sync picks the opt-in up, verified on main and on 1.6.2. Validation: - New explore-unindexed-names.test.ts, 8 tests: 6 fail on main. - All 38 explore suites pass, plus the tool-allowlist and dynamic-boundary suites (466 tests). - The reporter's repo, newrelic/newrelic-dotnet-agent 418a0f2f, now commits the !/build/ workaround. With that line removed and the index synced, main answers the reporter's query with VersionFileGenerator/Program.cs Main and Sicily/Parser.cpp, saying nothing. The fix adds the note naming exactly the four missing names. - Ordinary queries: 996 on express, flask, excalidraw, django, airflow and go-control-plane, all byte-identical to main. - Miss probes: 120 queries mixing real names with invented ones, or only invented ones. Main never notes anything. The fix names every invented name in all 120 and no real name. The note costs about 5 source lines on a full response. Fixes #2462 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
colbymchenry
force-pushed
the
claude/issue-2462-build-skip-explore
branch
from
October 22, 2026 07:44
bb72ca6 to
268691c
Compare
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.
Summary
#2462 has two halves. This PR fixes the second and records where the first stands.
1. The default
buildskip. On main a rootbuild/folder is still skipped by default. #2681, #2685 and #2687 re-opened onlybuildfolders belowsrc/, for hand-written TS/JS-family, Go, C# and Rust files. The documented opt-in works:!/build/in the project's.gitignoreindexes it, andcodegraph syncpicks the opt-in up. I verified that on main and on v1.6.2, with the negation in.gitignoreand in.git/info/exclude. I could not reproduce the report's "Already up to date". The reporter's repo has since committed exactly that opt-in, with a comment naming CodeGraph. Widening the default to a rootbuild/is a separate decision about the skip list: a rootbuild/is many toolchains' output folder, e.g. a CRA production bundle. This PR leaves the skip list alone.2. Explore's silence on a miss. When a query names symbols the index has never seen, the answer now says so first, success-shaped, and points at what decides it, never at Read:
That is newrelic/newrelic-dotnet-agent at 418a0f2f, the reporter's repo, with its committed
!/build/removed and the index synced. On main, the same query returnssrc/Agent/NewRelic/Profiler/VersionFileGenerator/Program.cs'sMainand the C++Sicily/Parser.cpp, with nothing to say four of the names matched nothing. That is the report, line for line.Root cause
Explore answers whatever the query's words match. A name with no match simply contributes nothing, and the answer is built from the remaining words. The #2026 miss diagnostics ran only when nothing at all matched.
Fix
snake_case, or a qualifieda.b/a::b.getUnseenNames(new, inqueries.ts) keeps the names the index has never seen: no node called that in any case, and no name, qualified name (a file's path), signature or docstring word that starts with it. It's bounded likegetExploreMissDiagnostics: two index probes per name, at most 16 names, never a source scan.app.handle = function handle(…)is indexed ashandle, so a receiver the index doesn't record never makes a name missing. This was a real false positive on express's prose probe until fixed.Program,Main,HowandParsercan be English, and a question's ordinary words must never be reported as missing code.exploreQueryTokens, unchanged, so both paths read a query the same way.Validation
Tests. New
__tests__/explore-unindexed-names.test.ts, 8 tests; 6 fail on main. It uses the report's layout (a rootbuild/with the tool projects, an unrelatedProgram.cs, a C++Parser) and covers:!/build/is added and the project synced.All 38 explore suites pass, plus the tool-allowlist and dynamic-boundary suites (466 tests).
Ordinary queries. 996 on express, flask, excalidraw, django, airflow and go-control-plane: the 50 longest functions by name, their files by path, caller/callee pairs, call chains, random names and flow questions. All are byte-identical to main.
Miss probes. 120 queries, 20 per repo: real pair queries with an invented code-style name appended, invented names alone, and prose that mentions one.
Full suite on bb72ca6 (rebased onto 0953084 after main moved), with the native kernel built and
CODEGRAPH_KERNEL_EXPECT=1: 716 files (710 passed, 6 skipped), 8,572 tests: 8,490 passed, 0 failed, 82 skipped. The pushed commit differs from bb72ca6 only in the note's wording, so including a skipped folder reads as the user's choice, and the test lines that pin it (git diff --stat bb72ca63 HEAD: 2 files, 7 insertions, 5 deletions). The new test file, the 38 explore suites and the tool-allowlist and dynamic-boundary suites were re-run on it: 466 passed.Not in this PR
build/default (part 1 above), left for a separate decision.syncmissing a newly un-ignored path, did not reproduce on main or on v1.6.2 for this layout.Fixes #2462
🤖 Generated with Claude Code