R217 · AI-built software and its verification › Test oracles for agent-written code

fast-anything: port only the hot functions to Rust, gated on replayed real calls

Read the original

Authors André Lindenberg (shared)

test-oracleslegacy-migrationcoding-agentsperformanceopen-source

Source: EL4CTEO/fast-anything on GitHub (MIT; created 21 Nov 2026, early stage), README. Surfaced in a LinkedIn post by André Lindenberg. Benchmarks are the author's own.

The claim

Rewriting a whole app in Rust takes months. Most runtime sits in a few functions. So profile the app, have a coding agent port only the hottest pure functions, prove each port behaves identically on real recorded calls, and swap it in behind a reversible switch.

How it works

StepWhat happens
scanProfiles the running app and ranks functions by time spent multiplied by how portable they are (top-level, deterministic, plain-data inputs). It says why a function cannot move.
portRecords up to 500 real calls of the chosen function and creates a one-function Rust crate plus a TASK.md for the agent.
agentClaude Code, Codex or any stdin-driven command writes the Rust.
verifyRelease-builds the port and replays every recorded call, plus derived edge cases answered by the original.
enable / disableSwaps the Rust in or out via one marked block that is removed byte for byte. An env var forces the original at any time.
bench, reportTimes the whole app, original against Rust in interleaved runs, and emits a Markdown and SVG summary for the PR.

It is distributed as a CLI (npm or cargo), a Claude Code plugin, an MCP server with eight tools, and a skill. Bindings: PyO3 for Python, napi-rs for Node and TypeScript. Ruby, Java, Go, PHP, C and C++ use one C entry point that takes and returns JSON.

The verification gate

Results (author's runs)

AppBeforeAfter
Python fuzzy dedupe, 700 names4.91 s42 ms (116x)
PHP fuzzy dedupe, 600 names2.94 s53 ms (55x)
Go fuzzy dedupe, 3,000 names3.02 s144 ms (21x)
TypeScript fuzzy dedupe, 2,000 names3.11 s155 ms (20x)
Ruby fuzzy dedupe, 400 names3.13 s228 ms (14x)
C mandelbrot431 ms127 ms (3.4x)
Java fuzzy dedupe, 4,000 names3.50 s1.18 s (3x; 11x on the function, the rest is JVM start-up)
C++ fuzzy dedupe, 6,000 names3.02 s1.09 s (2.7x)

A design point worth keeping: it ports the outermost loop it can, so execution crosses into Rust once rather than millions of times. Porting only the inner Levenshtein function gave 35x and 1.9x instead.

Where it fits

This is a narrow instance of "pointable" agent work. The original function is the authority, its behaviour at a recordable boundary (arguments in, value or error out) is the check, the agent cannot edit that check, and the job ships one function at a time behind a fallback. It is the per-function sibling of whole-app port tools that gate each unit on replayed recordings.

Tradeoffs

Failure modes

Review checklist

Connections

See R217 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.