CLI sub-command search-only#446
Conversation
Function to support CLI sub-command search-only with auxiliary functions. Using Opus-4.7
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (61.53%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #446 +/- ##
==========================================
+ Coverage 56.11% 56.44% +0.32%
==========================================
Files 63 66 +3
Lines 6080 6279 +199
Branches 591 614 +23
==========================================
+ Hits 3412 3544 +132
- Misses 2598 2662 +64
- Partials 70 73 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new compass search-only CLI subcommand that runs just the web-search portion of the COMPASS pipeline and emits a JSON or human-readable summary report of ranked URLs per jurisdiction, intended to speed up iteration on search/retrieval configuration before invoking the full pipeline. Logging setup is refactored out of process.py into a shared compass/_cli/common.py helper so the new subcommand can reuse it.
Changes:
- New
compass.scripts.search_onlyorchestration module (engine resolution, per-jurisdiction async search, blacklist/duplicate/top-N filtering, JSON + text reporting). - New
compass._cli.search_onlyClick subcommand wired intocompass/_cli/main.py, with options for config, output path/format,-nURL count override, verbosity, and one-shot plugin registration. - Extracted
setup_cli_loggingintocompass/_cli/common.pyand updatedprocess.pyto consume it; added unit tests for the new script helpers and CLI command.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| compass/_cli/common.py | New shared CLI logging helper extracted from process.py. |
| compass/_cli/process.py | Switched to shared setup_cli_logging helper, removed local copy. |
| compass/_cli/main.py | Registers the new search-only subcommand. |
| compass/_cli/search_only.py | New Click subcommand wiring config loading, plugin registration, run, and output. |
| compass/scripts/search_only.py | Core search-only orchestration, filtering, and report formatting. |
| tests/python/unit/scripts/test_search_only.py | Unit tests for engine resolution, filters, and summary rendering. |
| tests/python/unit/scripts/test_cli_search_only.py | CLI-level tests covering JSON/summary output, -n override, and plugin registration. |
ppinchuk
left a comment
There was a problem hiding this comment.
Honestly this looks great! Just a few minor requests here and there
Add number of duplicates in the criteria to order, such that the targets found multiple times (engines / queries) are probably the right target.
|
@ppinchuk , I think I addressed everything. Please, close the conversations that you agree and let me know if it is missing anything. |
Thank you!!! Just a few discussion points left |
I think this is what @ppinchuk suggested.
|
For the records, I renamed to search instead of search-only. Using just |
|
@ppinchuk , thanks for the feedback and review! |
Support faster iterations on seaching new documents.