Skip to content

ci: run the orphaned tests/test_indexer.py in the test job#144

Merged
CGFixIT merged 1 commit into
mainfrom
claude/cyclaw-optimization-review-u3kgru-ci-test-indexer
Jun 21, 2026
Merged

ci: run the orphaned tests/test_indexer.py in the test job#144
CGFixIT merged 1 commit into
mainfrom
claude/cyclaw-optimization-review-u3kgru-ci-test-indexer

Conversation

@CGFixIT

@CGFixIT CGFixIT commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

ci.yml runs an explicit, hand-maintained list of test files. tests/test_indexer.py was added to the suite but never added to that list, so its 7 tests never run in CI:

  • TestChunkDocument — 4 tests for chunk_document edge cases (empty text, single window, overlap stride, exact partitioning)
  • TestBuildIndexValidation — 3 tests for the build_index fail-fast guards that reject chunk_size < 1 and chunk_overlap >= chunk_size before a corrupt index is written

Net 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 the fail_under = 80 gate. The goal of this PR is simply to execute the existing tests.

Verification

tests/test_indexer.py .......  7 passed
python -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"  # valid YAML

Note: the explicit-list pattern is inherently easy to drift out of sync (this is how the gap arose). A follow-up could switch to directory-based collection, but that's a larger change with coverage-scoping implications, so it's kept out of this focused PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LvLWMML8cpBq2q81kL1ByJ


Generated by Claude Code

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
@CGFixIT CGFixIT marked this pull request as ready for review June 21, 2026 02:26
@CGFixIT CGFixIT merged commit d9d9293 into main Jun 21, 2026
14 checks passed
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.

2 participants