Spaces:
Build error
Build error
Commit History
-
fix: apply lazy init pattern and pydantic-ai fixes to ReportAgent (#12)
Applies the same fixes as Phase 7 HypothesisAgent: - Lazy initialization via _get_agent() to avoid API key requirement at import - Use output_type instead of result_type (pydantic-ai API) - Use result.output instead of result.data - Fix line length issues in tests - Proper mocking of get_model in tests3139749 -
fix: address CodeRabbit Phase 7 nitpicks
- Add truncation helper to avoid ellipsis on short messages - Verify query and evidence args in test_hypothesis_agenta6398e4 -
fix: address CodeRabbit Phase 7 review feedback
- Lazy initialize HypothesisAgent's pydantic-ai Agent to avoid requiring API keys at import time (fixes CI failure) - Add explicit default=None to primary_hypothesis field for Pydantic v2 compliancebc74531 -
feat(phase7): implement Hypothesis Agent for mechanistic reasoning
Add HypothesisAgent that generates Drug → Target → Pathway → Effect hypotheses based on collected evidence. Key features: Models: - MechanismHypothesis: structured hypothesis with confidence scoring - HypothesisAssessment: container for hypotheses with knowledge gaps Utilities: - MMR (Maximal Marginal Relevance) for diverse evidence selection - Sentence-aware truncation for clean text processing Agent: - HypothesisAgent generates 2-4 testable hypotheses per query - Integrated with EmbeddingService for semantic evidence selection Orchestrator: - Refactored MagenticOrchestrator into smaller methods - Added "hypothesizing" event type for UI feedback - Workflow: Search → Hypothesize → Targeted Search → Judge Tests: 53/53 passing, mypy clean, ruff cleanc690006 -
fix: address CodeRabbit Phase 6 review feedback
- Dockerfile: Add curl for HEALTHCHECK, use specific extras (not --all-extras) - app.py: Tighten Magentic mode key detection to require OpenAI specifically - embeddings.py: Move structlog import to module level - test_embeddings.py: Remove redundant numpy import506a9c0 -
fix: address CodeRabbit Phase 5 review feedback
Critical fixes: - Fix invalid model names (gpt-5.1 → gpt-4o, claude-sonnet-4-5 → claude-sonnet-4-20250514) - Add OpenAI key validation in MagenticOrchestrator with clear error message - Document Magentic mode's OpenAI-only requirement Nitpicks: - Add streaming icon to AgentEvent.to_markdown() - Use exact equality for PubMed placeholder detection - Update app.py info text for API key requirements - Add language identifiers to markdown code blocks in docsd247864 -
fix(phase6): critical fixes from senior audit
- Fix Dockerfile cache ownership (run model download as appuser) - Store full citation metadata in vector DB (title, date, authors) - Remove fragile locals() hack in search_agent.py - Add try/except in deduplicate loop for resilience - Document threshold semantics (cosine distance math) - Clean up redundant list() calls59afc84 -
feat(phase6): Embeddings & Semantic Search implementation
- Added EmbeddingService with ChromaDB and SentenceTransformers - Updated SearchAgent to support semantic deduplication and search - Updated MagenticOrchestrator to use embeddings if available - Added 100% async-safe implementation with run_in_executor - Added comprehensive unit tests3bacbf8 -
fix(phase5): align configs and add agent tests
- Add PLR0912, PLC0415 to ruff ignore list for complex orchestrator logic - Disable warn_unused_ignores in mypy (vendored lib needs type: ignore) - Fix single ChatMessage input handling in SearchAgent/JudgeAgent - Add comprehensive unit tests for SearchAgent and JudgeAgent wrappers - All 38 tests pass, lint and mypy clean, pre-commit aligned15459e9 -
fix: linting and types for phase 5
1922dbd -
fix: pass API keys explicitly to pydantic-ai providers
- Use OpenAIProvider and AnthropicProvider with explicit api_key - Removes need for users to source .env or export vars manually - Update default OpenAI model to gpt-5.1 - Frictionless UX: just add keys to .env and run examples1f96735 -
fix: pydantic-ai v1 compatibility and Anthropic model update
- Use result.output instead of deprecated result.data (pydantic-ai v1) - Update Anthropic model to claude-sonnet-4-5 - Remove redundant cast in judges.py - Add orchestrator_demo example for end-to-end testing - Fix NCBI_API_KEY placeholder handling in pubmed.py - Update tests to use .output instead of .data4732667 -
refactor(phase4): address CodeRabbit review
- Pin uv version in Dockerfile and add non-root user - Use OrchestratorConfig for timeout in app.py - Use timezone.utc for timestamps in models.py36983ae -
feat(phase4): Orchestrator and UI complete
25c3a8b -
fix: add type ignore comment for Agent instantiation in JudgeHandler
Updated the Agent instantiation in JudgeHandler to include a type ignore comment, addressing type-checking issues while maintaining functionality.9760706 -
fix(tests): resolve mypy divergence and test failures
- Add pydantic-ai to pre-commit mypy dependencies to fix divergence between local mypy and CI (both now recognize Agent overloads) - Fix JudgeHandler tests to mock get_model() which instantiates OpenAIModel at import time (requires API key)95d2e29 -
feat(phase3): implement judge slice (LLM Judge, Prompts, Models)
Implemented LLM-based Judge Agent with PydanticAI for structured output. Includes 100% test coverage and fallback mechanisms.d7e5abb -
fix(phase2): address CodeRabbit review feedback + add examples
CodeRabbit fixes: - Fix deprecated asyncio.get_event_loop() → get_running_loop() - Remove dead flatten() function from search_handler.py - Remove redundant getattr() in pubmed.py - Add truncation rationale comments New: - Add examples/search_demo/ with run_search.py demo script - Add examples/README.md32e3b61 -
fix: resolve mypy divergence between make check and pre-commit
- Add tenacity>=8.2 to pre-commit mypy additional_dependencies - Remove now-unnecessary type: ignore comment from pubmed.py Root cause: pre-commit mypy was missing tenacity, so it couldn't resolve the @retry decorator's type signature.cace02f -
feat(phase2): implement search slice (PubMed, Web, Orchestrator) (#4)
Implemented search tools with strict TDD and scatter-gather pattern. 100% test coverage.499170b -
feat(phase1): Foundation & Tooling complete
* feat: initialize deepcritical project structure with core configuration and main functionality - Added initial project files including `.python-version`, `pyproject.toml`, and main application logic in `main.py`. - Implemented application configuration using Pydantic in `src/utils/config.py` with environment variable support. - Created directory structure for source code and tests, including placeholders for agents, prompts, tools, and utilities. - Added unit tests for configuration loading and validation in `tests/unit/utils/test_config.py`. Review Score: 100/100 (Ironclad Gucci Banger Edition) * feat(phase1): complete foundation with Python 3.11, tests, and tooling - Fix Python version to 3.11 for HuggingFace Spaces compatibility - Add config.py with pydantic-settings for typed configuration - Add exceptions.py with custom exception hierarchy - Add conftest.py with test fixtures (sample_evidence deferred to Phase 2) - Add .env.example and .pre-commit-config.yaml - Remove refere…069f0a0
-
adds scaffolding
Joseph Pollack1465eef -
adds scaffolding
Joseph Pollack6fbbcda