Workshop index · Download all examples and lessons
The client now retries a timed-out booking once. Its request key stays the same. The transport may lose a response after the store accepts the booking. Trace client → transport → store, rather than reviewing the retry loop alone.
Contract: a successful request reserves seats once and returns {status: "confirmed", remaining: N}. Repeating the same key and payload returns the original response without reserving again. Distinct keys are distinct bookings. Reusing a key with a different payload is outside this exercise. Rejected capacity requests return {status: "sold_out", remaining: N}. Availability must never be negative, and total accepted seats must not exceed capacity.
Python models sequential requests and response loss. TypeScript additionally models two requests interleaving around an asynchronous storage step. Its optional beforeWrite hook is an injected I/O boundary used for deterministic scheduling in the exercise, not a production locking mechanism.
python3 exercises/06-retries/python/demo.py
node exercises/06-retries/typescript/demo.ts The demos print observations; your job is to turn the contract into assertions. Reference fixes are under solutions/06-retries/. Do not open them before writing your review.