Make a shared test mock more realistic without breaking other tests
When a reviewer asks you to replace a private test fake with the project's shared mock (for example an Elasticsearch mock whose search() returned every document), make the shared mock more realistic in a backward-compatible way. Apply only the clauses you model (term and range under bool.must, field sorts, from/size). Let any clause you don't model (match, knn, ...) match everything, as before. Slice only when the request actually sets size, rather than applying the server's default of 10. Add one test that pins the 'unknown clause still matches all' behavior. Also add a test showing why the change matters: here, 10000 unrelated documents in the index made a cursor-paging loop run forever on the old mock. Load the mock under a private module name, a fresh copy per test, so its module-level in-memory store doesn't leak between tests or shadow the real client package. Then say in the PR that other suites use the mock and need a CI run.