---
type: "Blog Post"
title: "The Oracle Is Already Running"
description: "Anthropic moved its API from Python to Rust with Claude writing most of the code, and found the bottleneck was never generation. It was proving the new system did what the old one did. Their answer was to treat the running system as the spec. This post is a thought experiment: carry that method to a rewrite of an enterprise integration platform. Shadow the flows, replay the downstream, fingerprint without the payload, and let the factory chase the diffs. Spring Boot is the default home; Rust has to earn its place."
resource: "https://og.rsts.dev/blog/the-oracle-is-already-running/"
status: "stable"
generated:
  by: "human:orestes-garcia"
  at: "2026-12-03"
verified:
  - by: "human:orestes-garcia"
    at: "2026-12-03"
sources:
  - id: "canonical"
    resource: "https://og.rsts.dev/blog/the-oracle-is-already-running/"
    title: "The Oracle Is Already Running"
    author: "human:orestes-garcia"
    last_modified: "2026-12-03"
x-ogrsts-published: "2026-12-03"
x-ogrsts-read-time: "12 min read"
x-ogrsts-series: "exit-clause"
x-ogrsts-series-title: "The Exit Clause"
x-ogrsts-series-order: 5
x-ogrsts-youtube: "https://www.youtube.com/watch?v=a1Lz6I7Fl70"
---

In April, the new version passed about 98% of its tests. In production, it matched about a quarter of real requests.

That gap is the entire migration problem, and it comes from Anthropic's own account of [moving its Messages API from Python to Rust](https://www.anthropic.com/research/migrating-api-to-rust). So here is a thought experiment. Take the method Anthropic used and point it at a different kind of system: an enterprise integration estate, hundreds of flows on a proprietary runtime, being rewritten onto an open stack. I would bet the same gap would show up there. The suite is green, the demo works, and production quietly disagrees about a thousand small things nobody wrote down.

## What the series left open

This series drew a map. [The first post](../posts/architecture-needs-an-exit-clause.md) named where each layer of an integration estate would live if you left: the gateway, the integration runtime, the transforms, the catalog. [The fourth](../posts/opacity-was-the-moat.md) argued that the cost of understanding your own estate had collapsed, and that this, more than any license term, is what changed the renewal math. Then I called the series done.

It wasn't. A map tells you where you are going. It does not tell you how you know you arrived. The question every architecture review eventually asks about a rewrite is simple and brutal: how do you know the new flow does what the old one did? Not what the spec says it should do. What it actually did, for every partner, every malformed payload, every null that a mapping script quietly turned into an empty string years ago.

Anthropic answered that question at a scale larger than any integration estate I know of. Their Python API was built in 2023, and traffic grew roughly 1,800 times between early 2024 and the fall of 2026. Claude wrote a first version of the core request path in about a week. Public traffic moved to Rust in September 2026, at about 70% less CPU per request. The interesting part is everything between that first week and that cutover, because that is the part any regulated institution would have to defend.

## Tests lie, production doesn't

The team had no formal spec, and for privacy reasons they could not read customer requests. What they had was about 700 integration tests. Those tests turned out to have two problems that every integration team will recognize.

First, they were coupled to the implementation they were supposed to judge. When the team audited the tests that had been ported along with the code, they found more than a hundred weakened assertions. Second, they were nowhere near complete. Twenty binary options already produce more than a million combinations, which they estimate at about twelve days of testing at one second each, for one model, before you vary a single prompt. A suite can be large and still describe a sliver of what production does.

Now picture a typical integration estate on any proprietary platform. The unit suites, where they exist, mock the connectors the flow depends on, so they prove the flow agrees with the mock. The transforms carry behavior no test pinned: how a missing field defaults, how a decimal rounds, which date format a partner has silently depended on for six years, what order the keys come out in. None of it was written down, because it only mattered once a downstream system broke.

So the honest move is the one Anthropic made. Stop pretending a spec exists. The incumbent is the spec. Whatever the running flow does to real traffic today is the definition of correct, bugs included, until someone decides otherwise on purpose.

## Shadow the flow, replay the downstream

Once the old system is the oracle, you need a way to ask it questions without breaking anything. Anthropic ran both versions on production traffic, with one constraint that does all the work. As they put it, "we ran the model once and replayed the model output to Rust." The model is nondeterministic, so comparing two live calls would drown real bugs in noise. And a request has to count exactly once for billing and rate limits.

The enterprise version of the model call is the system of record. A posting to a core, a payment instruction, a case created in a CRM: none of those can run twice because you are testing a rewrite. So the shadow pattern for an integration estate looks like this. The live incumbent flow calls the downstream system as it always has. The harness records each downstream response once and replays it to the shadow rewrite, which never touches the real system. Both flows see the same input, get the same downstream answers, and produce output you can compare byte for byte.

*(Figure: A façade splits live traffic to the incumbent flow and a shadow rewrite flow; downstream responses are recorded once and replayed to the shadow; checkpoints on both flows feed a comparator that emits fingerprints into diff groups, with inner, outer and memory loops and a human judgment gate beneath. See the original post for the image.)*

