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.
This commit is contained in:
kshitijk4poor 2026-05-28 02:59:03 +05:30 committed by kshitij
parent dc98314fbd
commit 2d5dcfabc3
2 changed files with 9 additions and 1 deletions

View file

@ -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",

View file

@ -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