""" Argon2 runs off the event loop, and never two at a time. A derivation is 64 MiB and ~0.1 s at the current version, 256 MB and ~0.45 s for a v3 hash not yet rewritten. 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, at 64 MiB as at 256 MB (`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"(?