Stop indexing __corpus__ byte fixtures, and pin the agreement (#52) - #54
Merged
Conversation
…ment `src/agent/tools/__corpus__/` holds deliberately malformed byte fixtures — BOM variants, CR/CRLF/mixed line endings, NBSP, trailing whitespace, no-final-newline — used to test file handling. The symbol indexer ingested them anyway: 23 symbols in the live graph, competing at retrieval with the code that handles those cases. `scripts/graph-differential.mjs` already listed the directory under EXPECTED_MISSES as "deliberately malformed byte fixtures — not source". So the independent check on the symbol graph was calibrated against a different file set than the indexer it checks. Small in symbol count, but being the independent view is the differential's entire job. Scope is what the evidence supports. The sibling `__fixtures__` gets no entry: its files are all `.py.txt`, so no code extension matches and nothing indexes them — confirmed against the live graph, which holds zero symbols from it. Adding it would be a guess dressed as symmetry. The new test pins the two components together rather than just fixing the one directory: every directory-shaped EXPECTED_MISSES entry must appear in INDEX_EXCLUDE_DIRS. Mutation-checked both ways — removing `__corpus__` from the exclude list fails it, and adding a new expectation to the differential fails it too. Extension-shaped entries (.md/.json/.txt) stay out of scope; those are CODE_EXTENSIONS' business. Closes #52 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ All checks passed
Posted by SideCarAI-Bot |
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.
Closes #52.
The disagreement
src/agent/tools/__corpus__/holds deliberately malformed byte fixtures — BOMvariants, CR/CRLF/mixed line endings, NBSP, trailing whitespace,
no-final-newline. The indexer put 23 of their symbols into the live graph,
where they compete at retrieval with the code that handles those cases.
scripts/graph-differential.mjsalready listed the directory underEXPECTED_MISSESas "deliberately malformed byte fixtures — not source".So the independent check on the symbol graph was calibrated against a different
file set than the indexer it checks. Twenty-three symbols is small; being the
independent view is the differential's entire job.
Scope, held to the evidence
The sibling
__fixtures__gets no entry. Its files are all.py.txt, so nocode extension matches and nothing indexes them — confirmed against the live
graph, which holds zero symbols from it.
tests/llm-eval/fixturesandbench/bfcl/fixturesare outsidesrc/and already unindexed.Adding those speculatively would be symmetry without a reason, and the exclude
list is exactly where an unjustified entry does quiet damage later.
The guard is the point
Fixing one directory leaves the next divergence free to happen. The test now
pins the two components: every directory-shaped
EXPECTED_MISSESentry mustappear in
INDEX_EXCLUDE_DIRS.Mutation-checked in both directions:
__corpus__from the exclude list → "differential expects to miss__corpus__— the indexer must exclude it"directory
Extension-shaped entries (
.md,.json,.txt) stay out of scope — those areCODE_EXTENSIONS' business, not the exclude list's, and conflating them wouldmake the guard lie about what it covers.
How it was found
Reconciling the live graph against a direct tree-sitter run after the
tree-sitter fixes landed. Every per-file count matched exactly; the only
aggregate gaps were these fixtures and one file over the size cap (#53). No
extraction defect — two file-set differences, one of which nothing was watching.
npm run check: green.🤖 Generated with Claude Code