The old program is the judge, now with sharper eyes: every mismatch says where it starts and
which bug it belongs to, live traffic can be shadowed, drift is checked in CI, and gate catches
ports that copy the recording instead of computing it. Ideas from Anthropic's write-up on moving
the Messages API to Rust.
-
bridgeon a crate folder that already has a port names the next step: run
rust-anything refresh <crate>to regenerate the bindings, pass--outor--namefor a new
crate, or remove the folder to start over (#568, #599 by @alvaroalonsoparrondo-a11y). -
bridge --kind napi(orwasm) on a unit that is not TS/JS stops before writing anything, with
--kind napi is for TS/JS units; mathy.py is Python and is bridged with PyO3, instead of writing a
napi crate for a Python unit that only fails atdiff. The--kindhelp says it is for TS/JS units
(#575, #598 by @alvaroalonsoparrondo-a11y). -
--float-tolerance -0.5(with a space) onrecord,diffandapp recordgets the range message
instead of clap'sunexpected argument '-0' found, anddiffchecks the tolerance before it
reads or runs anything (#574, #597 by @alvaroalonsoparrondo-a11y). -
diffnames where each mismatch first differs, asatin the JSON: the channel (return,
throw,return vs throworcall Nfor a class scenario), the JSON path ($.items[2].name),
the kind (value,type,missing key,extra key,length) and, for strings, the character
with a little context around it.app replaydoes the same for each failing field: the line
and column of text output, the JSON path in a JSON body, the status change (200→500). -
diff,app replayandreportgroup the failing cases that differ the same way into
distinct differences, each with a short stable id and a count, so 40 mismatches from one bug
read as one line.rust/app-cases/replay-report.mdgains a "Distinct differences" table before
the failing cases,reporta "Remaining differences" table (anddifferencesin its JSON)
while cases still differ, andgohands the agent each difference once with an example and
where it starts, instead of the first five raw mismatches. -
diff --redactandapp replay --redact(MCPredact: true) print mismatches as shapes only:
where they differ, types, lengths and hashes, never arguments, outputs or request paths. The
replay report is written redacted too, so it can be pasted into an issue or handed to another
agent. -
app shadowchecks a server build on live traffic: a proxy answers every request with the
original, then sends it to the build and compares status, headers and body with the saved
normalizers. The build's outbound HTTP and mail go to local sinks and its--freshfiles to a
copy of its own, so no side effect happens twice. Mismatches are logged to
rust/app-cases/shadow/mismatches.jsonlas redacted shapes (where each field first differs,
never values) and grouped into distinct differences at the end;--keepsaves the requests in
app record --inputsformat.--upstreamuses an original that is already running,
--requestsstops after a count. Servers only, no MCP tool. -
app drift [REPO] [--build CMD](MCPapp_drift) checks that the recording still describes
the original and the port still matches: it replays the original againstrust/app-cases
(cases it no longer matches changed upstream), lists examples in its docs that no case records,
and replays the build (rust/app, built with cargo, by default), marking each case "original
changed, port still old" or "port regression". It writesrust/app-cases/drift-report.md,
leavesreplay-report.mdas it was, and exits 1 on any change.docs/whole-apps.mdhas a
GitHub Actions workflow that runs it on a schedule. -
gatehas a cheat guard.literalsfails when the port writes three or more recorded arguments
or results (strings of 8 or more characters, numbers with 5 or more significant digits) that the
original's source never spells out, or namescases.jsonl,known-diffs.jsonlor
recorded-from.json; one or two are named and pass, and// recorded-literal: <reason>on a line
lets a library constant stay.testsfails when the crate has fewer#[test]s or assertions, or
more#[ignore]s, than at its last passing gate (kept in.rust-anything/tests.json).record
now also saves the number and hash of the recorded lines inrecorded-from.json, andrecording
fails when one of them was edited or removed; appended cases (fuzz --keep) still pass, and older
recordings are not checked until recorded again.go's TASK.md says so. -
ruleskeeps port rules inrust/RULES.md:rust-anything rules <repo>lists them and
--add "<rule>"appends one (an exact duplicate is skipped; a crate folder stands for its
repository).goputs them in TASK.md (and so in every retry prompt), both MCP prompts end with
them, and the MCP server's instructions, therulestool and the skill tell agents to read them
before porting and to add each correction the user makes. -
Docs and tests: translated READMEs link the Types and packaging pages, CONTRIBUTING lists every
test file, the FAQ states the PHP and .NET requirements,buildandrefreshhelp covers every
language, and new unit tests coverc_literal,local_module_version,shell_quoteand the
base64 helpers (#564 by @Lewandox, #578 by @XiaoBinGan, #585 to #596 and #600 to #603 by
@alvaroalonsoparrondo-a11y).
Upgrading
rust/app-cases/replay-report.mdgains a "Distinct differences" section and anatline above
each failing field, so a committed report differs once after upgrading: replay and commit it
again.gatehas newliteralsandtestschecks and an extendedrecordingcheck, which can fail
ports that passed before. A constant the original really takes from a library can stay with
// recorded-literal: <reason>on its line; to accept fewer tests on purpose, delete
<crate>/.rust-anything/tests.jsonand rungateagain to save a new baseline.