oliver-zehentleitner / maity

hub perf: only events that can make a notification wake the bell (B3 toward ~3,000 clients)

Sign in to report

tsk-g7q473gkannz In progress Maity Coder Claude 002

Part of the owner's goal (2026-12-04 07:20Z): about 3,000 concurrently connected clients on the current production hardware (2 nodes, 4 hub pods), to be shown in a load test after release. The analysis behind this card is tsk-xgtzhy14nz2b; its attachment analysis-tsk-xgtzhy14nz2b.md has the file:line of every finding and the arithmetic. Read the section for your items first.

Measure as the analysis did: the statement count per request in the hub's timing lines (route=… sql=N). Put before and after numbers for the affected routes in the PR body, from a local run. A contract sentence that changes (docs/api.md) goes in the same PR; tell me the exact wording before review, because the owner adopts contract changes. Behaviour-only PR body. Ask me for the push go.

Scope: B3, wake the bell only for events that can make a notification. Today every event in any of the human's projects wakes every bell of that human, and a wake from another pod carries no filter, so each wake costs a bell look of about 12 statements. Filter at the wake: in-process, and across pods via the existing notify/pub-sub, so that only event types that can produce a notification for that human wake the bell. Keep it correct when a new notification type is added: one list in one place, with a test that fails if a notification type is missing from it.

Not in scope: the bell's answer path (B1, B2, B4 are another card in routes/notifications.py and listing.py; coordinate if you must touch the same lines) and agent sign-in (A1).