Skip to content

v5.0.2

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Nov 07:03
· 31 commits to main since this release
v5.0.2
e0c1894
  • profile on Java keeps the samples of every JVM the workload starts. Each one now writes its own
    recording (profile-<pid>.jfr) and profile reads them all, where they used to share one
    profile.jfr and the last JVM to exit replaced the others, so work done in a child JVM (a Gradle
    test worker, say) was lost (#743).

  • bridge --end-state replace|bindings|scaffold records what the unit's bindings are for once the
    port is done: replace (the original is deleted after cut-over), bindings (callers keep
    importing it, so the bindings are public API) or scaffold (the bindings are deleted at
    cut-over). It is kept as end_state in rust-anything.json (the MCP bridge tool takes it
    too), and crates bridged before it keep working without one.

  • The skill reads a short guide for the unit's language before porting (languages/ next to
    SKILL.md, one file per language): how errors, null, numbers, strings, collections and classes
    map to Rust, and the traps that made recorded cases differ in this repository. setup installs
    them with the skill, the plugins ship them, and the MCP port_unit prompt takes a language
    argument that adds the file. The skill now asks the end state before bridge, and says a port
    keeps behavior, bugs included: a fix lands in its own change after gate passes.

  • evals/ measures what the skill and tool add over an agent without them, with
    claude plugin eval and a no-plugin baseline: a TypeScript, a Python and a Go module whose
    callers must keep working while the functions run in Rust. evals/score.py checks the callers
    are unchanged, replays held-out inputs the agent never saw, and proves each call enters Rust.
    No results are published until a full run on stated hardware (docs/evals.md).

  • The MCP server serves the workflow skill over MCP's skills extension
    (io.modelcontextprotocol/skills, SEP-2640): skills/list, skills/get and resources/read
    at skill://rust-anything/, with each file's SHA-256 digest and size. A client that supports the
    extension gets the skill from rust-anything mcp alone, without a plugin.

  • gate no longer panics on a Go unit whose source file got shorter after bridge (the manifest's
    line pointed past the end of the file, as when the package is rewritten to call the Rust
    binding).

  • The README says how the tool decides a port is done, what reports and what migrates, how long a
    run takes, how to plan with no model and port with a strong one, and which agents it supports,
    plus a line about consulting for Rust migrations.

  • docs/install.md lists every way to give an agent the skill: setup, the Claude Code and Codex
    plugins, npx skills add erkamyaman/rust-anything, a copy by hand (with each agent's skills
    folder), and the MCP server by hand.

  • report writes what a reviewer needs into REPORT.md: the end state, every known-diffs.jsonl
    entry with its reason ("Intended differences"), and the exports kept in the original language
    with theirs.

  • gate's behavior line counts the known-diffs.jsonl entries added since the last passing gate,
    so a behavior change that lands in the same change as the port is visible.

  • analyze also flags Python bitwise augmented assignments (&=, |=, ^=, >>=) as
    Number semantics, alongside &, |, ^ and >> (and as //=, %=, **= and <<=
    already are for division and integer semantics) (#768 by @brixtonpham).

  • analyze unit notes say "1 parse error", "1 npm dependency not in the crate table: check it by
    hand" and "1 import uses aliases or virtual modules and was not followed" when the count is one,
    instead of the plural (#767 by @brixtonpham).

  • record, diff and bench on a Java unit use the CLASSPATH variable for classes from outside
    the source tree (a Gradle or Maven module's libraries). javac already read it, but the driver
    ran with its own -cp, so every case recorded NoClassDefFoundError instead of a result. When
    javac fails on missing packages or symbols, the error now says to set CLASSPATH
    (#744, #765 by @Layfate).

  • record on Windows reports how much of a TS/JS original the cases ran, as it does elsewhere.
    V8 names files file:///C:/... and the unit's files were compared as \\?\C:\..., so no file
    matched and the coverage line was missing (#763 by @Layfate).

  • The repository checks text files out with \n line endings on every OS (.gitattributes).
    Git for Windows turns on core.autocrlf by default, which gave docs/tools.md and
    skills/rust-anything/SKILL.md \r\n endings, so tests/tools.rs and tests/skill.rs failed
    on a fresh Windows clone (#761 by @Layfate).

  • map names a crate folder whose rust-anything.json does not parse with / between folders
    on Windows too (rust/util-rs), as it names every readable port, instead of rust\util-rs
    (#760 by @Layfate).

  • profile on a Java workload keeps JFR's "Started recording" banner off stdout
    (-Xlog:jfr+startup=error). Every JVM the workload starts inherits the JFR options, so a build
    tool that runs java to read a JDK's version, as Gradle does for its toolchains, failed on the
    banner with Unable to determine version for JDK before the build began
    (#742, #759 by @Layfate).

  • profile on a Java workload reads all of jfr print's output. It kept only the last MiB, so a
    recording of more than a second or two failed with jfr output: expected value (#759).

  • go says "captured 1 real call" / "N real calls", "recorded N cases (N threw in the original)",
    and "gate: 1 check fails" / "N checks fail" instead of "(s)" and "throw"
    (#732, #757 by @Papito084).

  • go retry prompt says "1 distinct difference" for one difference and "N distinct differences"
    for more, instead of "N distinct difference(s)", and "1 case" instead of "1 case(s)"
    (#731, #756 by @Papito084).

  • record --from-tests says "Captured 1 call from the tests" for one call and
    "Captured N calls from the tests" for more, instead of "Captured N call(s)"
    (#733, #755 by @Papito084).

  • record says "Left out 1 input the original ran too long on" for one timed-out
    input and "Left out N inputs ..." for more, instead of "Left out N input(s)"
    (#734, #754 by @Papito084).

  • fuzz --keep says "Kept 1 case in ..." for one kept case and "Kept N cases in ..."
    for more, instead of "Kept N case(s)" (#735, #753 by @Papito084).

  • enable --only says "unknown export in ..." for one unknown name and "unknown exports in ..."
    for more, instead of "unknown export(s)", and "requested function does not match" for one
    failing function and "requested functions do not match" for more (#736, #752 by @Papito084).

  • app record --no-fresh keeps the files/ snapshot when a case that stays reads it through a
    folder above it (fs.base = "."), not only through one inside it (#739, #749 by @XiaoBinGan).

  • analyze's empty-plan warnings say "1 TypeScript/JavaScript file under ... is excluded" and
    "only 1 compiled or packaged file" for one file, instead of "1 ... files ... are"
    (#738, #746 by @brixtonpham).

  • npx rust-anything@latest setup now leaves agents that keep working: a copy run from npx's
    cache sets each agent to start npx -y rust-anything@<version> mcp (cmd /c npx ... on
    Windows) instead of the cached binary, which npm may delete. doctor reads that entry as
    current.

  • A GitHub Action runs rust-anything gate in CI on every push:
    uses: erkamyaman/rust-anything@main with crates: listing the crate folders. It installs
    rust-anything from npm and fails the job when any crate fails the gate.

  • analyze also counts Number.parseInt and Number.parseFloat calls as Number semantics,
    alongside global parseInt and parseFloat (#730 by @brixtonpham).

  • --db-dump output is recorded with \n line endings: on Windows, Python's print and sqlite3
    end lines with \r\n, so .effects mixed both and a recording made there failed replay on Linux
    and macOS. Recordings made on Windows with --db-dump before need a fresh app record
    (#729 by @Layfate).

  • The Android 16 KB page-size check says "1 LOAD segment is not 16 KB aligned" for one
    misaligned segment and "2 LOAD segments are not 16 KB aligned" for more, instead of
    "LOAD segment(s) are" (#718, #728 by @MannXo).

  • app record --fresh writes the files a case removed (<case>.removed) with / between folders
    on Windows too, so a recording made on Windows replays on Linux and macOS instead of failing on
    stale\old.txt. Recordings made on Windows before need a fresh app record
    (#727 by @Layfate).

  • gate starts a failed check's extra detail lines and its fix: line in the same column as the
    first line of its detail, instead of a fixed 12 spaces that no longer lined up after #707
    (#713, #725 by @Layfate).

  • gate's ported check says "1 place in port.rs" for one stub and "N places" for more,
    instead of "1 place(s)" (#712, #724 by @Layfate).

  • analyze also counts toLocaleString, toLocaleDateString and toLocaleTimeString calls as
    Intl and locale-aware strings: they format numbers and dates with the same ICU data as
    localeCompare (#714, #722 by @chuenchen309).

  • analyze no longer flags new Date(-1) (a negative number literal) as Date parsing
    (#715, #721 by @brixtonpham).

  • app record no longer keeps a separator that two runs' random values happen to share: request
    ids k2Pq_x9Lm4 and Zt7w_bR3nV now record as [..] instead of [..]_[..], so a replay whose id
    has no _ passes. A separator next to a part both runs agree on stays, so id=[..] keeps its
    =. Recordings made before keep their wildcards until the next app record
    (#680, #692 by @XiaoBinGan).

  • analyze flags three more TS/JS risks: Intl and locale-aware strings (high: Intl.*,
    localeCompare, toLocaleLowerCase, normalize("NFC")), Date parsing (high: Date.parse,
    new Date(string)) and URL and encoding APIs (medium: new URL, URLSearchParams,
    TextEncoder/TextDecoder, atob/btoa), each with guidance on the traps a port must match
    (#678, #711 by @antont).

  • On Windows, a debug build of the CLI (cargo run, and every test that runs the binary) no
    longer overflows the 1 MB main-thread stack before it parses its arguments: the CLI runs on a
    thread with an 8 MB stack on every OS. Release builds were not affected (#710 by @Layfate).

  • package refuses --bin and --original on a napi, wasm or PyO3 crate, and --fallback on a
    wasm or PyO3 crate, naming the flag and what it is for, before anything is written (also with
    --dry-run). They used to be dropped silently (#701, #708 by @Papito084).

  • gate starts every check's detail in the same column, padding names to the longest one, so
    error cases and known diffs line up with the rest (#700, #707 by @Papito084).

  • gate says "the 1 function that fails in the original has a recorded failing case" instead of
    "each of the 1 functions that fail" in the error cases check (#698, #706 by @Papito084).

  • app drift prints "1 case; build: ..." instead of "1 cases" for a one-case recording
    (#699, #705 by @Papito084).

  • A napi export called without an optional structured argument, such as an array, now gets
    None on the JSON path that async calls always take, instead of failing with
    invalid type: map, expected a sequence before the port runs. A serde_json::Value parameter
    still receives the undefined marker (#681, reported by @antont).

  • The MCP app_replay tool refuses a build or case, and app_drift a build, that is not a
    string with `case` must be a string, not 5, instead of dropping it and replaying every case
    or the original. A missing or null value still means not given
    (#682, #691 by @susheelg1197).

  • The MCP package tool refuses a name, version, fallback or original that is not a
    string with `version` must be a string, not 2, instead of dropping it and packaging with the
    crate's own value. A missing or null value still means not given
    (#683, #690 by @susheelg1197).

  • The MCP tools refuse an optional path (out, inputs, module, resolve_from, ndk,
    jni_libs) that is not a string with `out` must be a string, not 5, instead of dropping
    it and using the default. A missing or null path still means not given
    (#686, #689 by @susheelg1197).

  • Every MCP tool's required path (root, repo or crate) that is there but not a string is
    refused with `root` must be a string, not 5 instead of missing `root`. An absent or
    null path still says missing `root` (#685, #688 by @susheelg1197).

  • The MCP bridge and app_wire tools refuse a unit that is not a string with
    `unit` must be a string, not 5 instead of missing `unit`, and bridge refuses a name
    that is not a string instead of writing the bridge under the default name. A missing or null
    unit still says missing `unit`. A wrong-type argument to any MCP tool now gets the
    invalid_arguments code, not retryable, instead of failed (#684, #687 by @susheelg1197).

  • docs/whole-apps.md says six of the seven app commands are MCP tools and that app shadow is
    CLI only, instead of "All six are MCP tools too" (#672, #674 by @XiaoBinGan).

  • The MCP app_record tool refuses a ready, name, db_reset or db_dump that is neither a
    string nor null, with `ready` must be a string, not 42, instead of recording as if it had
    not been given. A null still means not given (#671, #673 by @XiaoBinGan).

  • app record --http --inputs records every input, including one that repeats an earlier request.
    Cases run in name order against one server, so a read after a write is a case of its own; it
    used to be dropped as a duplicate, and the read the recording was made for was never recorded.
    Examples and generated traps are still deduplicated. app replay, and the replays app wire
    and app lift run, send HTTP cases in that same case-name order: sorting file names put
    add-again before add, so a server with state answered differently than when recorded
    (#677 by @antont).

  • The generated src/utf16.rs has slice_units, JS slice on code units with a cut surrogate
    pair kept, and bridge's string-offsets note says to return such a substring through
    js::utf16_string(utf16::slice_units(..)). utf16::slice, which the note pointed to before,
    turns a lone surrogate into U+FFFD, so a port that followed it failed diff on the cases the
    helpers exist for (head("😀") → {"$utf16":[55357]} in JS) (#676 by @antont).

  • A napi port function returning Option<T> answers None as null when its TS export declares
    T | null, also through a type alias and Promise<T | null>. A call the binary wire refuses
    (such as null for an optional array), and every async call, used to get undefined, so
    diff failed with expected {"ok":null}, got {"ok":{"$undefined":true}}; the wire already
    answered null. A declared undefined still answers undefined (#675 by @antont).

  • The table of saved settings in docs/whole-apps.md names the flag that clears http
    (--no-http), http.port (--port 0), http.args (--no-args) and http.fresh / fresh
    (--no-fresh) instead of saying they cannot be cleared
    (#665, #668 by @alvaroalonsoparrondo-a11y).

  • The MCP app_record tool called with http: false and a ready request says
    --no-http cannot be combined with --http, --port, --arg, --pace, --ready-timeout or --ready;
    the message used to leave out --ready, the one setting the caller had passed
    (#666, #667 by @alvaroalonsoparrondo-a11y).

  • app record --ready refuses a value that is not /path or METHOD /path with an uppercase method,
    such as health, get /health or GET /health extra, before the server starts, instead of
    failing after the whole --ready-timeout. The MCP app_record tool checks it the same way
    (#657, #659 by @susheelg1197).

  • app record --ready "GET /health" waits, after the server's port opens, until that request
    answers 2xx, so a framework that opens its port before its routes work is not recorded answering
    503. The request is saved with the cases and used by app replay, app shadow and the front
    door's own start of the original, within --ready-timeout; the MCP app_record tool takes it
    as ready (#332, #656 by @XiaoBinGan).

  • gate's literals check no longer counts recorded error text. A port has to reproduce the
    original's error messages, and the runtime often writes them (ZeroDivisionError: division by zero),
    so they were wrongly flagged as copied answers and failed the demo gate on macOS.