Conversation
|
@copilot besides removing old code, what other changes did this PR make? |
|
@caue-paiva I've opened a new pull request, #73, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy app.ai fact-checking pipeline and related playground/endpoint code, migrating remaining references to the newer app.agentic_ai implementation and adding supporting utilities/tests.
Changes:
- Deleted the deprecated
app.aipipeline modules, web-search integration, and their tests/docs. - Removed old FastAPI endpoints (
research,test) and the playground Google search CLI. - Updated imports to
app.agentic_aiand introduced link-extraction + domain-specific news scrapers with new tests.
Reviewed changes
Copilot reviewed 68 out of 71 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/playground/google_factcheck_cli.py | Update gatherer import to app.agentic_ai. |
| scripts/playground/google/google_search_cli.py | Remove deprecated Google search playground CLI. |
| conftest.py | Add test-time sys.path root injection. |
| app/main.py | Remove old routers; only include scraping and text. |
| app/api/endpoints/test.py | Remove dev/test endpoints module. |
| app/api/endpoints/scraping.py | Switch scraper import to app.agentic_ai. |
| app/api/endpoints/research.py | Remove research endpoint module. |
| app/api/endpoints/init.py | Export only scraping and text. |
| app/ai/utils.py | Remove legacy pipeline utility module. |
| app/ai/tests/fixtures/mock_pipelinesteps.py | Remove legacy pipeline test fixtures. |
| app/ai/pipeline/utils.py | Remove legacy pipeline utilities. |
| app/ai/pipeline/tests/no_claims_fallback_test.py | Remove legacy integration tests. |
| app/ai/pipeline/tests/fixtures/mock_linkexpander.py | Remove legacy link expander fixture. |
| app/ai/pipeline/tests/adjudication_with_search_test.py | Remove legacy search-adjudication tests. |
| app/ai/pipeline/tests/init.py | Remove legacy tests package init. |
| app/ai/pipeline/tests/README.md | Remove legacy tests documentation. |
| app/ai/pipeline/steps.py | Remove legacy PipelineSteps interface/implementation. |
| app/ai/pipeline/no_claims_fallback.py | Remove legacy no-claims fallback step. |
| app/ai/pipeline/link_context_expander.py | Remove legacy link context expansion step. |
| app/ai/pipeline/evidence_retrieval.py | Remove legacy evidence retrieval step. |
| app/ai/pipeline/claim_extractor.py | Remove legacy claim extraction step. |
| app/ai/pipeline/adjudication_with_search.py | Remove legacy adjudication-with-search step. |
| app/ai/pipeline/init.py | Remove legacy pipeline re-exports. |
| app/ai/pipeline/README.md | Remove legacy pipeline documentation. |
| app/ai/main_pipeline.py | Remove legacy pipeline orchestration. |
| app/ai/log_utils.py | Remove legacy pipeline logging utilities. |
| app/ai/context/web/web_search_gatherer.py | Remove legacy web search gatherer. |
| app/ai/context/web/tests/test_serper_search.py | Remove legacy Serper tests. |
| app/ai/context/web/tests/test_google_search_fallback.py | Remove legacy Google→Serper fallback tests. |
| app/ai/context/web/tests/init.py | Remove legacy web tests init. |
| app/ai/context/web/serper_search.py | Remove legacy Serper client. |
| app/ai/context/web/google_search.py | Remove legacy Google search client. |
| app/ai/context/web/init.py | Remove legacy web context exports. |
| app/ai/context/web/CLAUDE.MD | Remove legacy web-search documentation. |
| app/ai/context/protocol.py | Remove legacy EvidenceGatherer protocol. |
| app/ai/context/init.py | Remove legacy context exports. |
| app/ai/async_code.py | Remove legacy parallel/streaming pipeline utilities. |
| app/ai/init.py | Remove legacy app.ai package exports. |
| app/ai/PIPELINE.md | Remove legacy pipeline architecture doc. |
| app/ai/CLAUDE.md | Remove legacy LangChain guide doc. |
| app/agentic_ai/utils/link_expander.py | Update scraper/model imports to app.agentic_ai. |
| app/agentic_ai/tools/web_search.py | Update tool docstring to reflect custom search server usage. |
| app/agentic_ai/tools/page_scraper.py | Update scraper import to app.agentic_ai. |
| app/agentic_ai/tools/fact_check_search.py | Update fact-check parsing import to app.agentic_ai. |
| app/agentic_ai/tests/nodes/test_link_expander.py | Update model import to app.agentic_ai. |
| app/agentic_ai/tests/nodes/test_extract_links.py | Add tests for new link-extraction helper. |
| app/agentic_ai/nodes/format_input.py | Inline extract_links() and remove dependency on deleted legacy module. |
| app/agentic_ai/context/web/tests/test_news_scrapers.py | Update test imports/patch targets to app.agentic_ai. |
| app/agentic_ai/context/web/news_scrapers.py | Add domain-specific scrapers (G1/Estadão/Folha/AosFatos). |
| app/agentic_ai/context/web/models.py | Add WebContentResult + SocialMediaMetadata models. |
| app/agentic_ai/context/web/apify_utils.py | Switch news scraper imports to app.agentic_ai. |
| app/agentic_ai/context/web/init.py | Add package init docstring. |
| app/agentic_ai/context/factcheckapi/tests/google_factcheck_gatherer_test.py | Update gatherer import and remove legacy pipeline integration portions. |
| app/agentic_ai/context/factcheckapi/init.py | Simplify __all__. |
| app/agentic_ai/context/init.py | Add package init docstring. |
| app/agentic_ai/conftest.py | Add test-time sys.path root injection for agentic_ai tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """ | ||
| web search tool — runs parallel searches across general + domain-specific sources. | ||
|
|
||
| reuses google_search() from app.ai.context.web.google_search | ||
| and trusted domains from app.config.trusted_domains. | ||
| uses the custom search server for all web searches. | ||
| """ |
There was a problem hiding this comment.
The implementation expects the custom search server URL in the env var WEB_SERCH_SERVER_URL (missing the 'A' in SEARCH). If users set a more conventional WEB_SEARCH_SERVER_URL, searches will silently fail. Consider renaming to WEB_SEARCH_SERVER_URL (and optionally supporting the old name for backward compatibility) and documenting it in env.example.
| import pytest | ||
|
|
There was a problem hiding this comment.
pytest is imported but never used in this test module. Removing the unused import will keep the test file clean and avoid lint/CI warnings if you add static checks later.
| import pytest |
| import os | ||
| import sys | ||
|
|
||
|
|
||
| ROOT_DIR = os.path.abspath(os.path.dirname(__file__)) | ||
| if ROOT_DIR not in sys.path: | ||
| sys.path.insert(0, ROOT_DIR) |
There was a problem hiding this comment.
This conftest mutates sys.path for the entire test session. That can mask packaging/import issues and may cause subtle module shadowing depending on how tests are invoked. If the goal is to make import app... work, prefer configuring pytest's import mode / pythonpath in tooling (e.g., PYTHONPATH=. in test runner, or installing the project in editable mode) and keep conftest free of global path mutations where possible.
No description provided.