Lattice case study

HTTPX Query Parameter Merge

One valid feature: URLs can contain query parameters.

Another valid feature: requests can pass params=.

Together, affected HTTPX versions dropped the original URL query parameters.

Example
import httpx

request = httpx.Request(
    "GET",
    "https://example.com/path?page=1&s=list",
    params={"pid": 0},
)

print(request.url)

Observed

https://example.com/path?pid=0

Compatibility baseline

https://example.com/path?page=1&s=list&pid=0
Upstream context

This case study intentionally points to the upstream issue and PR. Lattice is not claiming authorship of the bug; it provides a compact way to model the surrounding interaction surface.

Lattice model
entrypoint: [request_object, client_build_request]
method: [GET, POST]
path_shape: [root_path, nested_path]
url_query: [absent, single, multi]
params_arg: [absent, single, multi, overlapping_key]
params_shape: [dict, list_tuples]

params_shape is conditional on params_arg being present.

Result

The schema product has 288 raw parameter combinations before constraints.

Lattice generated 12 pairwise scenarios.

The probe produced 6 mismatches against requests for httpx==0.28.1.

Repo links

This is the kind of bug pairwise testing is good at: not invalid input, not a single broken feature, but two valid features composing into wrong output.