🐛 Parse join and leave callbacks through their own constants
What does this MR do and why?
Milestone v1.5.0. Targets main.
handle_join_leave_operation is shared by the join and leave handlers and parsed every callback through cb.JOIN — a harmless shortcut when parse only extracted the meeting id. The wire-form alias telemetry made parse compare the wire's (action, entity) against its own constant's, so every leave tap now logs Aliased callback wire form used with primary_form=join;meeting wire_form=leave;meeting. No alias is involved and routing is unaffected — but the false hits pollute the alias drain gauge, which counts alias usage to decide when old wire forms can be retired: with every leave tap registering as an alias hit, the gauge can never read zero. This has been live since the alias telemetry shipped.
The shared helper now receives the running handler's own callback constant and handler id (cb.JOIN/MeetingHandlerId.JOIN from the join path, cb.LEAVE/MeetingHandlerId.LEAVE from the leave path), so the wire form parses through the constant it belongs to. The malformed-callback error also names the right handler now instead of always naming JOIN.
The leave test pins the regression: the tap resolves (Meeting leave resolved present) and emits no Aliased callback wire form used line.
Screenshots or screen recordings
Not applicable — log-plane fix; user-visible behavior unchanged.
How to set up and validate locally
uv run mb test tests/bot/handlers/meeting/test_join_leave_meeting.py tests/bot/handlers/meeting/test_join_leave_lock.py— 29 tests including the new alias-absence assertion anchored on the resolved line.uv run ruff check .anduv run mb typecheck— both clean.- Manual: tap Leave on any card — the alias line no longer appears in the logs; tap a genuinely aliased old button — the line still appears for it.
MR acceptance checklist
This checklist encourages the authors, reviewers, and maintainers of merge requests (MRs) to confirm changes were analyzed for high-impact risks to quality, performance, reliability, security, observability, and maintainability.
- Any new or modified functionality is covered by tests. If not, tests have been added to ensure its coverage.
- This modification has been tested in a local environment and proof has been presented and evaluated.
-
The documentation has been updated accordingly — the helper's docstring states the constraint; nothing else documents wire parsing. -
The code in the MR has been validated (runuv run mb validate) — lint and type-check ran clean locally; the test suite runs targeted locally by convention, with CI as the full gate. -
If new strings have been added to messages, the source language has been updated (runuv run mb locales update-source) — no user-facing strings.