Skip to content
Katabench
Try free

Invert the Callback Cycle

Hard About 45 min Katabench 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.

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.

C# architecture exercises →

What it practices

Dependency cycles
Find and break cycles between modules by inverting or extracting a dependency.
Dependency inversion
Point dependencies at abstractions the core owns, never at outer mechanisms.

Related katas