Skip to content

Load the Search Page Only on a Run Over the Default List - #536

Merged
ptr727 merged 3 commits into
developfrom
fix/browser-check-search-default
Oct 26, 2026
Merged

ptr727 merged 3 commits into
developfrom
fix/browser-check-search-default

Conversation

@ptr727

@ptr727 ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Summary

checks/check-csp-browser.py added /search/ to every run, so a run given another list with --urls also 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 default golden-urls.txt adds /search/, and another list names it where it wants it.

  • read_paths takes a search flag, which main sets only where no --urls was given.
  • The --urls help and OPERATIONS.md "Local Verification" say a list names /search/ where it wants it.
  • Two new tests: a path list read without the search page, and a --urls run whose probe gets only the list's own pages.

Fixes #535, which closes when the promotion carrying this reaches main.

Verification

  • The checks/ suite: 200 tests pass, and ruff, ruff format, and mypy are clean.
  • checks/check-csp-browser.py against the local staging family mirror with --urls naming /en/ and /af/: PASS - 2 pages loaded with no violation the allow list lacks.
  • The hub prose gate, with and without --check sentence-length, reports nothing.
  • The local strict review ran two rounds. Its three round-1 findings were fixed in 0254118: a long docstring sentence, a test that repeated run_main's patches, and --urls help that did not mention the search page. Round 2 found nothing.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 25, 2026 16:47
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]>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 25, 2026
Copilot AI lite review requested due to automatic review settings October 25, 2026 23:54
@ptr727

ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 0254118e2545ea5e9c44d9da3027ed7088eaba29, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 36d30b38-faac-4d63-9b89-37c0a143d578
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.27%. Comparing base (aa0af50) to head (3195386).

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              
Flag Coverage Δ
python-3.13 53.27% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 search option controlling whether /search/ is included.
  • Updated CLI help and OPERATIONS.md for 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

@ptr727

ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 3195386f556fecaddeb6400330ef388a1d2c624a, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727

ptr727 commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Both findings from the review of 0254118 are fixed in 3195386.

  • checks/check-csp-browser.py:263, the empty custom list: a --urls list naming no page is now a usage error, exiting 2 before any container starts, and test_a_list_naming_no_page_is_a_usage_error covers it. Before, such a run loaded zero pages and passed.
  • checks/check-csp-browser.py:54, the docstring: the module docstring now says a run over the default list always loads the search page, and another list only where it names it.

@ptr727
ptr727 merged commit 34d728e into develop Oct 26, 2026
12 checks passed
@ptr727
ptr727 deleted the fix/browser-check-search-default branch October 26, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants