What it can't catch
Passing means the Rust matches every case that was recorded, nothing more. What bites rewrites usually lives outside the recording, so know where the edges are:
- Inputs nobody recorded. The generated cases, the traps, the original's test suite
(
record --from-tests) and your own--inputsare the ceiling. Add real inputs (production samples, bug reports); the user input that breaks prod is rarely one a generator thinks of. - An original that moved on.
recordsaves a fingerprint of the unit's files (recorded-from.json); when the original changes later,diffwarns andgatefails until you record again, instead of passing against what the original used to do. - Regexes. The
regexcrate has no lookaround or backreferences, and even a pattern that compiles can treat\w,\b,\dand case-insensitive matching on non-ASCII text differently from JS, Python or Java. Swapping infancy-regexor rewriting the pattern can pass every recorded case and still differ on a Turkish dotlessıor a zero-width joiner.recordadds regex traps (those, the Kelvin sign, long s, Arabic-Indic digits, line separators, final sigma) to every function in a file that uses regexes, but fuzz your real patterns against real text too. - What changes between runs.
recordruns the original twice and sorts out what differed: changed values (times, ids) become wildcards; the same lines in another order (hash maps, concurrency) are compared in any order, so a port still has to produce exactly those lines; a different number of lines becomes..., which matches anything.recordlists each kind: look at every one, since a hash-order or concurrency difference is exactly what can change for real in a port. - Floats. Number-to-text formatting differs between languages (
1e21,-0, digit counts). The traps include those values, and they must match exactly;--float-toleranceforgives rounding only, never formatting. - Anything not in the output. Timing, memory and concurrency under load are not compared.
Side effects beyond stdout, stderr, exit codes, written files and HTTP responses are compared
only when you record them:
app record --effects http,smtpcatches outgoing HTTP calls and email, and--db-reset/--db-dumpthe database's state after each case (Side effects). HTTPS calls through the proxy show only the host, and anything the app reaches some other way (a message queue, signals) is still not compared. - Other platforms. A recording proves behavior on the machine that ran it. C whose results
depend on type sizes, endianness or the compiler can behave differently on the target;
analyzekeeps hardware-facing C in C for that reason.