Repository navigation
Load the Search Page Only on a Run Over the Default List - #536
Conversation
A run given another list with --urls, such as the family site's pages, no longer adds /search/, so it passes on its own pages. A list that wants the search page names it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #536 +/- ##
===========================================
+ Coverage 53.24% 53.27% +0.02%
===========================================
Files 12 12
Lines 3418 3420 +2
===========================================
+ Hits 1820 1822 +2
Misses 1598 1598
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔵 Needs a closer look
Empty custom URL lists can silently turn the browser gate into a no-op and need validation with test coverage.
No open issues 🎉
What changed in this PR
This pull request makes /search/ conditional on the selected URL source, so custom lists probe only their declared paths while the default list retains the search page.
Changes:
- Added a
searchoption controlling whether/search/is included. - Updated CLI help and
OPERATIONS.mdfor custom-list behavior. - Added tests covering custom URL lists and probe arguments.
Review findings:
checks/check-csp-browser.py:54— [P2] nit, 1 vote: Clarify the module docstring so it accurately describes custom URL lists.checks/check-csp-browser.py:263— [bug] moderate, 1 vote: Reject empty or whitespace-only custom URL lists and add test coverage to prevent a no-op browser check.
| File | Reviewed changes |
|---|---|
OPERATIONS.md |
Documents that custom URL lists must explicitly include /search/. |
checks/tests/test_check_csp_browser.py |
Tests default and custom URL-list behavior and probe arguments. |
checks/check-csp-browser.py |
Controls search-page inclusion and updates custom-list guidance. |
Review effort: Lite
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Both findings from the review of 0254118 are fixed in 3195386.
|
Summary
checks/check-csp-browser.pyadded/search/to every run, so a run given another list with--urlsalso loaded it. A family-site run over/en/and/af/therefore failed on a page that site does not have. Now only a run over the defaultgolden-urls.txtadds/search/, and another list names it where it wants it.read_pathstakes asearchflag, whichmainsets only where no--urlswas given.--urlshelp and OPERATIONS.md "Local Verification" say a list names/search/where it wants it.--urlsrun whose probe gets only the list's own pages.Fixes #535, which closes when the promotion carrying this reaches main.
Verification
checks/suite: 200 tests pass, and ruff, ruff format, and mypy are clean.checks/check-csp-browser.pyagainst the local staging family mirror with--urlsnaming/en/and/af/:PASS - 2 pages loaded with no violation the allow list lacks.--check sentence-length, reports nothing.run_main's patches, and--urlshelp that did not mention the search page. Round 2 found nothing.🤖 Generated with Claude Code