docs(tests): honest coverage pointer for the stubbed snapshot builder (#881)

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).
This commit is contained in:
Patrick Buckley
2026-07-22 21:50:23 -07:00
parent a4a7c960db
commit d84a3c6eb3
+7 -2
View File
@@ -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 []: