kodit 0.5.6__tar.gz → 0.5.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.5.6 → kodit-0.5.7}/PKG-INFO +1 -1
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/index.md +1 -1
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/openapi.json +4 -2
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/_version.py +2 -2
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/commit_indexing_application_service.py +63 -3
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/protocols.py +11 -2
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/git_repository_service.py +36 -81
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/git_python_adaptor.py +18 -8
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/services/git_repository_service_test.py +3 -1
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git/git_python_adaptor_test.py +3 -7
- {kodit-0.5.6 → kodit-0.5.7}/.claude/commands/debug.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.claude/commands/new-requirement.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.claude/commands/refactor.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.claude/commands/update-docs.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.claude/settings.json +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.cursor/rules/style.mdc +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.dockerignore +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/dependabot.yml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/docker.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/docs.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.github/workflows/test.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.gitignore +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.python-version +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.vscode/launch.json +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/.vscode/settings.json +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/CLAUDE.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/Dockerfile +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/LICENSE +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/Makefile +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/README.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/alembic.ini +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/_index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/demos/_index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/demos/go-simple-microservice/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/demos/knock-knock-auth/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/developer/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/getting-started/_index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/_index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/templates/_content.md.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/templates/_example.md.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/templates/_object_schema.md.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/templates/_security_scheme.md.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/api/templates/api_doc_template.md.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/configuration/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/configuration/templates/template.j2 +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/deployment/docker-compose.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/deployment/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/deployment/kubernetes.yaml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/hosted-kodit/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/indexing/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/mcp/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/sync/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/docs/reference/troubleshooting/index.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/pyproject.toml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/.gitignore +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/app.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/factories/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/factories/reporting_factory.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/factories/server_factory.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/code_search_application_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/enrichment_query_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/indexing_worker_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/queue_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/reporting.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/sync_scheduler.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/cli.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/cli_utils.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/config.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/database.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/architecture.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/database_schema/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/database_schema/database_schema.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/discovery_notes.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/formatter.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/physical.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/development/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/development/development.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/development/snippet/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/development/snippet/snippet.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/enricher.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/enrichment.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/history/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/history/commit_description/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/history/commit_description/commit_description.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/history/history.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/request.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/response.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/api_docs.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/usage.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/entities/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/entities/git.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/errors.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/factories/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/factories/git_repo_factory.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/bm25_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/embedding_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/git_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/physical_architecture_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/services/task_status_query_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/tracking/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/tracking/resolution_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/tracking/trackable.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/value_objects.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/client/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/client/base.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/client/exceptions.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/client/generated_endpoints.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/client/search_client.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/middleware/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/middleware/auth.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/dependencies.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/query_params.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/commits.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/queue.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/repositories.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/search.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/commit.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/context.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/enrichment.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/queue.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/search.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/snippet.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/tag.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/task_status.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/bm25/local_bm25_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/working_copy.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/database_schema/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/database_schema/database_schema_detector.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_factory.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/batching.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/litellm_embedding_provider.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/local_vector_search_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/enricher_factory.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/litellm_enricher.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/local_enricher.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/null_enricher.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/enricher/utils.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/git/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/git/git_utils.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/ignore/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/indexing/fusion_service.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/mappers/task_mapper.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/mappers/task_status_mapper.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/formatters/narrative_formatter.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/providers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/providers/async_batch_processor.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/providers/litellm_provider.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/reporting/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/reporting/db_progress.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/reporting/log_progress.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/reporting/telemetry_progress.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/slicing/api_doc_extractor.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/slicing/ast_analyzer.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/slicing/slicer.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/embedding_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/enrichment_association_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/enrichment_v2_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/entities.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_branch_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_commit_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_file_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_tag_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/query.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/task_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/task_status_repository.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/unit_of_work.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/log.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/mcp.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/middleware.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/README +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/env.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/04b80f802e0c_foreign_key_review.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/19f8c7faf8b9_add_generic_enrichment_type.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/4552eb3f23ce_add_summary.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/4b1a3b2c8fa5_refactor_git_tracking.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/7f15f878c3a1_add_new_git_entities.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/85155663351e_initial.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/9cf0e87de578_add_queue.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/b9cd1c3fd762_add_task_status.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/migrations/versions/f9e5ef5e688f_add_git_commits_number.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/py.typed +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/utils/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/utils/dump_config.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/utils/dump_openapi.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/utils/generate_api_paths.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/src/kodit/utils/path_utils.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/conftest.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/docker-smoke.sh +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/code_search_application_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/commit_indexing_application_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/queue_service_get_task_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/queue_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/application/services/reporting_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/cli_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/bm25_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/embedding_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/entities_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/language_detection_service_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/e2e.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/bm25/local_bm25_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git_cloning/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git_cloning/working_copy_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/batching_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_factory_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/hash_embedding_provider_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/litellm_embedding_provider_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/local_embedding_provider_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/test_litellm_socket_providers.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/enricher/null_enricher_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/end_to_end_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/fixtures/simple_web_app/docker-compose.yml +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/formatters/narrative_formatter_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/providers/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/providers/litellm_provider_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/api_doc_extractor_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/ast_analyzer_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/main.c +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/models.c +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/models.h +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/utils.c +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/utils.h +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/main.cpp +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/models.cpp +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/models.hpp +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/utils.cpp +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/utils.hpp +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Main.cs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Models.cs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Utils.cs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/components.css +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/main.css +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/utilities.css +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore_test.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/main.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/models.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/utils.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/components.html +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/forms.html +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/main.html +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Main.java +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Models.java +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Utils.java +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/main.js +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/models.js +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/utils.js +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/main.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/models.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/submodule/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/submodule/main.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/utils.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/main.rs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/models.rs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/utils.rs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/slicer_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/csharp.cs +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/golang.go +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/javascript.js +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/knock_knock_server.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/python.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/typescript.tsx +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/embedding_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_branch_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_file_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_tag_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/task_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/task_status_repository_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/log_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/smoke.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/utils/__init__.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/utils/path_utils_test.py +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/tests/vectorchord-smoke.sh +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/understanding_architecture.md +0 -0
- {kodit-0.5.6 → kodit-0.5.7}/uv.lock +0 -0
|
@@ -12,7 +12,7 @@ look at the [hosted version](https://kodit.helix.ml/docs).
|
|
|
12
12
|
This is the REST API for the Kodit server. Please refer to the
|
|
13
13
|
[Kodit documentation](https://docs.helix.ml/kodit/) for more information.
|
|
14
14
|
|
|
15
|
-
Current version: 0.5.
|
|
15
|
+
Current version: 0.5.6
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "kodit API",
|
|
5
5
|
"description": "\nThis is the REST API for the Kodit server. Please refer to the\n[Kodit documentation](https://docs.helix.ml/kodit/) for more information.\n ",
|
|
6
|
-
"version": "0.5.
|
|
6
|
+
"version": "0.5.6"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/healthz": {
|
|
@@ -2496,7 +2496,9 @@
|
|
|
2496
2496
|
"kodit.commit.create_summary_enrichment",
|
|
2497
2497
|
"kodit.commit.create_summary_embeddings",
|
|
2498
2498
|
"kodit.commit.create_architecture_enrichment",
|
|
2499
|
-
"kodit.commit.create_public_api_docs"
|
|
2499
|
+
"kodit.commit.create_public_api_docs",
|
|
2500
|
+
"kodit.commit.create_commit_description",
|
|
2501
|
+
"kodit.commit.create_database_schema"
|
|
2500
2502
|
],
|
|
2501
2503
|
"title": "TaskOperation",
|
|
2502
2504
|
"description": "Task operation."
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
31
|
+
__version__ = version = '0.5.7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 5, 7)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
{kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/commit_indexing_application_service.py
RENAMED
|
@@ -37,7 +37,13 @@ from kodit.domain.enrichments.request import (
|
|
|
37
37
|
EnrichmentRequest as GenericEnrichmentRequest,
|
|
38
38
|
)
|
|
39
39
|
from kodit.domain.entities import Task
|
|
40
|
-
from kodit.domain.entities.git import
|
|
40
|
+
from kodit.domain.entities.git import (
|
|
41
|
+
GitCommit,
|
|
42
|
+
GitFile,
|
|
43
|
+
GitRepo,
|
|
44
|
+
SnippetV2,
|
|
45
|
+
TrackingType,
|
|
46
|
+
)
|
|
41
47
|
from kodit.domain.factories.git_repo_factory import GitRepoFactory
|
|
42
48
|
from kodit.domain.protocols import (
|
|
43
49
|
EnrichmentAssociationRepository,
|
|
@@ -278,6 +284,57 @@ class CommitIndexingApplicationService:
|
|
|
278
284
|
else:
|
|
279
285
|
raise ValueError(f"Unknown task type: {task.type}")
|
|
280
286
|
|
|
287
|
+
async def _process_files_in_batches(
|
|
288
|
+
self, cloned_path: Path, all_commits: list[GitCommit], batch_size: int = 100
|
|
289
|
+
) -> int:
|
|
290
|
+
"""Process file metadata for all commits in batches to avoid memory exhaustion.
|
|
291
|
+
|
|
292
|
+
This loads file metadata (paths, sizes, blob SHAs) in batches and saves them
|
|
293
|
+
incrementally to avoid holding millions of file objects in memory.
|
|
294
|
+
|
|
295
|
+
Args:
|
|
296
|
+
cloned_path: Path to the cloned repository
|
|
297
|
+
all_commits: List of all commits from scan
|
|
298
|
+
batch_size: Number of commits to process at once (default 100)
|
|
299
|
+
|
|
300
|
+
Returns:
|
|
301
|
+
Total number of files processed
|
|
302
|
+
|
|
303
|
+
"""
|
|
304
|
+
total_files = 0
|
|
305
|
+
commit_shas = [commit.commit_sha for commit in all_commits]
|
|
306
|
+
total_batches = (len(commit_shas) + batch_size - 1) // batch_size
|
|
307
|
+
|
|
308
|
+
self._log.info(
|
|
309
|
+
f"Processing files for {len(commit_shas)} commits "
|
|
310
|
+
f"in {total_batches} batches"
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
# Process commits in batches
|
|
314
|
+
for i in range(0, len(commit_shas), batch_size):
|
|
315
|
+
batch = commit_shas[i : i + batch_size]
|
|
316
|
+
batch_num = i // batch_size + 1
|
|
317
|
+
|
|
318
|
+
self._log.debug(
|
|
319
|
+
f"Processing batch {batch_num}/{total_batches} ({len(batch)} commits)"
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
# Get file metadata for this batch of commits
|
|
323
|
+
files = await self.scanner.process_files_for_commits_batch(
|
|
324
|
+
cloned_path, batch
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
# Save file metadata to database immediately
|
|
328
|
+
if files:
|
|
329
|
+
await self.git_file_repository.save_bulk(files)
|
|
330
|
+
total_files += len(files)
|
|
331
|
+
self._log.debug(
|
|
332
|
+
f"Batch {batch_num}: Saved {len(files)} files "
|
|
333
|
+
f"(total so far: {total_files})"
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
return total_files
|
|
337
|
+
|
|
281
338
|
async def process_clone_repo(self, repository_id: int) -> None:
|
|
282
339
|
"""Clone a repository."""
|
|
283
340
|
async with self.operation.create_child(
|
|
@@ -315,8 +372,11 @@ class CommitIndexingApplicationService:
|
|
|
315
372
|
await step.set_current(2, "Saving commits")
|
|
316
373
|
await self.git_commit_repository.save_bulk(scan_result.all_commits)
|
|
317
374
|
|
|
318
|
-
await step.set_current(3, "
|
|
319
|
-
await self.
|
|
375
|
+
await step.set_current(3, "Processing and saving files in batches")
|
|
376
|
+
total_files = await self._process_files_in_batches(
|
|
377
|
+
repo.cloned_path, scan_result.all_commits
|
|
378
|
+
)
|
|
379
|
+
self._log.info(f"Processed and saved {total_files} total files")
|
|
320
380
|
|
|
321
381
|
await step.set_current(4, "Saving branches")
|
|
322
382
|
if scan_result.branches:
|
|
@@ -4,6 +4,8 @@ from abc import ABC, abstractmethod
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any, Protocol, TypeVar
|
|
6
6
|
|
|
7
|
+
from git import Repo
|
|
8
|
+
|
|
7
9
|
from kodit.domain.enrichments.enrichment import EnrichmentAssociation, EnrichmentV2
|
|
8
10
|
from kodit.domain.entities import (
|
|
9
11
|
Task,
|
|
@@ -163,9 +165,16 @@ class GitAdapter(ABC):
|
|
|
163
165
|
|
|
164
166
|
@abstractmethod
|
|
165
167
|
async def get_commit_files(
|
|
166
|
-
self, local_path: Path, commit_sha: str
|
|
168
|
+
self, local_path: Path, commit_sha: str, repo: Repo
|
|
167
169
|
) -> list[dict[str, Any]]:
|
|
168
|
-
"""Get all files in a specific commit from the git tree.
|
|
170
|
+
"""Get all files in a specific commit from the git tree.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
local_path: Path to the repository
|
|
174
|
+
commit_sha: SHA of the commit to get files for
|
|
175
|
+
repo: Repo object to reuse (avoids creating new Repo per commit)
|
|
176
|
+
|
|
177
|
+
"""
|
|
169
178
|
|
|
170
179
|
@abstractmethod
|
|
171
180
|
async def get_commit_file_data(
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Domain services for Git repository scanning and cloning operations."""
|
|
2
2
|
|
|
3
|
-
import asyncio
|
|
4
3
|
import shutil
|
|
5
4
|
from dataclasses import dataclass
|
|
6
5
|
from datetime import UTC, datetime
|
|
@@ -66,51 +65,11 @@ class GitRepositoryScanner:
|
|
|
66
65
|
tags = await self._process_tags(cloned_path, commit_cache, repo_id)
|
|
67
66
|
self._log.info(f"Found {len(tags)} tags")
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
# Don't load all files into memory - return empty list
|
|
69
|
+
# Files will be processed in batches by the application service
|
|
70
|
+
self._log.info("Deferring file processing to avoid memory exhaustion")
|
|
71
71
|
|
|
72
|
-
return self._create_scan_result(branches, commit_cache, tags,
|
|
73
|
-
|
|
74
|
-
async def _process_commits_concurrently(
|
|
75
|
-
self,
|
|
76
|
-
cloned_path: Path,
|
|
77
|
-
commits_batch: list[tuple[str, dict[str, Any]]],
|
|
78
|
-
) -> dict[str, GitCommit]:
|
|
79
|
-
"""Process a batch of commits concurrently."""
|
|
80
|
-
batch_cache = {}
|
|
81
|
-
|
|
82
|
-
async def process_single_commit(
|
|
83
|
-
commit_sha: str, commit_data: dict[str, Any]
|
|
84
|
-
) -> tuple[str, GitCommit | None]:
|
|
85
|
-
git_commit = await self._create_git_commit_from_data(
|
|
86
|
-
cloned_path, commit_data
|
|
87
|
-
)
|
|
88
|
-
return commit_sha, git_commit
|
|
89
|
-
|
|
90
|
-
# Process commits concurrently in smaller batches
|
|
91
|
-
semaphore = asyncio.Semaphore(50) # Limit concurrent operations
|
|
92
|
-
|
|
93
|
-
async def bounded_process(
|
|
94
|
-
item: tuple[str, dict[str, Any]],
|
|
95
|
-
) -> tuple[str, GitCommit | None]:
|
|
96
|
-
async with semaphore:
|
|
97
|
-
return await process_single_commit(item[0], item[1])
|
|
98
|
-
|
|
99
|
-
# Process all commits concurrently
|
|
100
|
-
results = await asyncio.gather(
|
|
101
|
-
*[bounded_process(item) for item in commits_batch],
|
|
102
|
-
return_exceptions=True,
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
# Collect successful results
|
|
106
|
-
for result in results:
|
|
107
|
-
if isinstance(result, tuple):
|
|
108
|
-
# Type narrowing: result is now tuple[str, GitCommit | None]
|
|
109
|
-
commit_sha, git_commit = result
|
|
110
|
-
if git_commit is not None:
|
|
111
|
-
batch_cache[commit_sha] = git_commit
|
|
112
|
-
|
|
113
|
-
return batch_cache
|
|
72
|
+
return self._create_scan_result(branches, commit_cache, tags, [], cloned_path)
|
|
114
73
|
|
|
115
74
|
async def _process_branches_bulk(
|
|
116
75
|
self,
|
|
@@ -167,30 +126,6 @@ class GitRepositoryScanner:
|
|
|
167
126
|
|
|
168
127
|
return branches, commit_cache
|
|
169
128
|
|
|
170
|
-
async def _create_git_commit_from_data(
|
|
171
|
-
self, cloned_path: Path, commit_data: dict[str, Any], repo_id: int | None = None
|
|
172
|
-
) -> GitCommit | None:
|
|
173
|
-
"""Create GitCommit from pre-fetched commit data."""
|
|
174
|
-
commit_sha = commit_data["sha"]
|
|
175
|
-
|
|
176
|
-
# Get files for this commit
|
|
177
|
-
files_data = await self.git_adapter.get_commit_files(cloned_path, commit_sha)
|
|
178
|
-
self._create_git_files(cloned_path, files_data, commit_sha)
|
|
179
|
-
author = self._format_author_from_data(commit_data)
|
|
180
|
-
|
|
181
|
-
# Cache datetime creation
|
|
182
|
-
created_at = datetime.now(UTC)
|
|
183
|
-
|
|
184
|
-
return GitCommit(
|
|
185
|
-
created_at=created_at,
|
|
186
|
-
commit_sha=commit_sha,
|
|
187
|
-
repo_id=repo_id or 0, # Use 0 as default if not provided
|
|
188
|
-
date=commit_data["date"],
|
|
189
|
-
message=commit_data["message"],
|
|
190
|
-
parent_commit_sha=commit_data["parent_sha"],
|
|
191
|
-
author=author,
|
|
192
|
-
)
|
|
193
|
-
|
|
194
129
|
def _format_author_from_data(self, commit_data: dict[str, Any]) -> str:
|
|
195
130
|
"""Format author string from commit data."""
|
|
196
131
|
author_name = commit_data.get("author_name", "")
|
|
@@ -376,17 +311,18 @@ class GitRepositoryScanner:
|
|
|
376
311
|
branches: list[GitBranch],
|
|
377
312
|
commit_cache: dict[str, GitCommit],
|
|
378
313
|
tags: list[GitTag],
|
|
379
|
-
all_files: list[GitFile],
|
|
314
|
+
all_files: list[GitFile], # noqa: ARG002
|
|
315
|
+
cloned_path: Path | None = None, # noqa: ARG002
|
|
380
316
|
) -> RepositoryScanResult:
|
|
381
317
|
"""Create final scan result."""
|
|
382
|
-
# Files
|
|
318
|
+
# Files list is empty to avoid memory issues - will be processed in batches
|
|
383
319
|
scan_result = RepositoryScanResult(
|
|
384
320
|
branches=branches,
|
|
385
321
|
all_commits=list(commit_cache.values()),
|
|
386
322
|
scan_timestamp=datetime.now(UTC),
|
|
387
|
-
total_files_across_commits=
|
|
323
|
+
total_files_across_commits=0, # Will be updated after batch processing
|
|
388
324
|
all_tags=tags,
|
|
389
|
-
all_files=
|
|
325
|
+
all_files=[], # Empty - processed in batches to avoid memory exhaustion
|
|
390
326
|
)
|
|
391
327
|
|
|
392
328
|
self._log.info(
|
|
@@ -395,16 +331,35 @@ class GitRepositoryScanner:
|
|
|
395
331
|
)
|
|
396
332
|
return scan_result
|
|
397
333
|
|
|
398
|
-
async def
|
|
399
|
-
self, cloned_path: Path,
|
|
334
|
+
async def process_files_for_commits_batch(
|
|
335
|
+
self, cloned_path: Path, commit_shas: list[str]
|
|
400
336
|
) -> list[GitFile]:
|
|
401
|
-
"""Process files for a
|
|
337
|
+
"""Process files for a batch of commits.
|
|
338
|
+
|
|
339
|
+
This allows the application service to process files in batches
|
|
340
|
+
to avoid loading millions of files into memory at once.
|
|
341
|
+
|
|
342
|
+
CRITICAL: Reuses a single Repo object to avoid creating 32K+ Repo instances
|
|
343
|
+
which would consume massive memory (1-2 MB each).
|
|
344
|
+
"""
|
|
345
|
+
from git import Repo
|
|
346
|
+
|
|
347
|
+
# Open repo once and reuse for all commits in this batch
|
|
348
|
+
repo = Repo(cloned_path)
|
|
402
349
|
files = []
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
350
|
+
|
|
351
|
+
try:
|
|
352
|
+
for commit_sha in commit_shas:
|
|
353
|
+
files_data = await self.git_adapter.get_commit_files(
|
|
354
|
+
cloned_path, commit_sha, repo=repo
|
|
355
|
+
)
|
|
356
|
+
files.extend(
|
|
357
|
+
self._create_git_files(cloned_path, files_data, commit_sha)
|
|
358
|
+
)
|
|
359
|
+
finally:
|
|
360
|
+
# Explicitly close the repo to free resources
|
|
361
|
+
repo.close()
|
|
362
|
+
|
|
408
363
|
return files
|
|
409
364
|
|
|
410
365
|
|
|
@@ -346,14 +346,22 @@ class GitPythonAdapter(GitAdapter):
|
|
|
346
346
|
)
|
|
347
347
|
|
|
348
348
|
async def get_commit_files(
|
|
349
|
-
self, local_path: Path, commit_sha: str
|
|
349
|
+
self, local_path: Path, commit_sha: str, repo: Repo
|
|
350
350
|
) -> list[dict[str, Any]]:
|
|
351
|
-
"""Get all files in a specific commit from the git tree.
|
|
351
|
+
"""Get all files in a specific commit from the git tree.
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
local_path: Path to the repository
|
|
355
|
+
commit_sha: SHA of the commit to get files for
|
|
356
|
+
repo: Repo object to reuse (avoids creating new Repo per commit)
|
|
357
|
+
|
|
358
|
+
"""
|
|
352
359
|
|
|
353
360
|
def _get_files() -> list[dict[str, Any]]:
|
|
354
361
|
try:
|
|
355
|
-
repo
|
|
356
|
-
|
|
362
|
+
# Use the provided repo object
|
|
363
|
+
_repo = repo
|
|
364
|
+
commit = _repo.commit(commit_sha)
|
|
357
365
|
|
|
358
366
|
files = []
|
|
359
367
|
|
|
@@ -395,7 +403,11 @@ class GitPythonAdapter(GitAdapter):
|
|
|
395
403
|
"""Get file metadata for a commit, with files checked out to disk."""
|
|
396
404
|
await self._checkout_commit(local_path, commit_sha)
|
|
397
405
|
try:
|
|
398
|
-
|
|
406
|
+
repo = Repo(local_path)
|
|
407
|
+
try:
|
|
408
|
+
return await self.get_commit_files(local_path, commit_sha, repo)
|
|
409
|
+
finally:
|
|
410
|
+
repo.close()
|
|
399
411
|
finally:
|
|
400
412
|
await self.restore_to_branch(local_path, "main")
|
|
401
413
|
|
|
@@ -570,6 +582,4 @@ class GitPythonAdapter(GitAdapter):
|
|
|
570
582
|
else:
|
|
571
583
|
return diff_text
|
|
572
584
|
|
|
573
|
-
return await asyncio.get_event_loop().run_in_executor(
|
|
574
|
-
self.executor, _get_diff
|
|
575
|
-
)
|
|
585
|
+
return await asyncio.get_event_loop().run_in_executor(self.executor, _get_diff)
|
|
@@ -124,7 +124,9 @@ async def test_git_repository_scanner_scan_repository(
|
|
|
124
124
|
assert len(result.branches) == 2
|
|
125
125
|
assert len(result.all_commits) == 2
|
|
126
126
|
assert len(result.all_tags) == 1
|
|
127
|
-
|
|
127
|
+
# Files are processed in batches by application service to avoid memory issues
|
|
128
|
+
assert result.total_files_across_commits == 0
|
|
129
|
+
assert len(result.all_files) == 0
|
|
128
130
|
|
|
129
131
|
# Verify branches
|
|
130
132
|
branch_names = {branch.name for branch in result.branches}
|
{kodit-0.5.6 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git/git_python_adaptor_test.py
RENAMED
|
@@ -128,9 +128,7 @@ async def test_pull_repository_failure(git_adapter: GitPythonAdapter) -> None:
|
|
|
128
128
|
local_path = Path("/tmp/test-repo")
|
|
129
129
|
|
|
130
130
|
with patch(f"{MODULE_PATH}.Repo") as mock_repo_class:
|
|
131
|
-
mock_repo_class.side_effect = InvalidGitRepositoryError(
|
|
132
|
-
"Not a git repository"
|
|
133
|
-
)
|
|
131
|
+
mock_repo_class.side_effect = InvalidGitRepositoryError("Not a git repository")
|
|
134
132
|
|
|
135
133
|
with pytest.raises(InvalidGitRepositoryError):
|
|
136
134
|
await git_adapter.pull_repository(local_path)
|
|
@@ -322,7 +320,7 @@ async def test_get_commit_files(git_adapter: GitPythonAdapter) -> None:
|
|
|
322
320
|
mock_repo.commit.return_value = mock_commit
|
|
323
321
|
mock_repo_class.return_value = mock_repo
|
|
324
322
|
|
|
325
|
-
result = await git_adapter.get_commit_files(local_path, commit_sha)
|
|
323
|
+
result = await git_adapter.get_commit_files(local_path, commit_sha, mock_repo)
|
|
326
324
|
|
|
327
325
|
# Should return empty list since no blobs
|
|
328
326
|
assert result == []
|
|
@@ -348,9 +346,7 @@ async def test_repository_exists_false(git_adapter: GitPythonAdapter) -> None:
|
|
|
348
346
|
local_path = Path("/tmp/test-repo")
|
|
349
347
|
|
|
350
348
|
with patch(f"{MODULE_PATH}.Repo") as mock_repo_class:
|
|
351
|
-
mock_repo_class.side_effect = InvalidGitRepositoryError(
|
|
352
|
-
"Not a git repository"
|
|
353
|
-
)
|
|
349
|
+
mock_repo_class.side_effect = InvalidGitRepositoryError("Not a git repository")
|
|
354
350
|
|
|
355
351
|
result = await git_adapter.repository_exists(local_path)
|
|
356
352
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kodit-0.5.6 → kodit-0.5.7}/src/kodit/application/services/code_search_application_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/database_schema/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kodit-0.5.6 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/discovery_notes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|