Funnel Through The Bus
Hard About 50 min Katabench Pro
Orders calls Billing's and Notifications' internals directly while both peek back into Orders' internals, breaching the module boundaries and closing two cycles. A published bus and event already exist but sit unused. Republishing through the bus clears the direct calls and the cycle, yet the subscribers still reach into Orders to format their lines; only a fat-enough event turns every rule green.
The full brief is part of Katabench Pro
Pro opens this kata's brief, its starter code and its grader. To see how the track works first, try Break the Checkout Cycle, which is free.
How it is graded
You work across multiple files, and architecture rules turn the design boundaries into executable feedback.
What it practices
- Integration events
- Publish what happened across a module or service boundary as a stable contract, separate from in-process domain events.
- Modular monolith
- Modules talk through published contracts and own their data, never each other's internals.
- Dependency cycles
- Find and break cycles between modules by inverting or extracting a dependency.
Related katas
- Break the Checkout Cycle Hard Free Orders, Pricing and Promotions import each other in a three-hop cycle while Pricing also reaches into Inventory's internals. Moving the obvious call only rotates the cycle; hoist the shared vocabulary into a kernel leaf and reach Inventory through its published port to turn every rule green.
- Split the Read From the Write Medium Pro The history query formats its lines straight off the write-side aggregate, welding the two halves of a CQRS split together. A published snapshot already exists and sits unused; moving the aggregate into the contracts leaf instead trips the role rule.
- Events Flow Up, Not Down Hard Pro A stable events hub reaches DOWN into a feature for a helper, and one feature reaches SIDEWAYS into a sibling to send an SMS. Cleaning up the hub is the obvious move, but it leaves the feature-to-feature edge red; only routing the sibling call through a hub-published port turns everything green.
- Invert the Callback Cycle Hard Pro Notifications calls back into Orders, closing a four-module cycle. A Shop.Contracts leaf already exists, but the back-edge is a call, not a shared data type, so hoisting another type into the leaf does nothing, and a contracts type that imports Orders trips the leaf-purity rule. Invert the direction with an IOrderCallback port the leaf owns.