Lab: One gateway, a web service and a way back
Module 13 · Lab · About 90 minutes · Needs: lessons 1 to 4 of this module, and the Module 1, 2, 10 and 11 labs (or the cells in Step 1)
What you are building
It is Friday 28 August 2026, end of week 13. Before drafted replies go live on Monday, every model call must pass through one door. gateway.py holds Lesson 1's data rules and anonymiser and Lesson 3's deadline, fallback, cache, quotas and kill switches behind one Gateway.run. otel_trace.py records OpenTelemetry spans beside Module 8's trace.py. api.py serves the gateway over HTTP; releases.py holds Lesson 4's register, flag and rollback rules; a Dockerfile and ci.yml ship it. The running examples are T-1001, Ana Duarte's duplicate charge, and T-1017, Jonas Feldmann's, whose contract says EU processing (simulated). Eleven hosted calls are made, in Steps 6 and 7.