""" Argon2 runs off the event loop, and never two at a time. One derivation is 256 MB and a quarter to half a second of CPU. On the loop it stopped the whole hub for that long at every sign-in. In a thread pool it would have been worse: two concurrent `lanes=4` derivations deadlock inside OpenSSL and never return (`auth._argon2_executor`). These pin both halves. """ import asyncio import base64 import pathlib import re import time import pytest from meshbay_hub import auth SRC = pathlib.Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" def test_nothing_derives_argon2_on_the_event_loop(): """Every line of every module, not the first match: a call added above an existing one must not hide behind it.""" direct = re.compile(r"(?