Skip to content

Stop indexing __corpus__ byte fixtures, and pin the agreement (#52) - #54

Merged
nedonatelli merged 1 commit into
mainfrom
fix/corpus-not-source
Aug 4, 2026
Merged

Stop indexing __corpus__ byte fixtures, and pin the agreement (#52)#54
nedonatelli merged 1 commit into
mainfrom
fix/corpus-not-source

Conversation

@nedonatelli

Copy link
Copy Markdown
Owner

Closes #52.

The disagreement

src/agent/tools/__corpus__/ holds deliberately malformed byte fixtures — BOM
variants, 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.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. 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 no
code extension matches and nothing indexes them — confirmed against the live
graph, which holds zero symbols from it. tests/llm-eval/fixtures and
bench/bfcl/fixtures are outside src/ 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_MISSES entry must
appear in INDEX_EXCLUDE_DIRS.

Mutation-checked in both directions:

  • removing __corpus__ from the exclude list → "differential expects to miss
    __corpus__ — the indexer must exclude it"
  • adding a new expectation to the differential → same failure, naming the new
    directory

Extension-shaped entries (.md, .json, .txt) stay out of scope — those are
CODE_EXTENSIONS' business, not the exclude list's, and conflating them would
make 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

…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>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

✅ All checks passed

Check Status
Type check ✅ success
Lint ✅ success
Tests ✅ success

Posted by SideCarAI-Bot

@nedonatelli
nedonatelli merged commit c7b803d into main Aug 4, 2026
3 checks passed
@nedonatelli
nedonatelli deleted the fix/corpus-not-source branch September 1, 2026 15:10
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.

The symbol indexer ingests __corpus__ byte fixtures the differential explicitly excludes

1 participant