Summary
A few critical modules still have materially weaker automated coverage than the rest of the codebase.
Evidence
Unit coverage on 2026-03-16 (============================= test session starts ==============================
platform darwin -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/I336665/Vibe/PIC
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, asyncio-1.3.0, cov-7.0.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 424 items / 80 deselected / 344 selected
tests/unit/test_api_deps.py .. [ 0%]
tests/unit/test_api_endpoints.py ....................................... [ 11%]
............................................ [ 24%]
tests/unit/test_auth.py ............ [ 28%]
tests/unit/test_cluster_visualization.py ... [ 29%]
tests/unit/test_cluster_worker.py .... [ 30%]
tests/unit/test_clustering.py ..................... [ 36%]
tests/unit/test_clustering_pipeline.py ........ [ 38%]
tests/unit/test_config.py ................... [ 44%]
tests/unit/test_core.py ......... [ 46%]
tests/unit/test_database.py ....... [ 48%]
tests/unit/test_embedding.py ................. [ 53%]
tests/unit/test_entrypoint.py ...... [ 55%]
tests/unit/test_gdrive_api.py .. [ 56%]
tests/unit/test_gdrive_service.py ........ [ 58%]
tests/unit/test_gdrive_sync_worker.py ........... [ 61%]
tests/unit/test_helpers.py ........... [ 64%]
tests/unit/test_hnsw_migrations.py .... [ 65%]
tests/unit/test_image_store.py ............... [ 70%]
tests/unit/test_image_validation.py ... [ 71%]
tests/unit/test_ingest_worker.py .. [ 71%]
tests/unit/test_middleware.py ........ [ 74%]
tests/unit/test_modal_app.py ........... [ 77%]
tests/unit/test_modal_dispatch.py ......... [ 79%]
tests/unit/test_pipeline.py ............. [ 83%]
tests/unit/test_rate_limit.py .. [ 84%]
tests/unit/test_storage_base.py ........ [ 86%]
tests/unit/test_storage_factory.py ... [ 87%]
tests/unit/test_storage_gcs.py ....... [ 89%]
tests/unit/test_storage_local.py .......... [ 92%]
tests/unit/test_storage_s3.py ......... [ 95%]
tests/unit/test_types.py ....... [ 97%]
tests/unit/test_url_ingest.py ...... [ 98%]
tests/unit/test_vector_store.py .... [100%]
=============================== warnings summary ===============================
tests/unit/test_clustering.py: 10 warnings
/Users/I336665/Vibe/PIC/.venv/lib/python3.12/site-packages/sklearn/cluster/_hdbscan/hdbscan.py:722: FutureWarning: The default value of copy will change from False to True in 1.10. Explicitly set a value for copy to silence this warning.
warn(
tests/unit/test_clustering.py::TestLevel2Clustering::test_returns_expected_structure
tests/unit/test_clustering.py::TestClusteringEdgeCases::test_cluster_level2_with_identical_embeddings
tests/unit/test_clustering.py::TestExtractedHelpers::test_reduce_dimensions_output_shape
/Users/I336665/Vibe/PIC/.venv/lib/python3.12/site-packages/umap/umap_.py:1952: UserWarning: n_jobs value 1 overridden to 1 by setting random_state. Use no seed for parallelism.
warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
______________ coverage: platform darwin, python 3.12.13-final-0 _______________
Name Stmts Miss Cover
src/pic/init.py 0 0 100%
src/pic/api/init.py 0 0 100%
src/pic/api/clusters.py 94 29 69%
src/pic/api/deps.py 63 1 98%
src/pic/api/gdrive.py 19 0 100%
src/pic/api/health.py 53 3 94%
src/pic/api/images.py 46 6 87%
src/pic/api/jobs.py 25 3 88%
src/pic/api/pipeline.py 30 5 83%
src/pic/api/products.py 114 3 97%
src/pic/api/router.py 20 0 100%
src/pic/api/search.py 56 9 84%
src/pic/config.py 150 14 91%
src/pic/core/init.py 0 0 100%
src/pic/core/auth.py 42 0 100%
src/pic/core/constants.py 9 0 100%
src/pic/core/database.py 55 7 87%
src/pic/core/exception_handlers.py 39 8 79%
src/pic/core/logging.py 21 0 100%
src/pic/core/metrics.py 12 0 100%
src/pic/core/middleware.py 98 12 88%
src/pic/core/rate_limit.py 17 2 88%
src/pic/main.py 55 8 85%
src/pic/migrations/versions/003_add_hnsw_vector_index.py 12 0 100%
src/pic/migrations/versions/015_tune_hnsw_index_params.py 14 0 100%
src/pic/modal_app.py 100 21 79%
src/pic/models/init.py 0 0 100%
src/pic/models/db.py 85 0 100%
src/pic/models/schemas.py 258 4 98%
src/pic/models/types.py 21 1 95%
src/pic/services/init.py 0 0 100%
src/pic/services/cluster_visualization.py 71 8 89%
src/pic/services/clustering.py 81 3 96%
src/pic/services/clustering_pipeline.py 73 0 100%
src/pic/services/embedding.py 99 35 65%
src/pic/services/gdrive.py 82 36 56%
src/pic/services/hash_utils.py 2 0 100%
src/pic/services/image_store.py 87 10 89%
src/pic/services/image_validation.py 7 0 100%
src/pic/services/modal_dispatch.py 40 2 95%
src/pic/services/storage/init.py 20 3 85%
src/pic/services/storage/base.py 10 0 100%
src/pic/services/storage/gcs.py 51 9 82%
src/pic/services/storage/local.py 54 2 96%
src/pic/services/storage/s3.py 59 3 95%
src/pic/services/url_safety.py 55 27 51%
src/pic/services/vector_store.py 28 7 75%
src/pic/worker/init.py 0 0 100%
src/pic/worker/cluster.py 14 0 100%
src/pic/worker/entrypoint.py 28 3 89%
src/pic/worker/gdrive_download.py 82 4 95%
src/pic/worker/gdrive_sync.py 51 2 96%
src/pic/worker/helpers.py 119 30 75%
src/pic/worker/image_processing.py 83 27 67%
src/pic/worker/ingest.py 44 3 93%
src/pic/worker/pipeline.py 29 29 0%
src/pic/worker/pipeline_discover.py 81 9 89%
src/pic/worker/pipeline_ingest.py 72 19 74%
src/pic/worker/url_ingest.py 158 43 73%
TOTAL 3088 450 85%
Required test coverage of 70.0% reached. Total coverage: 85.43%
=============== 344 passed, 80 deselected, 13 warnings in 31.29s ===============) reported:
- : 56%
- : 51%
- : 65%
- : 67%
- : 0%
Why this matters
These modules sit on ingestion and worker critical paths, so weak coverage increases regression risk in error handling and edge-case logic.
Suggested direction
- Add targeted unit tests for uncovered branches first
- Prioritize , , and
- Reassess whether some logic should be split further to improve testability
Summary
A few critical modules still have materially weaker automated coverage than the rest of the codebase.
Evidence
Unit coverage on 2026-03-16 (============================= test session starts ==============================
platform darwin -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/I336665/Vibe/PIC
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, asyncio-1.3.0, cov-7.0.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 424 items / 80 deselected / 344 selected
tests/unit/test_api_deps.py .. [ 0%]
tests/unit/test_api_endpoints.py ....................................... [ 11%]
............................................ [ 24%]
tests/unit/test_auth.py ............ [ 28%]
tests/unit/test_cluster_visualization.py ... [ 29%]
tests/unit/test_cluster_worker.py .... [ 30%]
tests/unit/test_clustering.py ..................... [ 36%]
tests/unit/test_clustering_pipeline.py ........ [ 38%]
tests/unit/test_config.py ................... [ 44%]
tests/unit/test_core.py ......... [ 46%]
tests/unit/test_database.py ....... [ 48%]
tests/unit/test_embedding.py ................. [ 53%]
tests/unit/test_entrypoint.py ...... [ 55%]
tests/unit/test_gdrive_api.py .. [ 56%]
tests/unit/test_gdrive_service.py ........ [ 58%]
tests/unit/test_gdrive_sync_worker.py ........... [ 61%]
tests/unit/test_helpers.py ........... [ 64%]
tests/unit/test_hnsw_migrations.py .... [ 65%]
tests/unit/test_image_store.py ............... [ 70%]
tests/unit/test_image_validation.py ... [ 71%]
tests/unit/test_ingest_worker.py .. [ 71%]
tests/unit/test_middleware.py ........ [ 74%]
tests/unit/test_modal_app.py ........... [ 77%]
tests/unit/test_modal_dispatch.py ......... [ 79%]
tests/unit/test_pipeline.py ............. [ 83%]
tests/unit/test_rate_limit.py .. [ 84%]
tests/unit/test_storage_base.py ........ [ 86%]
tests/unit/test_storage_factory.py ... [ 87%]
tests/unit/test_storage_gcs.py ....... [ 89%]
tests/unit/test_storage_local.py .......... [ 92%]
tests/unit/test_storage_s3.py ......... [ 95%]
tests/unit/test_types.py ....... [ 97%]
tests/unit/test_url_ingest.py ...... [ 98%]
tests/unit/test_vector_store.py .... [100%]
=============================== warnings summary ===============================
tests/unit/test_clustering.py: 10 warnings
/Users/I336665/Vibe/PIC/.venv/lib/python3.12/site-packages/sklearn/cluster/_hdbscan/hdbscan.py:722: FutureWarning: The default value of
copywill change from False to True in 1.10. Explicitly set a value forcopyto silence this warning.warn(
tests/unit/test_clustering.py::TestLevel2Clustering::test_returns_expected_structure
tests/unit/test_clustering.py::TestClusteringEdgeCases::test_cluster_level2_with_identical_embeddings
tests/unit/test_clustering.py::TestExtractedHelpers::test_reduce_dimensions_output_shape
/Users/I336665/Vibe/PIC/.venv/lib/python3.12/site-packages/umap/umap_.py:1952: UserWarning: n_jobs value 1 overridden to 1 by setting random_state. Use no seed for parallelism.
warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
______________ coverage: platform darwin, python 3.12.13-final-0 _______________
Name Stmts Miss Cover
src/pic/init.py 0 0 100%
src/pic/api/init.py 0 0 100%
src/pic/api/clusters.py 94 29 69%
src/pic/api/deps.py 63 1 98%
src/pic/api/gdrive.py 19 0 100%
src/pic/api/health.py 53 3 94%
src/pic/api/images.py 46 6 87%
src/pic/api/jobs.py 25 3 88%
src/pic/api/pipeline.py 30 5 83%
src/pic/api/products.py 114 3 97%
src/pic/api/router.py 20 0 100%
src/pic/api/search.py 56 9 84%
src/pic/config.py 150 14 91%
src/pic/core/init.py 0 0 100%
src/pic/core/auth.py 42 0 100%
src/pic/core/constants.py 9 0 100%
src/pic/core/database.py 55 7 87%
src/pic/core/exception_handlers.py 39 8 79%
src/pic/core/logging.py 21 0 100%
src/pic/core/metrics.py 12 0 100%
src/pic/core/middleware.py 98 12 88%
src/pic/core/rate_limit.py 17 2 88%
src/pic/main.py 55 8 85%
src/pic/migrations/versions/003_add_hnsw_vector_index.py 12 0 100%
src/pic/migrations/versions/015_tune_hnsw_index_params.py 14 0 100%
src/pic/modal_app.py 100 21 79%
src/pic/models/init.py 0 0 100%
src/pic/models/db.py 85 0 100%
src/pic/models/schemas.py 258 4 98%
src/pic/models/types.py 21 1 95%
src/pic/services/init.py 0 0 100%
src/pic/services/cluster_visualization.py 71 8 89%
src/pic/services/clustering.py 81 3 96%
src/pic/services/clustering_pipeline.py 73 0 100%
src/pic/services/embedding.py 99 35 65%
src/pic/services/gdrive.py 82 36 56%
src/pic/services/hash_utils.py 2 0 100%
src/pic/services/image_store.py 87 10 89%
src/pic/services/image_validation.py 7 0 100%
src/pic/services/modal_dispatch.py 40 2 95%
src/pic/services/storage/init.py 20 3 85%
src/pic/services/storage/base.py 10 0 100%
src/pic/services/storage/gcs.py 51 9 82%
src/pic/services/storage/local.py 54 2 96%
src/pic/services/storage/s3.py 59 3 95%
src/pic/services/url_safety.py 55 27 51%
src/pic/services/vector_store.py 28 7 75%
src/pic/worker/init.py 0 0 100%
src/pic/worker/cluster.py 14 0 100%
src/pic/worker/entrypoint.py 28 3 89%
src/pic/worker/gdrive_download.py 82 4 95%
src/pic/worker/gdrive_sync.py 51 2 96%
src/pic/worker/helpers.py 119 30 75%
src/pic/worker/image_processing.py 83 27 67%
src/pic/worker/ingest.py 44 3 93%
src/pic/worker/pipeline.py 29 29 0%
src/pic/worker/pipeline_discover.py 81 9 89%
src/pic/worker/pipeline_ingest.py 72 19 74%
src/pic/worker/url_ingest.py 158 43 73%
TOTAL 3088 450 85%
Required test coverage of 70.0% reached. Total coverage: 85.43%
=============== 344 passed, 80 deselected, 13 warnings in 31.29s ===============) reported:
Why this matters
These modules sit on ingestion and worker critical paths, so weak coverage increases regression risk in error handling and edge-case logic.
Suggested direction