Skip to content

Preserve equals signs in query filter values - #61

Open
harbinresearcher wants to merge 1 commit into
morepath:masterfrom
harbinresearcher:codex/preserve-equals-in-filter-values
Open

harbinresearcher wants to merge 1 commit into
morepath:masterfrom
harbinresearcher:codex/preserve-equals-in-filter-values

Conversation

@harbinresearcher

Copy link
Copy Markdown

Fixes #60.

The CLI query tool rejects filter values containing equals signs, even though query_app() matches the same string. For example, a directive registered with name='https://example.test/?q=python' cannot be selected with decq foo 'name=https://example.test/?q=python': splitting on every = raises ToolError: Cannot parse query filter, no =..

Split at the first equals sign and retain the remainder as the value. Keep whitespace stripping, missing-separator errors and the conversion/matching pipeline. Add a query-tool docstring note, changelog entry, seven parsing cases, and a public CLI regression checking both the matching and nonmatching registrations. All eight new cases fail before the fix.

Validation:

  • Both pristine and patched Linux trees pass the project's tox -e py311,py314,coverage,lint,docs,mypy,pyright: full tests, 100% statement coverage, Ruff check/format, strict Sphinx HTML/doctests, and the configured 3.11-3.15 targets of both type checkers.
  • Linux CPython3.11.17 and3.14.8: full suite137 ->145 passed; configured statement coverage remains100% (741/741).
  • Windows CPython3.12.14: targeted query-tool suite35passed. Complete suite132 ->140passed with the same five pre-existing failures in test_error.py: those assertions expect /test_error.py but Windows reports backslashes. Failure identities were compared; configured statement coverage is100% on both trees. No claim that the Windows full suite passes.
  • Windows Ruff check/format, mypy and pyright pass.
  • Isolated sdist/wheel build succeeds; the separately installed wheel passes all35 query-tool tests with its actual import path verified.
  • Independent automated read-only review found no actionable issues, reran the35 target tests and probed364 filter strings plus generator/duplicate-key inputs. This is not human approval.

PyPy, macOS, and the remaining runtime matrix were not run locally. This is a reproduction using ordinary string attributes, with no downstream production-incident claim.

Disclosure: investigation, implementation, testing, and independent review were performed autonomously with AI under the contributor's authorization. Maintainer review is still needed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query tool rejects filter values containing equals signs

1 participant