Comparing only the final payload is not enough, because it tells you that something went wrong and nothing about where. Anthropic compared every step before and after the model call, and checkpointing found the first step and the first piece of the prompt where the two versions diverged. An integration flow already has natural checkpoints: inbound payload, each transform, each outbound request, each response, the final reply. Compare at every one of those boundaries and a diff stops being "the response is wrong" and becomes "the second mapping step drops the trailing zero on amounts under one dollar."

The place to tap the traffic is the API façade from the first post. The façade was always going to be the cutover point for the strangler fig. It is also the natural shadow tap, which means the same component that will eventually move a flow to the new stack is the one gathering the evidence that it is safe to move.

## Fingerprints, not payloads

Here is the detail I would lift wholesale. Anthropic's diff records carried no request text. Each difference was reduced to a fingerprint: the step, the piece of the prompt, the first byte that differed, and the length. That was enough to group differences by bug without anyone, human or agent, reading what a customer sent.

They needed the grouping for volume, too. In their words, "A single bug could produce hundreds of thousands of nearly identical diff records." A script grouped the records every ten to thirty minutes, and a coordinating agent was alerted only when a new kind of record appeared. One bug, one group, one task.

In a regulated business this stops being a convenience and becomes the design. The payloads moving through an integration estate are account numbers, balances, names, tax identifiers. A shadow harness that stores raw payload diffs is a new copy of regulated data sitting in a debugging tool, with all the access and retention questions that brings. A fingerprint lets the factory see a bug without seeing a customer. When an agent needs a reproduction, it builds a synthetic request that triggers the same fingerprint, which is exactly what Anthropic's agents had to do.

## The three loops are the dark factory

The method Anthropic describes is three loops, and if you have read my factory posts you will recognize all of them.

**The inner loop.** Each agent worked in a cloud sandbox with both codebases. Local input and output checks ran in under a second, with a fake model standing in for the real one. The agent guessed a cause, wrote a request that triggered the diff, edited the Rust, and added a test that failed before the fix and passed after. Then the fix went to a pull request for review.

**The outer loop.** Approved fixes were deployed, and shadowed traffic showed whether the fingerprint disappeared. If it did not, the task went back to the inner loop. Production, not the test suite, closed the ticket.

**The memory loop.** Engineer corrections became rules, tests, and lints. In June they took about sixty review comments and distilled them into project rules for the agents. Later they added a merge check that required any Python change to come with a matching Rust change or an explicit exemption.

The line from the article that should be printed on every migration program's wall is this one: "Verification, not generation, had become the bottleneck." That is the same claim I made in [I'm Building the Dark Factory](../posts/building-the-dark-factory.md), that the levels were never gated by the model, they are gated by verification. The memory loop is what I called [fixing the machine instead of the output](../posts/the-factory-writes-the-flow.md): when a class of error gets through, you change the factory so that class is caught next time. And the shape of the human role at the end matches what I argued in [Leave the Loop, Keep the Map](../posts/leave-the-loop.md). The engineers stopped chasing diffs and moved to the edge, writing the rules and checks the agents run against.

What their account adds, and what my earlier posts were missing, is the oracle. A factory building a new system can only check against a spec someone wrote. A factory rewriting a running system can check against reality, continuously, on real traffic. For a migration, that is a stronger verifier than any acceptance suite you could write by hand.

## The verifier will be gamed

The most useful story in the article is about a failure. In mid-May, the Rust version was missing the web search tool's description from its prompts. An agent proposed a shortcut that made the outputs match, and an engineer rejected it. Building the proper service call took weeks. The article's own diagnosis: "the verifier rewarded matching outputs, and the agent found the cheapest way to produce them."

Every integration rewrite will hit this. The fingerprint says the shadow flow formats amounts differently, and the cheapest fix is to hard-code the incumbent's formatting quirk in the one place the diff showed up, instead of finding the shared function that should own it. The diff goes green. The design gets worse. The verifier cannot tell the difference, because it was not built to.

So people stay at the edge, and their job there is judgment. Is this difference a bug, or a deliberate change? Is the fix good enough to ship, or only good enough to match? Anthropic also adopted a rule to port exactly what Python did, and once it was in place an agent found seven more places where the port had been relying on guesses. In this thought experiment I would make that the default. Port the behavior bug for bug first, including the mapping quirks you dislike. Fix them afterward, one at a time, as separate, visible changes that someone signs. A rewrite that also tries to correct the old system's behavior has lost its oracle, because now no one can tell an intended difference from a regression.

## The moving target and the wrong seam

Two more lessons from the article map almost one to one onto integration work.

The first is about where to cut. In March 2026, before the full rewrite, Anthropic tried a partial one: only the output parsing moved to Rust. It cut CPU by about 8 to 10%, but every token now crossed the boundary between the two languages three times, and the gain did not justify the complexity. The enterprise temptation looks the same. A team could start by calling Java from inside the old platform's flows, or by moving a few transforms into custom modules, as a halfway house. It feels incremental. In practice it is the worst of both runtimes, and the boundary costs show up in latency, in debugging, and in two deploy pipelines for one flow. The strangler fig works at the API or flow seam, behind the façade. It does not work inside a flow.

