Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.
Audit: where rust-anything can say something false, and how to verify it better
Date: 2026-11-28. Method: 16 independent read-only auditors, each with a disjoint set of files, each told to read every line of its files, trace every suspicion through the code and mark it CONFIRMED / PLAUSIBLE / WEAK. This file merges their 16 reports. No source file was changed; every report in this folder is a finding, not a fix.
"Hallucination" here means the tool, its docs, or its prompts state or accept something false:
- H1 false pass (diff/gate/replay/lift/enable say OK, the port differs)
- H2 false claim (a number, label or sentence the repo's evidence does not back)
- H3 misleading advice to the agent (analyze/profile/go/MCP/skill)
- H4 cheat path (a way to pass without really porting)
- H5 environment-dependent verdict
- H6 silent skip or degrade that still exits 0
Read this first: the five things that matter most
- The recording is not tamper-proof, and the checks that guard it fail open. Deleting
recorded-from.jsonswitches off both the stale-recording and the edited-recording checks, with no message.diff,enable,reportandgonever run the edited-recording check at all. I read the code myself:recording.rs:302-333returnsNone("nothing to check") when the file is unreadable. (A1-03, A2-01, A9a-01, A4b-01) known-diffs.jsonland--float-toleranceare unbounded escape hatches. Thebehaviorcheck ispassed: d.failed == 0(I readgate.rs:~990); accepted known diffs and "entries added since the last gate" only change the detail text. An auditor rango: 8 of 13 cases wrong, oneknown-diffsline each, output "13/13 cases match", "gate passed", "switched on", exit 0. A tolerance of 0.9 is accepted, saved, and printed by no verdict line. (A2-03, A4a-go-01, A9a-03, A1-05, A4b-02)- Functions that change their arguments or print, and return nothing, pass with an empty port. Only the return value is recorded and compared (C is the exception). This was found independently for Python, Go, Java (A6a-01, CRITICAL), Ruby, Kotlin, C#, PowerShell (A6b-01), TS (A3-06) and at the driver level (A7b-06).
- "Both sides threw" counts as agreement, and some Rust panics look like thrown errors. TS/JS
accepts any throw for any recorded throw (DECISIONS L7); the Python driver accepts a Rust
TypeErrorfor any recorded error; a wasm panic isRuntimeError: unreachable, whichdiffdoes not reject; a Go panic on the JSON path is accepted too. Meanwhiledocs/faq.mdsays errors are "checked against the original like any other output". (A8-01, A7b-02, A7a-01, A7a-03) app liftandpackagecan claim "pure Rust" / "verified" while the original is still used.liftonly checks that the glue text does not containoriginal::and prints a hard-coded "no fallback path left"; a glue that runspython3 /abs/app.pythroughCommandwas "Lifted: pure Rust app" and passed 0/68 with the original renamed (A5a-01, CRITICAL, run by the auditor). The napi package silently falls back to the original JS, sodiffthrough it can report N/N with no Rust running (A5b-01).packageexited 0 on a crate ofunimplemented!(A5b-02).
Counts
Each auditor's own tally (critical / high / medium / low-or-weak). Many findings overlap between reports, so the sum (about 2 / 45 / 104 / 83, roughly 230 raw findings) is not 230 distinct bugs.
| Report | Area | C | H | M | L |
|---|---|---|---|---|---|
| A1 | record/diff comparison core | 0 | 6 | 9 | 6 |
| A2 | gate, enable, shadow, reports | 0 | 7 | 8 | 4 |
| A3 | analyze, bridge, TS front end | 0 | 6 | 7 | 3 |
| A4a | profile, go | 0 | 4 | 6 | 3 |
| A4b | MCP, CLI, skills, evals, CI | 0 | 2 | 8 | 4 |
| A5a | whole-app CLIs, lift | 1 | 5 | 8 | 4 |
| A5b | HTTP, package, Android | 0 | 3 | 6 | 6 |
| A6a | Python, C, Go, Java plugins | 1 | 3 | 6 | 4 |
| A6b | Ruby, Kotlin, PHP, PowerShell, C#, Swift | 0 | 1 | 6 | 7 |
| A7a | generated bridge code 1 | 0 | 2 | 4 | 8 |
| A7b | generated code 2, drivers | 0 | 1 | 5 | 6 |
| A8 | docs vs evidence | 0 | 1 | 11 | 9 |
| A9a | test quality, big suites | 0 | 2 | 7 | 4 |
| A9b | test quality, rest, fixtures | 0 | 0 | 4 | 5 |
| A10a | ESLint and Prettier demos | 0 | 2 | 4 | 2 |
| A10b | other demos | 0 | 0 | 5 | 9 |
Cross-cutting themes (de-duplicated)
Each theme lists the report IDs that found it. Start with the theme, then open the reports.
T1. Recording integrity fails open (H1, H4, H6)
recorded-from.jsonmissing/unparsable means no stale check and no tamper check (A1-03, A2-01, A9a-01).diff,enable,report,godo not run the tamper check;enabledoes not run stale or the cheat guard either, onlygatedoes (A1-03, A4b-01). An auditor deleted the failing cases fromcases.jsonlandenableswitched the broken port on.- A recording may shrink; an export with zero cases passes
gateandenable; nothing ratchets case count or coverage (A2-02). recordcan silently record fewer cases than it generated: an original that callsprocess.exit(0)midway recorded 14 of 40+, printed "Recorded 14 cases ... 100% coverage", exit 0 and overwrote the good recording (A1-02). Drivers for Ruby, PHP, C#, Java, Swift and Go drop cases whose result is not JSON-encodable or fails to decode, with no count, exactly the byte-slicing traps (A7b-01, A7a-04). HTTPapp recorddrops failed requests as "timed out" and can record 0 cases with exit 0 (A5b-05).diff.jsonis not deleted before the driver runs, so a port that just callsexit(0)re-reads the previous green run (A1-01).- The fingerprint covers only the unit's own file, not imported helpers (A1-04); nothing stores the original's runtime version at record time (A5b-08).
"lifted": truein the editablerust/app/rust-anything.jsonmakesgateskip literals, tests, recording, size and behavior, and still print "checked by app replay" (A9a-02).
T2. Escape hatches that loosen the verdict silently (H1, H4, H2)
known-diffs.jsonl: no cap, no gate failure when it grows, and the card says "Same result ... on all N cases" (A2-03, A9a-03, A4a-go-01).--float-toleranceup to 0.999 and--ignore-key-order, both saved and not printed (A1-05, A4b-02). With a tolerance set, key order is ignored for every language except TS and Python (A1-05).--forceonenable,// recorded-literal:,// INFALLIBLE:and "delete tests.json" are unchecked, uncounted, and advertised in the failure text (A2-07).
T3. Errors are compared too loosely (H1, H2)
A8-01, A7b-02, A7a-01, A7a-03, A10b (Python TypeError). Also the C driver counts recorded crash:
cases as passed without running the port, and that count is inside "N/N" (A7b-04).
T4. Only the return value is compared (H1)
A6a-01 (CRITICAL), A6b-01, A3-06, A7b-06. Printing and in-place mutation are invisible in every language except C, which records arguments back.
T5. Wildcards, normalisation and sinks hide differences (H1)
app replay: a literal[..]or lone...line in the original's output becomes a wildcard (A1-06, A5a-04); missing trailing newline, CRLF vs LF, blank vs empty all pass (A5a-02, A1-07); the build's extra files or deletions are never compared (A5a-03); a two-run noise line with a different token count becomes a whole-line wildcard (A1-08).- HTTP: only recorded headers outside
SKIP_HEADERSare compared, so a port that adds or drops ETag, CORS, CSP and Content-Disposition passes (A5b-04). SMTP: non-UTF-8 charsets become U+FFFD so different mail bodies compare equal (A5b-07). - Python driver records numpy,
datetime,Decimal,Fraction,UUIDby type name only (A7b-03). - Go strings are lossily converted to UTF-8 on input and in
canon(A7a-04/05).
T6. Vacuous recordings that print a green number (H1, H3, H6)
- Functions with function-valued or instance-valued parameters cross as JSON; 169 of 169 recorded cases threw and nothing in the output says the recording is vacuous (A3-04, A3-05).
- Python
int(s)/float(s)parameters typednumber, so no string is ever recorded (A6a-02); C array pointers become one-cell outs, so recordings hold out-of-bounds garbage and SIGSEGVs (A6a-03); Go named types areunknown(A6a-04); RubySymbolmapped tostring(A6b-04); zero-argument exports get one case andENV["HOME"]was recorded as/rootinto a committed file (A6b-03); rest parameters dropped but "Coverage 100%" (A3-02). gohas no minimum case count and never shows generated vs captured cases: 13 cases, 5 of them exceptions, was enough to switch a wrong port on (A4a-go-02).fuzzcan print "0/0 match", exit 0 (A1).- Batch classes and hand-written
<Fn>Indexare never recorded, diffed or gated in any language, but STATUS.md calls--batch"Verified" (A7a-02).
T7. Gate's cheat guard has holes (H4)
Hidden files via src/.ignore, hidden dirs, generated file names, code after the first
#[cfg(test)] (A2-04); literals misses negative numbers, hex, split strings, a+b, one big table
literal and tables in include_str! files or lib.rs (A2-05, A9b-07); nothing detects shelling out to
the original, include_bytes!, build.rs or path dependencies (A2-06, A5a-06); the panics check is
defeated by a #[cfg(test)] line above, a // inside a string or a panic in a helper (A1);
assert!(true) and should_panic pass the tests ratchet (A9a-05).
T8. Fallback to the original is reported as Rust (H1, H2)
lift (A5a-01), napi package index.cjs (A5b-01), CLI package ships a release binary no replay
ran and its staleness check ignores the wired crates (A5b-03), package verifies nothing (A5b-02),
enable prints "On" without checking the module loads (A2-08).
T9. The planning tools can steer an agent wrong (H3)
analyze: TS scan misses regex classes,.length,[...s],.sort(),==, Date, Math, console, module state: 24 lines with all of them got readiness 99, zero risks (A3-01). Priority rewards the risk it penalises (A3-03). Python/Go/Java scans match exact text and miss aliases (A6a-05..07). No plugin flags global/env/clock/file state; fixtures came out "ready" 86-98 (A6b-02). A parse error silently shortens the export list whilebridgeprints "Created" (A6a, A6b-06, A3-07, A3-08).profile: sleeping and thread-pool work are ranked hot ("66% port it" with 0 ms self time) andgopicks them (A4a-prof-01/02); the same workload gave 25-53% across runs with no sample count or confidence (A4a-prof-03/04).crates.tomlhas manyfit = "good"rows that overclaim (moment/dayjs to jiff, minimist/yargs to clap, lodash) and a deprecated crate (serde_yaml) (A3-12).risks.rsadvisesdiv_euclidfor Python floor division, which is wrong for negative divisors (A2-15).
T10. Claims exceed evidence (H2)
- STATUS "Verified" is applied against its own definition:
go"Verified (fixtures)",shadowand--batchTS-only, whole-app runs Node-only, "gate passes" on ESLint/Prettier covers only the wrapper crate, and those runs predate the cheat checks added in 5.0.0 (A8-03, A8-12). - The how-it-works table says "the same 31 titles";
src/risks.rshas 34, the three Swift risks are missing from the table (A8-02). README saysgoworks for PowerShell;goneedsprofile, which refuses PowerShell (A8-04). The sandbox is advertised with memory limits on macOS where there is none (A8-05). Retracted Java 3x / Go 4x speedups are still published in five places (A8-06). English site says PHP and C# "cannot be bridged yet" while STATUS says Verified (A8-07). "7,925 x18n cases" vs 9,582 committed (A8-08, A10b).--redacthashes with unsalted FNV-64 yet is called "safe to paste" (A8-10). - ESLint "gate 10,192/10,192" is built only from cases already found matching, so it cannot fail; neither demo keeps its recorded cases or run logs, so the headline numbers cannot be re-run from the repo (A10a-04, A10a-05). The ffmpeg 226,447 has no committed cases (A10b).
- CI never requires dotnet, php, kotlinc, swiftc, npm or the sandbox tool, and some tests skip without
using
common::have, so "Tested" rows for those languages have no CI run;release.ymlpublishes with no test step (A4b-06, A9b-04, A8-11).
T11. Agent-facing surface (H3)
Every MCP tool returns isError:false for a failed verdict (A4b-03); MCP diff never reports a stale
recording, the CLI does (A4b-04); skills/.../c.md tells the agent to delete a case from
cases.jsonl, which gate then fails (A4b-05); enable/disable/go are annotated
non-destructive although they edit user sources; the eval probes only prove a Rust function was
entered, not that Rust did the work (A4b); the held-out set is well designed but public.
T12. Real porting bugs the recordings missed (H1)
ESLint demo lints files ESLint rejects at parse time (invalid regex literals, import defer) (A10a-01);
Prettier demo drops proseWrap from .prettierrc while formatting Markdown in Rust (A10a-02); Java
format_double ties differ from JDK 21 on about 1.5% of doubles in 2^50..2^51; glibc hex floats below
about 2^-1023 return 0 (A10b). No demo had a cheat path: no port shells out to, embeds or tabulates the
original (A10a, A10b).
What I confirmed myself (read the code, did not rely on the reports)
src/recording.rs:302-333:stale()andcases_tampered()both start withread_to_string(...).ok()?; a missingrecorded-from.jsonmeans "nothing to compare".src/lift.rs:766: the glue check isglue_text.contains("original::");lift.rs:~1021hard-codes "fallback rate 0 (no fallback path left)" in the replay line.src/gate.rs:~990:behaviorpasses ond.failed == 0; known-diff counts only reach the detail string.
Recommended fixes, in the order I would do them
Each is small and mechanical. The first four close most of the false-pass paths above.
- Fail closed on the recording. One
recording::verify()that returns an error whenrecorded-from.jsonis missing or unparsable (unless the manifest says "legacy recording") and checks stale + tamper + case count. Call it fromdiff,gate,enable,report,go,map, MCP. Store inrecorded-from.jsonthe number of generated cases, the number recorded and the number dropped; makerecordexit non-zero (or loudly flag) when any case was dropped, and makegatefail when the case count shrinks. (T1) - Make loosening visible and bounded.
gatefails whenknown-diffs.jsonlgrows since the last passing gate unless a deliberate--accept-known-diffs Nis passed; cap known diffs as a share of cases; printfloat_tolerance,ignore_key_orderand known-diff counts in the first line of everydiff/gate/report/card verdict; cap tolerance (default 1e-9, warn above 1e-6). (T2) - Record post-call state. Record arguments after the call for every language (C already does) and
compare them; until then, block exports that mutate arguments, return nothing, or print, and
say so in
bridge. (T4) - Add a held-out check to
gate: a fresh-seedfuzzplus perturbed recorded arguments, on by default (A2's top recommendation). This beats most individual bypass tricks. - Ship a verifier self-test.
rust-anything selftest(and a CI job) builds small deliberately wrong ports per language (no-op, always-throw, hard-coded table,exit(0), wrong exception type, missing mutation, extra output) and asserts thatdiffandgatefail on each. Todaygatehas only one failing-through-gate()test (thebehaviorcheck) (A9a-04, A9b-01). - Error comparison: compare the original's exception type by name; reject panic signatures
(
unreachable,Rust panic:) on every path; addcatch_unwindfor wasm; count "both threw" cases separately in the verdict. (T3) - Hide the original when verifying
lift,packageand shadownewmode: run the replay with the original's interpreter and sources made unavailable, and makeindex.cjsfall back to an error underdiff. Replace the textualoriginal::check with that run. (T8) - Delete
diff.jsonand use a run nonce before every driver run. (A1-01) app replay: compare bytes exactly by default; take wildcards from an explicit per-case marker file, not from in-band text; compare extra written/deleted files. (T5)- Harden the cheat guard by parsing with
syninstead of text: every.rsfile in the crate and its path dependencies,build.rs,include_*!,Command::new,std::fsreads of files outside the crate, and count each escape-hatch comment in the card. (T7) - Planning accuracy: add the missing TS risks, stop priority from rewarding risks, flag a
recording where most cases threw, show case source and count in
go, put a floor on profile share/run length and show sample counts, count more waiting kinds as waiting. (T6, T9) - Truth in labels: apply the STATUS rubric as written, fix the numbers in A8, mark rows that are
not run in CI, require toolchains in CI or say "not in CI", add a test step to
release.yml, and have MCP setisErrorfor a failed verdict. (T10, T11)
How complete is this audit
Be careful with "every line":
- About 88k lines of
src/and 23k oftests/were each assigned to one auditor, and most reported reading their assigned files in full. Not read in full (per their own ledgers): most of A10a's port internals (about 70k lines of ESLint/Prettier were sampled, glue and manifests read), parts of A10b's ffmpeg bodies, about 5,000 lines ofjson-server-js, the json-serverservice-rsport and one x18n crate (message-tree-rs); A8 did not read about 780 non-English website pages or the translated READMEs in full (it spot-checked seven status tables); A4b did not readdirectory/or the plugin icon; A1 read only parts ofapp.rs,harness_py.rsand the other drivers. Each report's "coverage ledger" has the exact ranges. - Several findings are read-from-code and were not executed (marked PLAUSIBLE, or "CONFIRMED by reading"). Examples: A7a-01 wasm panic, A5b-03, A4b-02, A3-06 no-op port. Kotlin, C#, Swift and PowerShell have no toolchain in this environment, so those drivers were read, not run. The PHP original could not be run (the sandbox refused the downloaded PEAR source).
- Auditors ran a copy of a prebuilt debug binary (v5.0.2, which may not equal HEAD) in scratch
directories. A baseline
cargo test --no-runbuilt cleanly; I did not run the test suite. - The reports are model-written. I re-read three of the top claims in the source (above) and they hold.
The rest is the auditors' word, with their evidence in each report. Check a finding against its
file:linebefore building a fix on it. - Skills: none of the Matt Pocock skills are installed here; only
grill-me, which needs you awake to answer, so I did not use it. The method (reproduce, minimise, hypothesise, then ask what would have caught it) is in the audit brief. If you want an interview-style pass later,grill-meon the fix list above would be the use for it.