Propagate the Caller's Cancellation
Medium About 25 min Katabench Pro
A shard scan checks cancellation between probes but strips it from the adapter call. Keep caller-owned cancellation intact across the application port so an in-flight collaborator can observe it.
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 Move the Port Home, 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
- Ports and adapters
- Driving and driven adapters meet the application only through its ports.
Related katas
- Move the Port Home Medium Free A
*Portabstraction is declared beside its adapter, so the core reaches outward to see its own port. Move the single port into the core; duplicating it leaves a stray copy that fails the role-placement rule. - Two Sides of the Hexagon Medium Free A driving (web) adapter reaches the driven (persistence) adapter directly for a quick existence check. Inject the repository "via its interface" and you'll find the seam is still on the wrong side of the hexagon.
- Preserve the Opaque Cursor Medium Pro An export invents offsets from row counts even though the storage service owns continuation tokens. Hide adapter details behind materialized pages and return every opaque token unchanged.
- Strangle Behind the Port Medium Pro A pricing core chooses between legacy and replacement tax engines itself, so a temporary migration decision has become permanent domain coupling. Put coexistence behind one core-owned port and let an outer adapter route the strangler migration.