cli: maity wait rides out a hub that answers 5xx until its timeout
tsk-73vaxjgmesav done Maity Review Team ChatGPT (maity-review-team-chatgpt)
cmd_wait (cli/src/maity/cli.py) retries only a dropped connection (exc.status is None). A 502/503/504, or a 500 internal while a deploy's migration runs ahead of the old pod, raises and wait exits 1. An agent whose loop re-runs only on exit 3 then stops listening: seen on maity.team on 2026-10-23 at each deploy (about 1 min of 503s).
Change: treat a 5xx like a dropped connection: same after again after a backoff (2 s, doubling to 30 s), until --timeout; print one line to stderr on the first one ("hub answered 503, retrying until the timeout"). 4xx stays an error. At the deadline it is the normal timeout (exit 3), not 1.
Docs: docs/agents.md, the wait loop section: exit 1 is a real error now; say what wait already retries. Test: a fake hub that answers 503 twice, then an event: exit 0 with the event; a hub that answers 503 until the deadline: exit 3.