Conversation
The write queue processor in _execute_write_with_retry could use the writer connection concurrently with begin_transaction, both accessing the same SQLite connection without mutual exclusion. This caused intermittent "cannot start a transaction within a transaction" errors under concurrent write load. Wrap _ensure_writer_connection and execute calls inside _writer_lock to ensure all write paths are serialized through a single lock. Refactor test_concurrent_mixed_operations into separate phases to avoid mixing begin_transaction and execute_write paths in the same asyncio.gather call. Replace asyncio.sleep fixture cleanup with event-based wait_for_shutdown_complete for reliable teardown.
…nvention The .dev suffix was misleading since these files build the same image as GHCR for local testing, not development-specific configurations. The .local suffix clearly indicates local-build alternatives to GHCR pull. Changes: - Rename 3 docker-compose.*.ollama.dev.yml to *.ollama.local.yml - Add Docker Compose File Naming Convention section to CLAUDE.md - Add Local Build Alternatives and Building from Source to docker.md - Update env example headers to reference both GHCR and local variants - Add Ollama sidecar clarifying comments to GHCR compose files - Update gpu-acceleration.md file references - Expand docker.md reference table with Image Source column
…try, and batch content_type drift Fix three bugs discovered during comprehensive codebase audit: B3 - Quoted phrases like "error handling" were split into individual words by _prepare_hybrid_fts_query, losing phrase semantics in boolean mode. Switch tokenization from str.split() to re.findall() with a pattern that preserves quoted phrases as single tokens. B1 - update_context appended an embedding generation task without checking whether an embedding provider was configured, unlike store_context which already had this guard. Add the missing get_embedding_provider() is not None check. B5 - update_context required both "data" and "mime_type" fields for image attachments, while store_context only required "data" and defaulted mime_type to "image/png". Align update_context to match by defaulting mime_type when absent. B6 - update_context_batch did not auto-correct content_type when images were not explicitly changed but text or metadata was updated. Add content_type auto-correction in both atomic and non-atomic paths.
…tegration Add 76 new tests across 17 test files covering the bug fixes from the previous commit and broadening overall test coverage. New test file: tests/tools/test_descriptions.py validates discovery tool edge cases for backend-specific dynamic tool descriptions. Repository coverage: extend tests for context, tag, image, statistics, and FTS repositories with edge case and boundary condition tests. Tool coverage: add tests for hybrid search quoted phrase preservation, update_context embedding guard and image validation, bulk operation content_type correction, reranking fallback paths, batch summary async mocking, generation-first transactional integrity, and tool error handling adjustments. Integration coverage: add 15 new integration test methods to test_real_server.py covering list_threads, embedding regeneration on update, batch dedup, hybrid search degradation, multimodal auto-detection, FTS stemming, FTS NOT exclusion, RRF ordering, explain_query, and health endpoint. Mock-based PostgreSQL coverage: add tests for query builder array_contains operator branches, LangSmith tracing wrapper behavior, and FTS query transformation edge cases.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||
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.
No description provided.