You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A command with a bare «@» is a command to aiogram but not to the form breakout, so a form step takes it as its answer #276
CommandBreakoutMiddleware (app/bot/middlewares.py) drops a half-finished form when the message is a command, so that a command typed at a free-text step runs instead of becoming the step's answer. It decides what a command is with _COMMAND = ^/[A-Za-z0-9_]+(@[A-Za-z0-9_]+)?(\s|$) (line 47). aiogram's Command filter decides differently: it accepts a command with an empty mention.
So /week@ (or any command followed by a bare @) is a command to the handlers but not to the breakout.
Failure scenario. An editor is at «Теперь пришлите текст задания:» and types /week@ — a slip of the keyboard, or a client that leaves the @ after deleting the bot's name. The middleware does not see a command, the form stays open, and the step, which filters on state alone and is registered before week, takes «/week@» as the assignment's text: committed, audited and announced to the class — the very defect the middleware's docstring describes, through a gap of one character.
Found while planning the server decomposition (sub-project 1 of docs/specs/2026-10-03-one-contract-design.md), which keeps the homework ticks' place in the dispatch order because of it. Not fixed there. The fix is to make looks_like_command agree with aiogram's parsing (accept an empty mention), with a test that sends /week@ at an open form.
Activity
Say where the work stands after the spike was recorded and the first …
Take main now that #277 has merged, and give milestone 11's row what …
Hand over the batch that closed #276, #295 and #304
Close an open form on a command with a bare «@», as aiogram reads one