Verified interview challenge
Refactor a chat bot system
Improve a working chat service's structure while keeping its conversations exactly consistent.
Unlock with Full AccessThe challenge
A working chat service keeps its bot logic and state inside one function. The bots interact through away messages, meeting commands and a running tally of reactions, with a defined order for replies.
Refactor the service into bot classes, then replace direct bot coupling with a synchronous event bus. Users should see the same conversation throughout, so changes to structure must preserve command handling, shared behaviour and the order in which effects occur.
What you'll practise
Behaviour preservation
Separate structural changes from changes users would see in the conversation.
Event-driven coordination
Replace direct bot dependencies while retaining ordering and state semantics.
# Build on your implementation
# Run checks for the current part
# Full starter code includedRun your code to see results.