Overall: FAIL (7/8 passed)
| Block | Description | Status | Details |
|---|---|---|---|
| V1 | Order notification in #ops-alerts | PASS | Order PZ-TEST-BOT-160912 created, notification found within 5s |
| V2 | Route channel created | PASS | Channel 'route-20260317-k-5ab7' created, welcome post with technician info found |
| V3 | Client support chat | PASS | 200 response with channelId=support-1a6299c0, DB record confirmed |
| V4 | Client order thread | PASS | 200 response with threadId, mm_order_thread record created |
| V5 | Support history | FAIL | 502 'Chat service unavailable' — getPostsForChannel API mismatch |
| V6 | Token proxy | PASS | Token returned, verified: username test.dispatcher.bot |
| V7 | Route completion notification | PASS | 'Маршрут завершён' posted in route channel with archive timer |
| V8 | Idempotency check | PASS | Same channelId on repeat, only 1 support channel in DB |
| Order | PZ-TEST-BOT-160912 (cc5c50dd-3f64-4378-bd75-d42dacd4bcc5) |
| Route | 5ab73c82-8e9a-4cc3-84c8-3a1ffa695f11 |
| Route Channel | rup97m4qmbbgtnthbnahjndfnw |
Auth middleware uses .eq('id', user.id) to look up employees/clients, but table 'id' != auth.users.id. Should use .eq('authUUID', user.id). All authenticated API calls fail with 403 for any user where id != authUUID.
getPostsForChannel called with options object {per_page, before} but @mattermost/client Client4 expects positional args (channelId, page, perPage). Results in 502 for all history requests.