Repository navigation
v0.1.1 — no longer drops webhooks under a burst
Upgrade if you are on 0.1.0. That release drops webhooks under a burst.
pip install --upgrade webhook-replayFixed: the listen backlog was 5, so bursts were lost
socketserver defaults request_queue_size to 5. The kernel holds five pending connections and refuses or resets everything past that before any handler thread sees it. The server was already threaded and could have served them all — it never got the chance to accept them.
Measured on a 2-core machine, six rounds each, counting failed connections:
| burst | backlog=5 |
backlog=SOMAXCONN |
|---|---|---|
| 20 | 6 | 0 |
| 60 | 173 | 0 |
| 150 | 649 | 0 |
| 300 | 1448 | 0 |
Twenty simultaneous senders already lost data, and a fan-out or a provider working through a retry backlog is exactly that. For a tool whose entire job is not losing captures, this was the failure that mattered.
Fixed with a CaptureServer subclass using request_queue_size = socket.SOMAXCONN — as deep a queue as the OS permits rather than a guessed number; the kernel caps it where its own maximum is smaller.
Added
- Two regression tests, both checked to fail against the old value: the contract asserted directly, and a 50-sender burst released from a
threading.Barrier. The barrier is the point — the pre-existing concurrency test starts its threads one at a time, and that stagger hid the bug locally while it still failed on CI. - CI on every push and pull request across Python 3.9–3.13, running the suite the README documents (
pytest) and as a module (python -m pytest), because the two resolve imports differently and had diverged. SECURITY.md.- A changelog.
Provenance
Built from a clean clone of this tag — not a working tree — with python -m build; twine check passed on both artefacts.
2dd735b9d7fd3eb162717ad8939040a4b4bb1b430863170cf2b43acabf2bccd2 webhook_replay-0.1.1-py3-none-any.whl
9eb689452048420dbc86c8ef16bfb2ae7cf518522a12fc1d00190996d06b5309 webhook_replay-0.1.1.tar.gz
Verified against the published package, not just the repository: installed webhook-replay==0.1.1 from PyPI into a clean venv and fired 100 simultaneous senders at it — 0 failures, 100 captures stored.