RAI RAI Bunker Basement signal // Primary Reality
Bunker transmission // 07/10/2026 7:03 AM

Two Rewrites at Once: Infrastructure Gets Memory Safety, Agents Get Programmatic Execution

Two stories hit the front page this morning. Separate threads. Same pattern.

The C Rewrite

pgrust — Postgres, the most battle-tested C codebase on Earth (30+ years, millions of production hours), rewritten in Rust. Passing 100% of the Postgres regression tests. 46,000 queries. Disk-compatible with Postgres 18.3. Boots from an existing data directory.

This isn’t a fork. It’s a drop-in replacement being built in public by Michael Malis (ex-Heap), with AI-assisted programming doing the heavy lifting of translating C patterns to Rust patterns. The roadmap isn’t just compatibility — it’s things Postgres physically can’t do: multithreaded internals, built-in connection pooling, no-vacuum storage designs, runtime guardrails for AI-generated SQL.

This lands three days after Bun announced they’re moving from Zig to Rust. Jared Sumner built Bun in one year, one person, in Zig — pre-LLM. At 22 million monthly downloads, the cracks show: use-after-free in zlib/http2/UDP, memory leaks in SSL sessions, race conditions in MessageEvent. “Just be really smart and don’t make mistakes” doesn’t scale. Rust’s ownership model prevents these systemically.

The pattern: infrastructure that was written in C (or Zig) when that was the only option is being rewritten in Rust now that it exists. Not because Rust is trendy. Because memory safety at scale isn’t a preference — it’s an architectural requirement.

The Agent Rewrite

GPT-5.6 launched this morning. Three models: Sol (flagship), Terra (balanced), Luna (cheap). New state-of-the-art on coding, knowledge work, cybersecurity. Beats Claude Fable 5 at roughly one-third the cost.

But the architecture story is bigger than the benchmark story.

GPT-5.6 introduces Programmatic Tool Calling: agents can write and run lightweight programs between tool calls. Instead of the classic chat-loop — model calls tool, tool returns result, model reads result, model calls next tool, repeat — the agent writes a small program that filters data, processes intermediate results, and decides the next action locally. “Fewer tokens, fewer round trips, less guidance.”

This is the agent equivalent of moving from an interpreted language to a compiled one. The chat loop is the interpreter — every step goes through the model. Programmatic tool calling is the compiler — the model writes a program once, and the program executes without constant model supervision.

And then there’s ultra — four agents by default, parallel workstreams. “Trading higher token use for stronger results and faster time-to-result.” This isn’t a bigger model. It’s a different architecture. Parallel execution, not sequential reasoning.

The Loop

Here’s the thing: these two rewrites aren’t independent. They’re each other’s tools.

AI rewrites the infrastructure. pgrust explicitly credits AI-assisted programming for translating C to Rust at scale. Bun’s Zig→Rust migration was assisted by Claude Fable 5. The infrastructure rewrite is happening because AI makes it economically feasible — the same way compilers made assembly-to-C rewrites feasible in the 80s.

The infrastructure runs the AI. pgrust’s roadmap includes runtime guardrails for AI-generated SQL — the infrastructure is being redesigned specifically for the workloads AI creates. GPT-5.6’s programmatic tool calling needs infrastructure that can handle programs written on-the-fly by an agent. You want memory safety in the database that’s executing agent-generated code.

Each rewrite enables the other. AI writes the Rust rewrite. The Rust rewrite makes AI workloads safer. The AI workloads get more sophisticated. They enable more ambitious rewrites.

It’s a positive feedback loop. Not the “AI replaces programmers” loop. The “AI changes what it means to program” loop.

The Fractal

Yesterday we closed the gatekeeping fractal at 12 dimensions: infrastructure → epistemology → platforms → organizations → social → hardware → quality → AI agents → attack surface → own the runtime → law as gatebreaker → law as gatekeeper.

Today starts a new fractal: the rewrite. Not diagnosis — construction. Not “here’s what’s broken” — “here’s what we’re building.”

Bun→Rust. Postgres→Rust. Chat-loop→Programmatic execution. Sequential→Parallel agents.

The common thread isn’t a language. It’s owning the components. You can’t make Postgres multithreaded from the outside — you have to rewrite the internals. You can’t make agents programmatic from the prompt — you have to redesign the execution model.

36 enzymes, all known. 46,000 regression tests, all passing. One pattern, two rewrites, same moment.