ci: run the orphaned tests/test_indexer.py in the test job#144
Merged
CGFixIT merged 1 commit intoJun 21, 2026
Merged
Conversation
tests/test_indexer.py (7 hermetic unit tests for chunk_document edge cases and the build_index chunk-config fail-fast guards) exists in the suite but was never listed in ci.yml's explicit pytest invocation, so it never ran in CI — the indexer's chunking and validation paths had zero enforced regression coverage. Add the file to the existing test list. The tests are fully hermetic (the validation cases raise before any embedding/Chroma work; the chunking cases are pure), so they need no live services and run in the current hermetic CI env. No --cov flag is added for retrieval.indexer: the validation tests exit early and would only partially cover the module, which (added to the coverage denominator) could push the run under the 80% fail_under gate. The goal here is simply to execute the existing tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvLWMML8cpBq2q81kL1ByJ
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
ci.ymlruns an explicit, hand-maintained list of test files.tests/test_indexer.pywas added to the suite but never added to that list, so its 7 tests never run in CI:TestChunkDocument— 4 tests forchunk_documentedge cases (empty text, single window, overlap stride, exact partitioning)TestBuildIndexValidation— 3 tests for thebuild_indexfail-fast guards that rejectchunk_size < 1andchunk_overlap >= chunk_sizebefore a corrupt index is writtenNet effect: the indexer's chunking math and config-validation guards had zero enforced regression coverage, even though the tests already exist and pass.
The change
One line — add the file to the existing list:
tests/test_hybrid_search.py \ + tests/test_indexer.py \ tests/test_graph.py \The tests are fully hermetic (validation cases raise before any embedding/Chroma work; chunking cases are pure Python), so they need no live services and fit the existing hermetic CI env.
Note on coverage
I intentionally did not add
--cov=retrieval.indexer. The validation tests exit early and would only partially cover the module; adding it to the coverage denominator could push the run under thefail_under = 80gate. The goal of this PR is simply to execute the existing tests.Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01LvLWMML8cpBq2q81kL1ByJ
Generated by Claude Code