From 2d5dcfabc312d43f87a4f0f44c45f62cf24a09b2 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Thu, 28 May 2026 02:59:03 +0530 Subject: [PATCH] test(kanban): update dispatcher tick counter for hoisted zombie reaper The reaper hoist in the prior commit adds an extra `asyncio.to_thread(_kb.reap_worker_zombies)` call at the top of every dispatcher tick (before the per-board work). The existing `test_gateway_dispatcher_disables_corrupt_board_without_traceback` mocks `to_thread` with a 4-call cap that previously matched 2 full dispatch ticks. With the reaper hoist each tick is now 3 `to_thread` calls instead of 2, so the cap is raised to 6 to preserve the same number of dispatch ticks. The `connect == 5` assertion is unchanged. Also add the contributor's `steveonjava@gmail.com` to AUTHOR_MAP alongside `steve@steveonjava.com` so contributor-audit passes for both identities used across the salvaged commits. Salvage follow-up for PR #32857. --- scripts/release.py | 1 + tests/hermes_cli/test_kanban_core_functionality.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index 67e13abc37d..d9e2aacd8b1 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -72,6 +72,7 @@ AUTHOR_MAP = { "ed@bebop.crew": "someaka", "anadi.jaggia@gmail.com": "Jaggia", "steve@steveonjava.com": "steveonjava", + "steveonjava@gmail.com": "steveonjava", "32201324+simpolism@users.noreply.github.com": "simpolism", "simpolism@gmail.com": "simpolism", "jake@nousresearch.com": "simpolism", diff --git a/tests/hermes_cli/test_kanban_core_functionality.py b/tests/hermes_cli/test_kanban_core_functionality.py index ce8334208af..05fb31c4d5f 100644 --- a/tests/hermes_cli/test_kanban_core_functionality.py +++ b/tests/hermes_cli/test_kanban_core_functionality.py @@ -3667,9 +3667,16 @@ def test_gateway_dispatcher_disables_corrupt_board_without_traceback( raise sqlite3.DatabaseError("file is not a database") async def _to_thread(fn, *args, **kwargs): + # PR salvage (#32857 commit 7): the dispatcher now reaps zombies at + # the top of each tick via ``asyncio.to_thread(_kb.reap_worker_zombies)`` + # BEFORE the per-board tick work. Each tick now issues 3 ``to_thread`` + # calls (reaper + ``_tick_once`` + ``_ready_nonempty``) instead of 2, + # so this counter must reach 6 to allow the same 2 dispatch ticks the + # pre-reaper test expected at 4. Connect counts in the assertion below + # are unchanged. calls["to_thread"] += 1 result = fn(*args, **kwargs) - if calls["to_thread"] >= 4: + if calls["to_thread"] >= 6: runner._running = False return result