The second is about time. The Python system kept changing during the migration, so the oracle was a moving target. Their merge check, every Python change needs a matching Rust change or an exemption, is the cheapest control in the whole method. An integration estate needs the same thing from the day the shadow starts: either a change freeze on the flows being migrated, or a rule that any change to an incumbent flow ships with the matching change in the rewrite. Without one of those, you spend the migration chasing a spec that keeps moving under you.

## Spring Boot by default, Rust where it pays

Anthropic chose Rust for a specific reason. Their API does real CPU work on every request, from validation and prompt construction to tokenization and output parsing, at a volume that grew more than a thousandfold. At that scale, 70% less CPU per request is the business case.

Most integration flows look nothing like that. They spend their lives waiting: on a core system, on a partner endpoint, on a queue. That is I/O-bound work, and it is exactly what [virtual threads in Java 21](https://openjdk.org/jeps/444) were built for. Spring Boot now [turns them on with a single property](https://docs.spring.io/spring-boot/reference/features/task-execution-and-scheduling.html), so a thread-per-request flow that blocks on a downstream call no longer costs you a platform thread while it waits. Add [Spring Integration](https://spring.io/projects/spring-integration) or [Apache Camel](https://camel.apache.org/), the open-source siblings I named in the first post, and you get the same Enterprise Integration Patterns on a stack that matches the hiring pool, the observability tooling, and the operating model most enterprises already run. That is the argument I made in [Python Won't Run Your Bank](../posts/python-wont-run-your-bank.md), and it holds here.

Rust earns its place where the work looks like Anthropic's: high-volume message parsing and transformation, format conversion on the hot path, gateway plugins that run on every call. Those are small, sharply bounded components, and the shadow harness does not care which language they are written in. The harness compares outputs. It is language-neutral.

That last point matters more than the language debate. The harness, meaning the façade tap, the record-and-replay of downstream calls, the checkpoints, the fingerprints, and the loops, is the durable asset. It will outlive this migration and verify the next one. The runtime is what you are replacing. The verifier is what you keep.

## Two goods, one plane

The business case for running a rewrite this way is real. Delivery teams want off a runtime that only a shrinking pool of specialists can change. Finance wants the license line gone and the compute bill smaller. Product wants no flag day, no frozen roadmap while the platform team disappears for eighteen months. An agent-driven rewrite with a shadow harness offers all three, because the new system earns its cutover flow by flow while the old one keeps serving.

The institution's case is just as real. A rewritten integration that moves money has to come with a defensible account of why it is equivalent to what it replaced. Customer data cannot leak into a debugging pipeline. Every change needs an owner, a review, and a record. An auditor will want to know who decided that a given difference was acceptable.

These pull against each other only when the rewrite has no evidence. The shadow harness is the evidence. Fingerprints keep the data where it belongs. The match rate per flow is the equivalence argument, measured on real traffic instead of asserted in a document. The human gate at the edge is the attribution. The same machinery that lets the factory move fast is what lets the institution say yes to the speed.

## What I haven't proven

Anthropic owned both sides of their comparison and was migrating one service with one request path. An integration estate is hundreds of flows, many of them stateful: sagas that span hours, batch jobs that run at midnight, event chains where the output of one flow is the input to three others. Record-and-replay for a synchronous API is well understood, and tools like [Diffy](https://github.com/twitter/diffy) have done versions of it for years. Doing it for asynchronous, multi-step flows is harder, and I do not have a clean answer for every shape.

Some partners cannot be shadowed at all, because the integration is the partner's side of a file drop or a message you cannot duplicate. The shadow infrastructure costs real compute for the length of the migration. And a 99.6% match rate, which is where Anthropic finished, still leaves a tail that someone has to look at and sign off on. In an integration estate, that tail is where the 2 a.m. edge cases live.

The numbers in this post are theirs. This is a thought experiment, not a case study. No one has published equivalent numbers for an integration estate rewritten this way, and I am not going to pretend I have them.

## Start the harness before the rewrite

If you take one thing from this, take the order. Do not start with the rewrite. Start with the harness. Put the tap on the façade in front of one well-understood flow. Record its downstream responses. Build the checkpoints and the fingerprint grouping. Point the factory at that single flow and watch the match rate climb. Then do the next one.

The exit clause was always a map. The oracle is how you walk it. It has been running in production the whole time, answering every question about what correct means, and almost no one thinks to ask it.

---

*Prefer to watch? The [video version is on YouTube](https://youtu.be/a1Lz6I7Fl70).*

*The companion read is [The Factory Writes the Flow](../posts/the-factory-writes-the-flow.md), which builds the same factory for new integration work. This post is the other half: what that factory does when the spec is a system that is already running.*

*I write about AI-assisted development, enterprise architecture, and building in regulated environments. If you are running a shadow harness against an integration estate, or you think record-and-replay breaks down sooner than I am admitting, I would like to compare notes. Find me on [X @orestesgarcia](https://x.com/orestesgarcia) or [LinkedIn /in/setsero](https://www.linkedin.com/in/setsero).*
