The Riemann hypothesis and a hundred environment variables

Is code you can't defend really ready to hand off?

Rotem MeidanBy Rotem Meidan · · 6 min read
The Riemann hypothesis and a hundred environment variables - Is code you can't defend really ready to hand off?
Me, showing my colleagues what Claude authored in my name.

Claude helped me build a prototype of a new regression test orchestrator and migrate half my company's test suites in less than a week, on a complex system I had no prior familiarity with. The prototype showed that our tests could run up to 10× faster.

Then I sat down to review the code, and I stopped the migration.

The Bazel macro call that set up each suite's launch had a block of roughly a hundred environment variables. I tried to follow one suite from that declaration to the point where its tests actually ran. I could see the values being passed in. I struggled to tell how those values affected execution and which ones I'd need to supply for another suite.

The Java harness had another layer of configuration. The admin portal, for example, had a builder chain of about a hundred lines. This is how it looked like, more or less. Startup order, a classpath fix, and network policy, and JVM params all sit in the same chain, all mishmashed, with zero elegance.

Imagine a teammate asking me how to add a suite. Should they copy the environment block from a working suite? If a service needed different behavior, should they change a launch variable or the Java definition? I'd built the prototype with Claude, and I couldn't give them an answer I trusted.

I was so excided about the benchmark and had dashboards to prove how crazy this thing is, I almost treated the benchmark as evidence that its worth a merge. The prototype had shown why the project was worth pursuing. The review showed how much of the design I still had to work out.

What a result leaves to explain

Last month (Nov 2026), Anthropic mathematician Levent Alpöge announced that he and Claude had found a proof of the Riemann hypothesis, a problem about the distribution of prime numbers first posed in 1859. He released the proof in Lean, a system for checking mathematical proofs. Alpöge's announcement · Clay Mathematics Institute

The Lean library ran to roughly 17 million lines. Independent checks confirmed that the proof was valid and that it established the accepted formulation of the hypothesis. Mathematicians then organized a separate effort to explain the argument and find ideas they could use again. I kept thinking about the order of those events. A mathematician could use the verified result and still have plenty to learn from the argument. For the test runner, the benchmark answered the question I'd asked about speed. The next suite would bring its own requirements. Lean and Mathlib verification · G.R.H. Polymath

An override for the override

I think Claude could have added another suite to the prototype. It had plenty of working examples to follow. My concern was what would happen when a suite needed a different configuration. One more override could get that case running. The next exception could add another override on top. Each patch could pass review on the strength of a green run, even as it got harder to tell which setting would take effect.

That can happen in a hand-written system too. With an agent, it was easy to imagine getting through several rounds of changes before anyone stopped to ask which decisions belonged in the suite's configuration and which ones the runner should make. When a configuration change starts with copying a working suite, every special case in the example has a chance to become somebody else's default.

A second exception is a good moment to ask whether the API is missing a concept. Maybe two suites need the same kind of choice and should be able to express it the same way. That question is easy to skip when the patch already works and the next suite is waiting.

Could I explain the system at a whiteboard?

I'd use the same test I would have used before AI. First, draw the execution path from the declaration to the running test. Then show the API a developer uses to add a suite and explain what they need to specify. Finally, take a requirement the API doesn't handle yet and explain where you'd extend it.

I might know which value to set for today's suites and still have no idea what to do when a new suite needs a setting the runner never anticipated. A useful explanation gives the next maintainer a place to start. It tells them what the runner takes responsibility for, what a suite can decide, and where to look when that division needs to change.

Peter Naur called programming theory building in 1985. The team develops an understanding of how the program represents the problem, and that understanding helps it decide where a new requirement fits. I want the architecture and the API to give my future self a way back to that reasoning. The same goes for whatever angry LLM I hand the next migration to. It will have the repository in front of it, along with whatever decisions we made clear enough to recover from the code.

The second half of the migration

I went back and reshaped the API around how someone would actually add a suite. For the admin portal, the Java builder became a Starlark catalog entry of about 25 lines and a service-specific properties file. Here's the catalog entry with the same anonymized names.

"admin-portal": service(
    binary = "//services/admin-portal/src/main/java/com/acme/portal/server:AdminPortal",
    config_app = "admin-portal",
    profiles = ["docker", "billing_auth", "k8s_on_demand"],
    start_deps = ["redis"],
    readiness = [http_probe("/api/1.0/users/current/account")],
    named_runfiles = {"PORTAL_FRONTEND_JAR": "//portal-frontend/src/main/webapp:jar"},
    main_advice_classpath = "PORTAL_FRONTEND_JAR",
    jvm_flags = DEFAULT_JVM_FLAGS + ["-Xmx2g"],
    tripwire_tolerate = {
        "com.acme.db.druid.host": "the legacy env has one), the tests pass without it",
        "com.acme.datalake.es.host": "boot-time health check of Elasticsearch (outside the legacy env too), non-fatal",
    },
    env = {"SERVICENAME": "acme-admin-portal"},
    ports = {"server.port": 12080, "management.server.port": 8103, _METRICS_PORT: 8092},
    addresses = {
        "com.acme.db.redis.port": addr("redis").port,
    },
),

The actual parameters, and their meaning does not really matter for the purpose of the article, the fact that the API was now defined, explicitly, extensibly, now it makes sense at a glance, to me, and probably to others as well, does, a alot

With a catalog of defined services, it is now really easy to follow the harness configuration, what it needs to launch the portal. start_deps, waits_for, and readiness describe startup order and when the service is ready. addr("redis").port tells the harness where to wire in the Redis fixture's port, and other things that probably won't interest you as a reader.

Then the rest of the migration was a breeze. Agents worked through the remaining suites with very little effort from me or anyone else on the team. For each suite, they could see what the harness already handled and where to put the choices specific to that service.

Share

Keep reading

You just read the theory. Now practice the interview.

AI-guided mock interviews on a live canvas. Real system design problems, graded like the real thing.

Discussion