From 0b1a8bb1f6386dd0b60105f63cf67337cb775a56 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Sat, 25 Jul 2026 11:10:26 +0100 Subject: [PATCH] [Bugfix][CI] Fix stale Mooncake lookup expectation broken by a merge race (#49802) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) --- tests/v1/kv_connector/unit/test_mooncake_store_worker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/v1/kv_connector/unit/test_mooncake_store_worker.py b/tests/v1/kv_connector/unit/test_mooncake_store_worker.py index 7cddd6d4a7..b9876b9827 100644 --- a/tests/v1/kv_connector/unit/test_mooncake_store_worker.py +++ b/tests/v1/kv_connector/unit/test_mooncake_store_worker.py @@ -1905,13 +1905,15 @@ def test_lookup_rejects_boundary_missing_one_mamba_shard(): ) _refresh_group_tp_replication_factors(worker) + # 33 tokens for two 16-token blocks: the hit stops below the request end, + # so the full-hit re-derivation stays out of the shard accounting. worker.store.batch_is_exist.side_effect = lambda keys: [1] * len(keys) - assert worker.lookup(32, [b"h0", b"h1"]) == 32 + assert worker.lookup(33, [b"h0", b"h1"]) == 32 worker.store.batch_is_exist.side_effect = lambda keys: [ 0 if "tp_rank:1" in k and "group:1" in k else 1 for k in keys ] - assert worker.lookup(32, [b"h0", b"h1"]) == 0 + assert worker.lookup(33, [b"h0", b"h1"]) == 0 def test_lookup_requires_all_dcp_rank_namespaces():