Skip to content

Tests: no coverage for pipeline/cache/entity extractor; add wheel-install & webhook-retry tests #25

Description

@codenamekt

Summary

Several modules have zero test coverage, and the suite lacks a few high-value tests that would have caught shipped bugs.

Findings

Modules with no tests

  • hexus/pipeline/router.py (ContentRouter) — see the compression bugs in the pipeline issue.
  • hexus/ccr/cache.py (CCRCache) — also crashes on maxsize<=0 (cache.py:26-29).
  • hexus/entity_extractor.py — see the garbage-pattern bugs in the pipeline issue.
  • docker/entrypoint.sh — no coverage of profile dispatch.

Missing high-value tests

  • Wheel-install smoke testpip install dist/*.whl && python -c "import hexus" in CI would have caught the broken-wheel packaging bug (missing subpackages).
  • Webhook retry/backoff policy — no test exercises retry counts, backoff values, or 2xx-vs-4xx handling.
  • Packaging metadata — no check that all subpackages are included.

Coverage map (for reference)

  • DB-required (skip without PG_TEST_DSN): test_migration.py, test_quantization.py, most of test_smoke.py/test_mcp_server.py.
  • Standalone: test_embedder.py, test_conformance.py, test_rerank.py, test_import_cli.py, 4/5 of test_webhooks.py.

Suggested direction

Add unit tests for ContentRouter, CCRCache, and the entity extractor (fast, no DB); add a CI wheel-install smoke job and a webhook retry-policy test.

Filed from the 2026-07 codebase review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: testsArea: testscode-reviewFiled from the 2026-07 codebase reviewpriority: mediumShould fix; hardening/robustness

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions