Spaces:
Sleeping
Sleeping
Commit History
-
feat: SPEC_01 (Termination) + SPEC_02 (E2E Tests) implementation (#66)β
Unverified signature* docs: sync documentation with codebase reality - Fix test count 127β142+ (index.md) - Fix OpenAI model gpt-5.1βgpt-5 to match config.py (CLAUDE.md) - Mark phases 13-14 as COMPLETE (roadmap.md) - Auto-format 2 test files (ruff) * docs: add specs for P0 termination fix and P1 E2E testing SPEC_01: Demo Termination Fix - Investigate if max_round_count actually works - Add hard timeout (5 min) for hackathon - Add round progress indicator SPEC_02: E2E Testing - Smoke tests (does it run?) - Structure tests (is output valid?) - Quality tests (is output useful?) - Must pass BEFORE adding new features (OpenAlex, etc.) * docs: fix spec accuracy (line numbers and test counts) SPEC_01: Line reference 112 β 110 (actual location of .with_standard_manager) SPEC_02: Test count 142 β 140 (verified with pytest --collect-only) Both specs now match codebase exactly per audit verification. * feat: Implement SPEC_01 (Termination) and SPEC_02 (E2E Tests) - SPEC_01: Added timeout (300s) and progressβ¦0257d2f -
fix: P0/P1/P2 - Gradio crash, UX improvements, thinking state (#61)β
Unverified signature* fix: handle None parameters from Gradio example caching (P0) Root cause: Gradio passes None for missing example columns during startup caching, overriding Python default values. Line 131 called .strip() on None, crashing the HuggingFace Space. Fix: Add defensive None handling before .strip(): api_key_str = api_key or "" api_key_state_str = api_key_state or "" Added tests to prevent regression. * fix: multiple UX improvements (P1 bugs) 1. HSDD acronym spelled out (Hypoactive Sexual Desire Disorder) 2. Added loading indicator ("Processing...") for immediate feedback 3. Removed temperature settings from magentic agents for reasoning model compatibility (o3, o1 only support temperature=1) 4. Bug report documenting remaining issues (API key persistence) 140 tests passing. * fix: enhance UX with "thinking" state and API key persistence 1. Added a "thinking" state yield before blocking calls in Magentic orchestrator to improve user feedback during long processing times. 2. Upβ¦6b5e05b
-
feat: add hierarchical orchestration with web search (integrates PR #44) (#46)β
Unverified signature* feat: add hierarchical orchestration with web search (from PR #44) Based on contribution by @EmployeeNo427 with fixes: New features: - WebSearchTool using DuckDuckGo for web searches - SubIterationMiddleware for research loop pattern - HierarchicalOrchestrator with judge-based refinement - RetrievalAgent for web-based evidence gathering - CodeExecutorAgent for Modal sandbox execution - LLMSubIterationJudge for LLM-based assessment - src/state/ package for state management Fixes applied: - Added chroma_db/ to .gitignore (was committed as binaries) - Added structlog logging per coding guidelines - Added pytest markers to new tests - Fixed silent exception swallowing in orchestrator - Preserved dual-mode architecture from PR #45 - Added "web" to SourceName type - Fixed mypy type errors Co-authored-by: EmployeeNo427 <45109567+EmployeeNo427@users.noreply.github.com> * fix: resolve mypy type errors in middleware and agents * fix: remove type argument from SubIterationTeam --------- β¦20f762e -
feat: add roadmap summary and detailed improvement plans for data sourcesβ
- Introduced new documentation files outlining the current state and future improvements for DeepCritical's data sources: PubMed, ClinicalTrials.gov, Europe PMC, and OpenAlex. - Each document includes sections on current implementation, strengths, limitations, recommended improvements, and integration opportunities. - Added a comprehensive roadmap summary to guide future maintainers and enhance project maintainability.9286db5 -
fix: address CodeRabbit feedback and CI failureβ
- Mock check_magentic_requirements in tests to run without OPENAI_API_KEY - Update stale "biorxiv" comment in models.py per CodeRabbit suggestion CI was failing because MagenticOrchestrator requires OPENAI_API_KEY, which exists locally in .env but not in CI environment.2ff16a3 -
fix(magentic): defensive text extraction & cleanup biorxiv refsβ
Add _extract_text to fix ChatMessage object output bug. Update bioRxiv strings to Europe PMC. Add regression test.3bfd42c -
fix(config): increase max iterations to 10β
Addressed P0-004 by increasing default max_iterations from 5 to 10 to allow deep search loops to complete successfully.72b2667 -
refactor(tools): replace BioRxiv with Europe PMC (Phase 01)β
Replaced broken BioRxivTool with EuropePMCTool which supports keyword search. Updated all agents, MCP tools, and examples to use the new tool. Deleted legacy BioRxiv implementation.2f8ae1f
-
fix: make ResearchReport.references optional with defaultβ
The LLM doesn't always return the references field, causing validation failures. Adding default_factory=list makes it optional. TDD: Added tests/unit/utils/test_models.py with coverage for this case. Fixes #23f882609 -
feat: implement phase 13 modal pipeline integration
7cc8b69 -
feat: Phase 11 bioRxiv Preprint Integration (#19)β
Unverified signature* feat: Implement Phase 11 (bioRxiv Preprint Integration) * chore: add .mypy_cache to .gitignore * fix: address CodeRabbit review feedback for bioRxiv tool - Catch httpx.RequestError for network failures (major issue) - Use SourceName type alias in Citation model (DRY) - Only add '...' suffix when abstract is truncated - Add test for network error handlinge67c99f -
refactor: address CodeRabbit nitpicks for Phase 10β
- Centralize SourceName type alias in models.py - Update search_handler.py to use SourceName (reduces cast brittleness) - Update app.py intro text to mention ClinicalTrials.gov - Update run_search.py docstring for multi-source search - DRY test setup with mock_requests_get fixture - Speed up error test by patching tenacity retry stop condition1bc9785 -
feat: Implement Phase 10 (ClinicalTrials.gov) with requests
4e2ccbf -
feat: Complete Phase 9 Source Cleanup (Remove WebTool) (#14)β
* feat: complete Phase 9 source cleanup - Removed WebTool (src/tools/websearch.py) and related tests - Updated SearchHandler and models to support only PubMed - Refactored all examples and tests to remove web search dependencies - Added verification tests to ensure no WebTool references remain - Fixed all unit tests to align with strict 'pubmed' source typing * fix: address CodeRabbit review feedback - Deduplicate tenacity dependency in pyproject.toml - Remove 'and web' from search agent description - Normalize Citation source to 'pubmed' in search agent - Update app.py markdown to remove web search references - Update embeddings demo with realistic PubMed URL/author - Enhance SearchHandler tests to verify multi-tool aggregation * refactor: replace mock data with real PubMed data in embeddings demo * fix: address CodeRabbit review feedback - Fix nested test_search_handler_pubmed_only (was inside another test, never ran) - Improve test_no_webtool_references to catch `from src.toolβ¦cd004e1
-
fix: address all CodeRabbit Phase 8 review feedbackβ
Actionable issue: - Forward additional_properties in run_stream for consistent metadata Nitpicks addressed: - Report event now uses actual agent message instead of hardcoded text - Citation validator: documented in-place mutation, use exact title match - Log truncation uses constant _MAX_URL_DISPLAY_LENGTH - Test asserts final_report is stored - Handle empty lists in markdown (hypotheses, drugs, limitations, refs) - Edge case: show "Untested" when supported==contradicted==0 - Document citations field in ReportSection as reserved for future usef1e4e5b -
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 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 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: linting and types for phase 5
1922dbd -
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 -
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): implement search slice (PubMed, Web, Orchestrator) (#4)β
Implemented search tools with strict TDD and scatter-gather pattern. 100% test coverage.499170b