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: mock get_model in tests to avoid API key requirement in CI
ebc6429 -
fix: address CodeRabbit Phase 7 nitpicks
- Add truncation helper to avoid ellipsis on short messages - Verify query and evidence args in test_hypothesis_agenta6398e4 -
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 -
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(ci): add E402/RUF100 to ignore for cross-env compatibility
- Add E402 to global ignore (pytest.importorskip pattern) - Add RUF100 to global ignore (ruff version differences) - Remove now-unnecessary noqa commentsecbc47b -
fix(ci): skip agent tests when agent-framework not installed
- Remove uv.sources that references local-only reference_repos - Add pytest.importorskip to agent wrapper tests - CI will skip 7 agent tests, run remaining 31 tests5a82171 -
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: 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 -
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 -
feat(phase2): add sample_evidence fixture to conftest.py
Now that models.py exists (Phase 2 complete), enable the sample_evidence fixture for use in Phase 3 judge tests.2457ae0 -
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