Ship it
Already deploying through CI/CD with a cost budget and guardrails? Skip ahead to the capstone.
The course ends when the agent leaves your laptop. Somebody has to decide it is safe to go, and this lesson is that decision, written as code.
A release gate is a function
Not a feeling, and not a meeting. It takes a plan and returns the reasons you cannot ship yet. An empty list means go.
Four things belong in it:
- A pipeline. CI/CD means every change ships the same automatic way. The fix you make at 2am gets the same checks as everything else, and you can go back to a known good version.
- A budget. A monthly cap you can defend, set before traffic arrives rather than after the bill.
- Guardrails. Checks on what goes in and what comes out, in production.
- A hosted runtime. Somewhere proper, not a notebook someone leaves open.
What it costs to run
Two lines on the bill, and they grow differently.
- Inference: tokens in and out, on every run. The loop you wrote in Module 2 decides this, which is why trimming in Module 4 mattered.
- Hosted runtime: roughly $0.0994 per vCPU-hour and $0.0118 per GiB-hour, charged while the agent exists, whether or not anyone uses it.
Check both when you build. Prices move.
What to write
release_gate(plan), returning sorted problem codesmonthly_cost(...), inference plus hosting, to two decimal places- Fix
RELEASEuntil the gate is clean - Work the flags out from
RELEASE, then run the loop one last time
The check runs your gate against DRAFT, where all five fields are wrong. A
gate that passes that is not a gate.
The point
Shipping is a checklist you can execute, and a gate that never fails is decoration.
Break it on purpose
Make release_gate return an empty list. Every flag looks fine, the check
fails, and you have just built the thing that waves bad releases through.
Check yourself
Answer out loud first. Reading the answer without trying is where the learning leaks out.
1. What does CI/CD protect you from at 2 a.m.?
2. Which bill lines grow with a hosted agent?
3. What still fails if guardrails are off but the demo looks fine?