Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Unit 15.04: The handover and its stated limits

The handover names what has not been tested and who owns it.

Contract, measurements, controls, limits, gaps, owner

A complete handover for the service.

The code prints it.

import json

handover = {
    "service": "ticket classification API",
    "contract": "POST /v1/classify, versioned path, five documented errors",
    "measured": {"p95_latency_ms": 1840, "usd_per_1000_requests": 0.047,
                 "offline_tests": 41, "tests_needing_network": 4},
    "controls": ["typed settings, fake model by default",
                 "api key with scopes", "input pre-checks before any spend",
                 "daily budget enforced in code", "timeouts on every outbound call",
                 "response model filters internal fields"],
    "accepted_limits": [
        {"limit": "rate limiting is per-process",
         "mitigation": "gateway limit in front", "residual": "medium"},
        {"limit": "background notifications are best-effort",
         "mitigation": "none; loss is acceptable here", "residual": "low"},
    ],
    "not_tested": ["behaviour under 4 workers with shared state",
                   "provider outage lasting over the retry budget"],
    "owner": "platform team",
    "next": ["move rate limiting to Redis", "add a queue for slow requests"],
}
print(json.dumps(handover, indent=2))

print("\n`not_tested` names the two things most likely to surprise someone,")
print("and the first is a direct consequence of the in-memory limiter.")

not_tested names the two things most likely to surprise someone, and the first - behaviour under four workers with shared state - is a direct consequence of the in-memory rate limiter listed just above it.

That connection is what makes the document useful. A limit and the untested consequence of it, side by side, tell the next person exactly where to look first.

The mistake this prevents

The mistake is writing the handover as a feature list. The next person needs the constraints, the gaps and a name to ask - the features are discoverable from the code and the documentation.

Takeaway

State the accepted limits, the untested areas and an owner. The most useful gap to name is the one that follows from a limit you already listed.