By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The previous lessons built Harbor Helper one piece at a time. A launch review does the opposite: it examines the assembled system, because production incidents live in the joins between parts that each looked fine on its own. In this capstone you prepare to sign a go or no-go decision, and every claim you make has to point at evidence - a trace, a test, an eval report or a rehearsal you ran in staging.
The review has six parts: architecture, request traces, guardrails, tests, cost and observability, and the deployment checklist. Then you rank the changes that must happen before traffic grows. Work through each part against the agent you built in the previous sections, and note every item you cannot answer with a link to a trace, a test or a report.
Start by naming what each layer owns and what it must never decide. The test is simple: can anything the model says change who is allowed to see data, or create a write?
| Layer | Owns | Review question |
|---|---|---|
| Edge (FastAPI) | Auth, validation, request id, deadline, error shape | Can a model answer change who may see an order? It must not. |
| Agent | Model choice, prompt version, memory budget, loop and step caps | Is the model's authority limited to proposing? It must be. |
| Tools | Read-only lookups the model may call | Is the tool surface the minimum this ticket type needs? |
| Approval queue and executor | Proposed writes, the human decision, exactly-once execution | Can a write happen without a recorded approval and an idempotency key? |
| Retrieval | Chunking, embeddings, top-k, citations | Do answers cite passages, and is retrieved text treated as data? |
| Evidence | Traces, metrics, logs, eval reports | Can every failure be found, explained and reproduced? |
| Config and release | Pinned prompt version, model, budgets, kill switch | Can a prompt be rolled back without a code deploy? |
The architecture passes when authority flows in one direction: the model proposes, code decides, and the executor acts. If a prompt change can create a new authority, the review stops there.
Bring three traces to the review, one per request path, and read them as an auditor rather than as the author. A trace you cannot find is a request you cannot defend.
| Trace | What it must show | Red flag |
|---|---|---|
| Read-only answer | Request id, thread id, prompt version and model; retrieval spans; an answer with citations; token and latency totals | No request id, or a policy claim with no citation |
| Write request | A proposed tool call, a pending approval record with exact arguments and an idempotency key, a recorded human decision, then one executor run | The write executed before the approval record exists |
| Provider timeout or 429 | Backoff, a fallback attempt, the hand-off inside the request deadline, a clean error shape and a health check that stayed green | A hung request, a provider exception in the response, or a health check that called the model |
Check that the spans line up with the request path, that the request id joins logs, metrics and traces, and that the failing path shows the decision that was made rather than only the error that bubbled up.
A prompt sentence is not a control. Check each guardrail in code and demand evidence for it.
| Control | Evidence to demand | Fails review when |
|---|---|---|
| Tool allowlist | The exact set of tools bound for this ticket type | The agent can reach a tool outside the allowlist, or a tool is bound because it was convenient |
| Approval gate | Pending record with exact arguments, reviewer id and decision timestamp | Any write runs from the model, or from the prompt's assertion that it was confirmed |
| Idempotency | A key on every write and a replay test that produces one record | A retried request can refund or replace twice |
| PII redaction | A scan of logs, traces and caches for a fixture email and card number | Untrusted text or personal data reaches a log, trace or cache |
| Budgets | Step, token and wall-time caps that end in a hand-off | A runaway loop is stopped only by the provider's context limit |
| Injection | The injected-document fixture stays pending; the unknown tool is rejected | The model's persuasion is the only thing between hostile text and a write |
The guardrails pass when an attacker who can write text into a retrieved document, a tool result or a ticket still cannot create an unapproved write. That is a property you can test, so it belongs in the deployment gate.
A green suite only reassures if you know what it covers. Walk the layers from cheapest to most expensive and ask what each one proves.
Then connect the list to the architecture: for every request path, point at the test that proves its failure mode. A path with no test and no trace is not designed; it is improvised, and the first incident becomes the design review.
Bring the operating picture as well: three signals, one join key. Traces explain one request, metrics describe system health, and logs show exact events; the request id connects them. On top of that, the review needs the money and the quality.
| Review question | Signal to bring | Acceptance |
|---|---|---|
| What did one ticket cost? | Input and output tokens per request, including retries and fallbacks | A cost per resolved ticket you can defend, not just a monthly total |
| Where does the tail come from? | p50, p95 and p99 latency split by model and tool; time to first token separately | Tail latency attributed to a dependency, with an alert threshold |
| Is the cache helping or hiding bugs? | Hit rate, TTL, namespace and invalidation on policy change | Stale answers impossible by key design, not by luck |
| Is the provider degrading? | Fallback rate and 429 burst count | Fallback exercised in staging and visible on the dashboard |
| Is quality slipping? | Eval score by prompt version and model | Regressions page someone; every failed case links to a trace |
| Are writes stuck? | Age of the oldest pending approval | An approval-backlog alert with an owner and a runbook |
Page on what customers feel: errors, tail latency, runaway spend, stuck approvals and eval regressions. Keep traces for the cause, and keep the request id out of metric labels so cardinality does not explode.
This is the gate. Each item needs an artifact, not an assurance; 'it worked in staging' is a story, not evidence.
Two rehearsals belong in the gate as well: revoke the provider key and confirm a clean 503 with a hand-off while the health check stays green, and replay a write request to prove only one record is created. A checklist that has never failed anything is decoration.
Before 10x traffic, rank the assumptions that stop being true. Order by what breaks first, and say what evidence would let you close each row.
| Concern | Today | Before 10x | Why it comes first |
|---|---|---|---|
| Cache | A process-local cache in one replica | A shared cache with tenant scope, TTL and invalidation on policy change | Cross-customer leakage and stale policy answers are correctness failures, not performance issues |
| Provider capacity | One provider with default retries | Explicit timeouts, cross-provider fallback and a load-tested queue | A single provider outage becomes a full outage when there is no fallback |
| Traffic bursts | One synchronous request per turn | Rate limits and backpressure at the edge, with a queue for bursts | Bursts turn into 429s and timeouts before anything else catches |
| State | In-process memory and thread history | Shared checkpointer and thread store, no session affinity | Replicas cannot serve the same thread, and restarts lose conversations |
| Evidence | Local logs and manual evals | Centralised traces with retention and an eval dashboard per prompt version | You cannot improve, roll back or defend what you cannot observe |
| Cost | The invoice arrives after the fact | Per-request token accounting, a daily budget alarm, cache and fallback rates | Runaway loops and silent retries get expensive fast |
| Safety | Allowlist, approval gate and caps in place | Keep all of them unchanged | This is the one row where the answer at 10x is the same as today |
Close the review with a one-page memo with three lists. Ready: evidence links and an owner for each row. At risk: a mitigation and a date. Blocking: what makes the launch a no until it is fixed. Then state the recommendation in one sentence.
A launch is defensible when the blocking list is empty, the guardrails are unchanged, the eval suite is green for the exact prompt and model versions being shipped, rollback has been rehearsed and the on-call runbook names the dashboards. Anything else is a bet, and a bet is not a review.
The snippet below turns a small ops snapshot into the kind of gate this review needs: each signal passes or fails against a threshold, and the verdict is a single word. Real thresholds come from your own traffic; the shape is the point.
"""A toy readiness gate: turn an ops snapshot into go / no-go."""
RUNS = [
{"request_id": "req-1", "latency_ms": 820, "status": "ok", "fallback": False,
"in_tokens": 1100, "out_tokens": 350},
{"request_id": "req-2", "latency_ms": 940, "status": "ok", "fallback": False,
"in_tokens": 1250, "out_tokens": 410},
{"request_id": "req-3", "latency_ms": 780, "status": "error", "fallback": False,
"in_tokens": 980, "out_tokens": 300},
{"request_id": "req-4", "latency_ms": 2100, "status": "ok", "fallback": True,
"in_tokens": 1400, "out_tokens": 520},
]
def p95(values: list[int]) -> int:
"""Nearest-rank p95 without importing statistics."""
ordered = sorted(values)
return ordered[max(0, (95 * len(ordered) + 99) // 100 - 1)]
error_rate = sum(run["status"] != "ok" for run in RUNS) / len(RUNS)
fallback_rate = sum(run["fallback"] for run in RUNS) / len(RUNS)
tokens = sum(run["in_tokens"] + run["out_tokens"] for run in RUNS)
checks = {
"error_rate": error_rate <= 0.02,
"p95_latency": p95([run["latency_ms"] for run in RUNS]) <= 1500,
"fallback_rate": fallback_rate <= 0.05,
"tokens_per_request": tokens / len(RUNS) <= 2500,
}
for name, passed in checks.items():
print(f"{name}: {'pass' if passed else 'fail'}")
print("verdict:", "go" if all(checks.values()) else "no-go")Key takeaways
Review the assembled system: architecture, request traces, guardrails, tests, cost and observability, and what to change before scale.
Every row of the readiness checklist needs a trace, a test or an eval report; a prompt sentence or a staging memory is not evidence.
Authority flows in one direction - the model proposes, code decides, the executor acts - and the guardrails stay in code.
Scale the cache, state, fallbacks, queue and evidence before 10x traffic; never trade the approval gate, allowlist or budget caps for latency.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.