fix: correct EventBus capacity accounting
Draft
MA
3mo ago+26+26+01234567890123456789-34-34-01234567890123456789
Summary
- count queued and processing events as non-overlapping capacity inputs
- report queue saturation with accurate queue and processing counts
- replace the misleading capacity regression with a focused 50-event queue test
Tests
- uv run pytest -q tests/
- uv run ruff check .
- uv run ruff format --check .
- uv run pyright
Summary by cubic
Fixes EventBus capacity checks by separating queued from processing events and enforcing a queue‑full condition to prevent premature capacity errors.
- Bug Fixes
- Compute pending as queue size + started events only; stop double counting queued items in history.
- Raise capacity errors with a clear reason ('100 max' or 'queue full') and report separate Queue and Processing counts.
- Replace the 100-limit stress test with a focused 50-event queue saturation test that validates accurate counts and messaging.