Repository navigation
Conversation
domfahey
force-pushed
the
fix/search-validation-and-criteria
branch
from
November 25, 2026 03:57
2c3b0f1 to
c3ef2ce
Compare
domfahey
marked this pull request as draft
November 25, 2026 13:45
3 tasks done
…a scheme - a single key=value keeps `&` in its value (`subdivision=Town & Country`); only a stray `&` at either end is dropped - `www.example.com?city=Miami` and `example.com/search/?…` parse as URLs instead of producing a key like `www.example.com?city` - empty keys (`=Miami`, `?=Miami&…`) and URLs with no query string are usage errors instead of being dropped or accepted Applies to `search check|run|url` and pages' `--search-criteria`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… not happen - zip codes are checked against the site's values; other numeric fields (min/max ranges, price and beds presets, numeric multiselects, non-zip numeric autocomplete values) are still skipped as presets - fixed catalog lists (fields not marked `dynamic`) are taken as complete, so the autocomplete index is not fetched for them - if the autocomplete index cannot be read, the field is left unchecked (`value_check_error`; `--strict` exits 1) rather than warning from a partial list - a field given only `all` is not listed in `values_checked` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t the changes
- `search url --save` refuses to save when the site ignored a criterion
(the saved search would filter nothing) and fails if the site returns no
`search_id`
- `search run` table footer shows the real page count ("of at least N"
when the total is capped; no bogus count for --per-page 0)
- checkbox labels are kept when form rows merge, range choices are
de-duplicated, `search choices polygon --all` is rejected up front, a
form answered with HTML is reported as such, and filters in `search
choices` / `search-forms fields` lowercase Unicode text
- GUIDE: criteria parsing, --save, zip checks, fixed catalog lists and
failed-autocomplete behaviour
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
domfahey
force-pushed
the
fix/search-validation-and-criteria
branch
from
November 25, 2026 13:58
876431e to
2f8e0bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes how search criteria are parsed and checked (
search check,search url --save, pages'--search-criteria). 5 files: about 490 lines of source and docs, about 960 lines of tests.Behaviour changes
features=Pool & Spa&www.example.com?city=Miami,example.com/search/?…www.example.com?citycity=Miami&,&city=Miami&sent in the value or key&dropped=Miami,?=Miami&…, a URL with no?search check zip=…search url --savewith ignored criteriasearch_idsearch runtable footerper_pageSmaller fixes: checkbox labels are kept when rows are merged, range choices are de-duplicated,
search choices polygon --allis rejected up front, and Unicode-aware lowercase is used insearch choices/search-forms fields.Two judgement calls, please confirm
value_check_error, exit 1 with--strict) instead of warning about case from the form's partial list, which could be wrong.dynamic, such astype) are treated as complete, so autocomplete is not fetched for them.Where to look
Three commits, one per topic. Each builds and passes the tests on its own, so they can be read one at a time:
parse_criteria(+looks_like_host), with unit tests.check_valuesandis_numeric_preset, withcheck_*tests. This commit holds the two judgement calls above.--save, output and docs:url,run_search, choices/fields, GUIDE.tests/search.rsis long, but each test is one case named after its behaviour.Checklist
cargo fmt,cargo clippy --all-targets -- -D warningsandcargo testpassdocs/GUIDE.md