From d84a3c6eb37253b2126285e8b4ff32c62cb6c0b8 Mon Sep 17 00:00:00 2001 From: Patrick Buckley Date: Wed, 22 Jul 2026 21:50:23 -0700 Subject: [PATCH] docs(tests): honest coverage pointer for the stubbed snapshot builder (#881) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_console.py covers the CONSUMER side of node_snapshot (hand-built dicts fed to the collector), not _build_node_snapshot's production — the helper docstring claimed otherwise. Point at the real end-to-end coverage (the roster-restart scenario: membership + evict) and state plainly that the producer's field projection has no direct unit test (review round 1, quality finding). --- tests/test_global_sse_boot_epoch.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_global_sse_boot_epoch.py b/tests/test_global_sse_boot_epoch.py index e35d4aa9..9053886b 100644 --- a/tests/test_global_sse_boot_epoch.py +++ b/tests/test_global_sse_boot_epoch.py @@ -50,8 +50,13 @@ def _make_app_state( """Minimal ``app.state`` for the global SSE handler. Real lock / deque / list so registration and slicing run the - production code paths; only the snapshot builder is stubbed (its - composition has its own coverage in ``test_console.py``). + production code paths; only the snapshot builder is stubbed — the + replay-branch decisions under test never depend on its composition. + The real ``_build_node_snapshot`` is exercised end-to-end by + ``scripts/recovery_e2e.py --scenario roster-restart`` (snapshot + membership + evict); its full field projection has no direct unit + test today (``test_console.py`` covers only the CONSUMER side, + feeding hand-built snapshot dicts to the collector). """ buf: collections.deque[tuple[int, dict[str, Any]]] = collections.deque(maxlen=50) for item in buffered or []: