From 80cb65502c9e6ebcc450e4962170a790ee84c4d7 Mon Sep 17 00:00:00 2001 From: mubashir1osmani Date: Thu, 20 Aug 2026 15:59:34 -0400 Subject: [PATCH] test(e2e): pin query params and multipart form fields as replay match-key identity The canonical request already folds params and form into the digest, but nothing asserted it, so dropping either from canonicalize() left all 92 fixture tests green. Two GETs differing only in query string, or two uploads differing only in a form field, would share a replay pool and FIFO-pop each other's recorded response. Resolves LIT-5890 --- tests/e2e/test_fixture_canonical.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/e2e/test_fixture_canonical.py b/tests/e2e/test_fixture_canonical.py index 30c57dc3ac6..8890848522c 100644 --- a/tests/e2e/test_fixture_canonical.py +++ b/tests/e2e/test_fixture_canonical.py @@ -140,11 +140,21 @@ class TestKeyDistinctness: second = request(headers={"traceparent": "00-cc-dd-01", "x-api-key": "two"}) assert canonicalize(first).key == canonicalize(second).key + def test_query_params_are_identity(self) -> None: + first = request("get", "/v1/vector_stores", params={"limit": "100"}) + second = request("get", "/v1/vector_stores", params={"limit": "10"}) + assert canonicalize(first).key != canonicalize(second).key + def test_secret_set_versus_unset_stays_distinct(self) -> None: with_key = request(body={"api_key": "sk-live-aaaaaaaaaaaaaaaa"}) without_key = request(body={"api_key": None}) assert canonicalize(with_key).key != canonicalize(without_key).key + def test_form_fields_are_identity(self) -> None: + first = request("upload", "/v1/files", form={"purpose": "assistants"}, file_sha256="a" * 64) + second = request("upload", "/v1/files", form={"purpose": "batch"}, file_sha256="a" * 64) + assert canonicalize(first).key != canonicalize(second).key + def test_file_content_is_identity(self) -> None: first = request( "upload", "/v1/files", file_name="batch.jsonl", file_sha256="a" * 64, file_bytes=10