By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The Harbor Supply support graph began as a TypedDict and one node that copied a message. Thirty steps later it routes lookups and refunds, gates writes behind an interrupt, resumes on a different worker process, retries transient failures and runs behind an authenticated HTTP boundary. That is enough machinery to move money, which means the next step is not another feature. It is a review.
A production readiness review is an evidence exercise. Nobody is asking whether the happy path works; they are asking what the leftover states look like when it does not: a refund paused during a deploy, a retry that fires after the vendor already committed, a schema change that meets last week's checkpoints, a customer asking for a thread that spans three graph versions. Six gates cover those questions, and each gate has one question, one artifact and one fail signal.
Open the state module and read it as a contract rather than a bag of fields. Every key should have one owner among the sequential writers, or a reducer if parallel writers legitimately merge into it. Values should be typed, small and free of secrets and blobs, because the checkpointer writes them after every superstep and the trace shows them to everyone with access. A schema_version field belongs in the schema from the first deploy, not from the first incident.
TypedDict is the state schema, imported by every node.add_messages or operator.add.schema_version is present, and every migration between versions is a pure, idempotent function.Read the router as a decision table. It should be a pure function of state, return a closed set of labels, and have a mapping for every label plus a fallback. The read and write paths should be visibly different in the drawing: a lookup may reach the tools node and END, but the refund execution node's only incoming edge should be the approval branch. When routing is dynamic rather than a fixed label set, the same review applies to Command(goto=...), with the bonus that the state update travels with the routing decision.
The pause is a checkpoint, so the gate asks whether the checkpoint store is durable and whether the thread id is authorised. A database saver, not InMemorySaver; one thread per conversation, never a client-supplied id; a resume endpoint that validates the decision, checks expiry and records an audit trail. And the node body before interrupt() runs again on resume, so side effects belong after the pause or behind an idempotency key.
Command(resume=...) on the same thread id.Classify the failures first: transient infrastructure errors get a bounded RetryPolicy with an explicit retry_on; permanent errors go into state and travel down a fallback edge; ambiguous writes get idempotency. The duplicate-refund incident is the canonical gap: a timeout after commit is indistinguishable from a timeout before commit, so the only safe retry is one whose intent key returns the first result. The same rule covers interrupt re-runs and replays.
RetryPolicy is attached per node, bounded and explicit; the node body is safe to re-run.A compiled graph is a library object; production adds a process that builds it once, an authenticated HTTP boundary and a durable checkpoint store. The board should see a readiness probe that touches the real dependency, a resume endpoint, and an observation story at three levels: LangSmith traces for what ran, the checkpoint store for what is paused, and structured logs for the durable record. Limits, health checks, an evaluation set and a rollback path complete the gate.
Checkpoints outlive deploys. The final gate asks what happens to a thread written by the previous version: additive optional fields are safe, while renames, type changes, reducer changes and removals are migrations. Version the state and migrate paused threads before they resume, because a resume continues at the pending node rather than at START. Then show the replay: fork the thread, run it against stand-ins and keep the original thread as evidence.
# Read the record; nothing is re-executed here.
config = {"configurable": {"thread_id": "thread-c91"}}
for snapshot in graph.get_state_history(config):
print(
"next", snapshot.next,
"| version", snapshot.values.get("schema_version"),
"| pending", bool(snapshot.next),
)| Gate | Question the board asks | Evidence to bring | Fail signal |
|---|---|---|---|
| State schema | Can every writer be explained and every stored value defended? | The TypedDict, reducer annotations, a field-by-field ownership note and schema_version | A key with two writers and no reducer, or a secret in state |
| Routing | Can a write happen without a decision? | The router function and its label map, the compiled-graph drawing, and the single incoming edge on the write node | A write node reachable from a model label or from START |
| Checkpoint and interrupt | Does a pause survive a restart and a deploy? | Database saver configuration, thread authorisation, the resume endpoint and the approval audit record | InMemorySaver, a client-supplied thread id, or a side effect before interrupt() |
| Retries and idempotency | What happens when a call fails after it already committed? | Per-node RetryPolicy, the retry_on list, the intent-key derivation and the commit-then-timeout test | A write node retried with no key, or a broad retry_on that also retries validation errors |
| Deployment and traces | Can you answer what ran, what is paused and what failed from outside the process? | Build-once wiring, health and readiness probes, trace samples, log fields and the evaluation set | Compiling per request, no trace on write paths, or a pause returned as an error |
| Versioning and replay | What happens to threads the new code did not write? | The schema_version history, migration functions, one migrated paused thread and a sandbox replay report | Resuming old threads on new readers with no migration, or replaying the production thread |
Walk the six gates in order and stop at the first fail signal. The board does not need a demonstration; it needs the artifacts. If a gate cannot produce its artifact, the graph is not ready, no matter how good the demo was.
That is the whole course in one sitting: state that names what the system knows, routing that names what it may do next, checkpoints that survive the process, interrupts that put a person in front of the irreversible step, retries that respect effects, traces that answer questions after the fact, versioning that lets old pauses meet new code, and replay that turns an incident into a test. The graph is not production-ready because it runs; it is production-ready because every one of those claims can be checked.
Key takeaways
State is the contract: one typed schema, named owners and reducers, no secrets or blobs, and a schema_version from the first deploy.
Routing is a pure decision table: closed labels, a mapping for every label, a fallback, and exactly one entrance to the write path — the approval edge.
A pause is a checkpoint: a database saver keyed by an authorised thread id, an interrupt payload returned as data, and a resume through Command(resume=...).
Retries are for transient failures, fallbacks turn permanent failures into state, and every write derives an intent key so a retry returns the first result instead of repeating the effect.
One compiled graph per process, one thread per conversation, and three observation levels: traces for what ran, checkpoints for what is paused, logs for the durable record.
Checkpoints outlive code: additive changes are safe, renames and type changes are migrations, and paused threads must be migrated before they resume because a resume continues at the pending node.
Replay is evidence, not rollback: fork the thread, replay it against stand-ins and keep the original as the incident record.
The readiness review is the deliverable: for each gate, an artifact rather than a claim.
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.