github erkamyaman/rust-anything v5.1.1

47 minutes ago
  • fuzz --generator fails, naming the command and the seed, when the generator prints no input
    in a round. Before, a generator that exited 0 with no output was reported as "No fresh cases:
    every case it generated is already in the recording" and the run passed; with --time it ran
    the empty generator again every round (#1218 by @P-r-e-m-i-u-m).

  • The site's CLI reference is regenerated for 5.1.0: it was missing 13 options (gate's
    --held-out-cases, --held-out-seed, --accept-known-diffs, --accept-smaller-recording,
    --accept-dropped and --json-events, record's --allow-dropped, --allow-large-tolerance
    on record and diff, fuzz's --sandbox and --generator, go's --min-cases,
    app front-door's --command) and the selftest, new, spec and obligations commands. A
    new test, tests/cli_help.rs, fails with the command's name when
    website/content/cli-help.json differs from the binary's --help (#1217 by @alex00010).

  • app record --float-tolerance above 1e-6 now needs --allow-large-tolerance, like
    record, and the MCP app_record tool takes allow_large_tolerance. Before, app record
    saved any tolerance below 1, so a recording made with 0.5 let app replay pass a build
    whose numbers were a third off. A recording that already holds a large tolerance still loads
    (#1213 by @og-orca).

  • profile --help and go --help list only the languages they run (ts, python, go, java,
    ruby) for --lang, not all eleven. --lang php and the other five still stop with the profiler
    to use instead, and go names itself in that message, not profile (#1216 by @bala-zx).

  • The MCP prompts/list description of port_unit's language argument now names every
    language file the skill ships (Swift was missing), and prompts/get with a misspelled prompt
    name says so and lists the two prompts, instead of reporting a missing path argument first
    (#1214 by @qwist1233-cpu).

  • The MCP server's initialize answers with the client's protocolVersion only when it speaks
    it (2025-06-18, 2025-03-26 or 2024-11-05), and with 2025-06-18 otherwise. Before, it
    echoed any string, so a client asking for 1999-01-01 or a newer revision was told the server
    spoke it (#1215 by @brixtonpham).

  • rust-anything obligations <repo> lists what the original offers (exports, commands, flags,
    routes, environment variables, error paths) and the places it could not enumerate, and writes
    rust/OBLIGATIONS.json with --write. --evidence links each item to the recorded cases that
    exercise it, and --check says what still blocks app lift, which now refuses while an item has
    no case, a family is not attested, an expected file holds a ... line or the front door took a
    fallback no case explains (#1122). obligations waive and obligations attest record a
    person's decision with an ADR, and obligations fallbacks reads the journal a front door writes
    when RUST_ANYTHING_FALLBACK_JOURNAL is set. gate's coverage check names the exports no case
    exercises (#1123 by @devrhonadis).

  • The MCP server has three tools for the obligation registry. obligations (what the original
    offers, and with evidence the cases linked to it) and obligations_check (what blocks
    app_lift, with clear, one sentence per group and closed_by_binding) only read.
    obligations_fallbacks writes only when asked: write stores rust/obligations-fallbacks.jsonl
    and inputs creates the file it names, outside the repository included, as the CLI does. None
    waives, attests or binds: those are the user's decisions. app_lift refused for the obligations
    is an error with the code obligations_open and the command
    rust-anything obligations <repo> --check; the port_whole_app prompt and the skill say the port
    is not done until that list is empty, and the skill forbids running waive or attest, or
    writing a binding, unasked (#1123 by @devrhonadis).

  • gate no longer calls a known-diffs.jsonl entry unused when only its held-out draws need
    it. An int-beyond-i64 entry for a function whose recording holds no overflowing int failed
    known diffs ("no longer differs: remove"), and removing it failed held-out; an entry that
    explains a held-out input now counts as in use.

  • app lift skips a case from cargo test only when a normalizer that spans lines folded a line
    break in it. app record saves those cases (and the output: stdout, stderr or a written
    file) as across_lines in rust-anything.json, and the lifted app_cases.rs skips just them.
    Before, one saved normalizer such as --normalize 'session=sess-[^ ]+' sent every case whose
    output held a [..] to app replay, including a timestamp, a uuid, two-run noise and a match
    that stayed inside one line, so on a CLI that prints a time per command most of the recording
    left cargo test. A recording made before this keeps no list and skips every case with a [..]
    as it did, and the "replay in CI" note says so until you record again (#1212 by @og-orca).

  • A known-diffs.jsonl entry can cover a class of inputs, not one argument list:
    {"fn": "add", "when": "int-beyond-i64", "reason": "..."} explains every mismatch of add
    whose original result holds a Python int outside i64 (a {"$int": "..."} that does not fit),
    and one whose result fits still fails. Before, a Python port that keeps int as i64 could not
    say so once: i64::MAX is in the pool of every int parameter, so gate's held-out check
    drew an overflowing input on nearly every run, and an entry only matched one exact argument
    list. The held-out line now counts the inputs such an entry accepted (#1162, #1190 by
    @og-orca).

  • A Python port that raises a class of the original's with its own __str__ and a constructor
    taking more than the message (FieldError(field, reason)) builds the subclass that prints the
    message once per class, not on every raise, so two raises give the same type. The error now
    pickles (it raised PicklingError, so a ProcessPoolExecutor worker handed the caller a
    pickling error instead of the error) and copies, and keeps the attributes set on it. isinstance
    and except worked before; type(e) is FieldError is still false for such a class, and the
    Python guide says so (#1166, #1188 by @og-orca).

  • PyO3 bindings convert large structured values faster (#1072). A result is turned into Python
    objects while it is taken apart, so it is freed as it goes instead of in a second pass over
    the whole tree, and tuples are filled in place. Arguments no longer copy each value twice:
    json! re-serialized every list, tuple, set and instance's fields put into a marker, and a
    dict cloned each value to keep a $dict fallback. A tokenizer returning 1.09M tuples from a
    3.9 MB string: converting the result went from 205 ms to 142 ms and the call from 374 ms to
    275 ms (the original takes 413 ms on Python 3.9); passing those tuples back as an argument went
    from 290 ms to 195 ms, and a 200k-entry nested dict from 455 ms to 140 ms. Ports and what
    diff compares are unchanged; the rest of the cost is the port building serde_json::Values
    and Python creating its objects.

  • record --messages holds a unit's errors to their message as well as their class: saved with
    the crate (rust-anything.json, and recorded-from.json, so turning it off by hand fails the
    recording), and diff and gate follow it in every driver (TS/JS, Python, Java and Kotlin,
    Ruby, PHP, C#, PowerShell, and --batch index checks). Off by default; then, when the
    recording holds errors, the verdict says error messages not compared: N recorded errors checked by class only, and comparison in --json carries messages and
    unchecked_messages. --no-messages saves the opposite; also a messages parameter of the
    MCP record tool. Before, a port that threw the right class with the wrong message passed
    (#1073).

  • A Python str holding a lone surrogate (from errors="surrogateescape") where the port takes a
    Rust String is refused by name: TypeError: argument 'a': str holds a lone surrogate, which a Rust String cannot hold, for a top-level str, str | None and list[str] parameter, a
    string inside a structured value and a dict key alike. Before, PyO3 raised a bare
    UnicodeEncodeError that named no parameter, and strings inside containers a misleading
    TypeError: unsupported argument type str. diff shows such a case as a mismatch where the
    original returned; the Python guide says how to carry the string instead (an untyped parameter
    or serde_json::Value, which receive {"$utf16": [...]}). refresh regenerates the bindings
    (#1074).

  • On Unix, a descendant that leaves its process group and keeps a command's stdout or stderr
    open without writing no longer leaves the capture reader blocked after the command is taken or
    dropped: the read polls the stream together with a shutdown pipe. Capture still runs to the end
    of a stream that closes normally, and a stream still open at the command deadline makes the run
    time out rather than return success with partial output (on Windows too, where a blocked reader
    is still let go only at its next read). The crate stays free of unsafe (#1120, #1185 by
    @sanketpatel32).

  • A Python parameter whose default is neither None nor a literal (def to_az_el(dec, ha, lat=LAT)) tells an explicit None from an argument left out: the PyO3 binding reads it with
    from_py_with, so to_az_el(1, 0, None) reaches port.rs as Some(Value::Null) and
    to_az_el(1, 0) as None. Before, both arrived as None, and a recorded case where the
    original raises on the explicit None could not match. refresh regenerates the bindings
    (#1157).

  • gate's runtime check judges a path dependency's include_str! and #[path] against that
    dependency's own crate: a library the port moved into after a hand lift (core-lib = { path = "../core/lib" }) can keep #[path = "port/doors.rs"] mod doors; and include its own
    sum.wgsl, which failed as "outside the crate" before. The dependency still may not reach
    outside its crate, include the recording or a file in the original's language, and one whose
    folder holds the bridged crate or the original unit is judged against the bridged crate as
    before (#1158).

  • setup installs new-app.md, which SKILL.md links to for a new CLI app, and the MCP server serves it as
    skill://rust-anything/new-app.md. A test now checks that every file of the skill folder is installed (#1153).

  • gate's held-out check runs for Python PyO3 ports, not only TypeScript/JavaScript napi
    ones: a Python port that matches every recorded case and differs on other inputs now fails
    gate, and selftest catches its two Python rows that only fuzz used to find (#1094,
    #1112 by @RubenPanero).
    Recordings with only keyword arguments also receive perturbed inputs.

  • analyze --whole-app no longer asks a decision for a Python test, build or lint tool that no
    unit imports (pytest-cov, setuptools, wheel, coverage, tox, ruff... from a dev
    requirements.txt): the crate table marks the tooling row with tooling = true, and such a
    dependency is still listed. jmespath.py went from five dependency decisions to one (#1136,
    #1137 by @AyhamJo7).

  • app record keeps its lock under rust/.app-record/, ignored by Git. Recording a Node,
    Python or Go app no longer creates a top-level target/ folder in the original (#1165, #1176
    by @Plastic-time).

  • Two app record --fresh runs on one repository at once no longer wipe each other's staged
    snapshot: each run stages into a folder of its own, and recordings of one repository take turns
    (#1117, #1149 by @Lewandox).

  • app record on a lifted app rewrites rust/app/tests/app_cases.rs with the skips the new
    recording needs: the list app lift chose stayed as it was, so cases recorded after the lift
    that trycmd cannot check failed cargo test while app replay passed them (#1145, #1146 by
    @AyhamJo7).

  • Re-recording a lifted CLI keeps hand-added trycmd skips for cases that still exist.
    If you edited the test in another way, app record leaves the file as you wrote it
    and lists the skips the new recording needs (#1169, #1177 by @Plastic-time).

  • app record says when it skips an --inputs line that repeats an earlier case (the same
    arguments, stdin, environment and files): the summary counts them (1644 from inputs, 17 duplicate inputs skipped), a line names each with the case it repeats, and --json has them
    in duplicate_inputs. Before, the count only came out short (#1140, #1141 by @AyhamJo7).

  • fuzz --generator <command> takes each round's inputs from your own program, run with
    RUST_ANYTHING_SEED and RUST_ANYTHING_CASES set and read like a record --inputs file, so a
    unit can be fuzzed over its real input domain and --seed replays the run. A non-zero exit or
    a bad line fails the run and names the line. Also a generator parameter of the MCP fuzz
    tool (#1049, #1115 by @og-orca).

  • analyze and record warn when an exported TS/JS function passes a parameter, directly or
    through one local, to JSON.parse, atob, Buffer.from(x, "base64" | "base64url" | "hex"),
    decodeURIComponent or new URLSearchParams. Even when decoding succeeds, generated strings can
    miss cases that depend on the decoded content (#1163, #1174 by @Plastic-time).
    analyze names the parameter, the call and its line per function, and record lists the
    functions after its summary and points at --inputs (#1050, #679, #1114 by @og-orca).

  • A case recorded twice (a generated input that is also a line of the inputs file) can be
    accepted in known-diffs.jsonl: one entry now explains every copy of the case, and the count
    of accepted cases that diff, gate and --accept-known-diffs show is the number of
    mismatches the entries explain, not the number of entries used. Before, one entry removed both
    mismatches but counted one, so behavior still failed, and a second entry for the same case
    was reported as no longer differing (part of #1108, #1113 by @og-orca).

  • record --from-tests keeps a reservoir sample of up to 1,000 distinct calls per function over
    the whole test run instead of the first 1,000: a workload that walks one data source after another
    recorded calls from the first source only and caught 0 of 12 planted bugs. The sample is
    reproducible (seeded by the function name), the capture is read line by line with a hashed
    de-duplication set, and a line that is not UTF-8 is skipped (#1071, #1104 by @XiaoBinGan).

  • record --from-tests capture hooks (TS/JS and Python) skip a call already written for the same
    function, keep the capture file open, and stop at 1 GiB (RUST_ANYTHING_CAPTURE_MAX_BYTES),
    which record, go and the MCP server report as capture stopped at ...: later calls were not sampled (#1161, #1179 by @Lewandox).

  • Two record --from-tests runs on one crate at once (CLI and MCP, or two MCP calls) keep their
    own captured calls and input files, and a failed test command leaves no capture files behind.
    Before, they shared test-calls.raw.jsonl and test-inputs.jsonl, so one run could delete or
    record the other's calls (#1119, #1148 by @Lewandox).

  • app record warns when every case (two or more) failed with the same exit code and the same
    error output, quoting its last line (same_failure in --json): a command that never reached
    the app, such as python3 bin/jp.py without its package on the path, recorded a
    ModuleNotFoundError per case and read as a complete recording (#1142, #1143 by @AyhamJo7).

  • app lift no longer fails its cargo test on a normalizer that spans lines (a traceback's
    frames folded into one [..]): trycmd reads [..] inside one line only, so the cases whose
    output holds a [..] are skipped in rust/app/tests/app_cases.rs when such a normalizer is
    saved, app replay keeps checking them, and the "replay in CI" note counts them (#1134, #1135
    by @AyhamJo7).

  • app front-door no longer takes a CLI's free-text first argument for subcommands: when a
    successful case starts with an argument that is neither a word nor a flag (foo.bar[0]), the
    app has one root command and its flags come from every successful case. jmespath.py's jp.py
    got 44 "commands" (expressions such as foo) and lost --ast and -f, and those cases could
    never stop falling back (#1130, #1131 by @AyhamJo7).

  • app front-door --command <name> (repeatable, or --commands a,b, and commands in the MCP
    app_front_door tool) names a CLI's subcommands when a free-text first argument would hide
    them, and the front door's notes name the words it did not take for commands and the flags to
    pass (#1167, #1181 by @Lewandox).

  • Source walks leave out the repository's rust/ folder once rust-anything works in it (a
    recording in rust/app-cases/ or a front door in rust/app/), so analyze no longer counts
    the port's own scripts as units, entry points or dependencies: mid-port, jmespath.py read as
    16 files in 8 units with rust/inputs/*.py as entry points, and is 10 files in 3 units again.
    A project's own rust/ folder without that state is read as before (#1138, #1139 by
    @AyhamJo7).

  • refresh puts cdylib back in a PyO3, napi or wasm crate's crate-type when it is missing,
    keeping the kinds already there: on a unit crate app lift had made a plain library, it
    regenerated the bindings but build then found no extension module (#1150, #1151 by
    @AyhamJo7).

  • Python ports can raise the original's own exception class when its constructor takes other
    arguments than the message, or none (ParseError(position, token, type), EmptyError()): the
    bindings make it without running __init__, with the message as its args, and a class whose
    own __str__ reads what __init__ sets is raised through a same-named subclass that prints the
    message, so except on the class still catches it. Before, these became ValueError and failed
    diff; a jmespath.py port went from 3103/3441 to 3441/3441 (#1128, #1129 by @AyhamJo7).

  • The generated pyconv.rs passes clippy 1.98 (as_chunks instead of chunks_exact(2) for the
    UTF-16 units of a string with lone surrogates), so gate no longer fails a Python port on
    generated code; a test runs clippy -D warnings on a bridged PyO3 crate (#1132, #1133 by
    @AyhamJo7).

  • A PyO3 crate named like one of its exported functions or classes (bridge --name slug for a
    slug function) passes cargo test: the generated registrations name crate::slug, so
    rustdoc's doctest build no longer stops with error[E0659]: slug is ambiguous and gate's
    tests check no longer fails (#1091, #1098 by @XiaoBinGan).

  • analyze no longer counts Python % string formatting ("x=%s" % x, implicitly joined
    literals, bytes, in parentheses) as "Division and modulo": only a % whose left side may be a
    number is. On jmespath.py the 31 false hits are gone and the readiness of jmespath/ goes from
    6 to 16 (#1124, #1125 by @AyhamJo7).

  • analyze also flags Ruby /= and %= as Division and modulo and **= and <<= as
    Integer width and overflow, alongside /, %, ** and << (#1105 by @brixtonpham).

  • A whole-repository audit for implicit state machines, following Tobi Lütke's advice (list every
    state machine, model it in TLA+), read every line of src/, tests/, CI and the scripts,
    modelled the risky ones with everystate by
    @mattzcarey, and confirmed most findings with a repro. Most fixes below come with a regression
    test that failed before the fix:

    • record holds the per-crate recording lock for its whole run, and diff, bench, gate,
      report and enable hold it while they read cases.jsonl, so a fuzz or held-out round
      can no longer put the old recording back over a new one, or hand a gate its temporary cases
      between the recording check and the diff.
    • record fingerprints the original before its drivers run and writes the fingerprint and the
      dropped counts to recorded-from.json in one step, so an original edited while record runs
      makes the recording stale instead of trusted.
    • --allow-dropped applies to the one record call that gets it: the MCP server no longer
      keeps one call's allowance for the next.
    • A record that fails no longer leaves its --float-tolerance, --ignore-key-order or
      --pin-clock settings behind, and a recording refused for holding a secret puts the previous
      cases.jsonl back.
    • An input on which the original ends the process with an error status (PowerShell exit 3,
      Kotlin exitProcess) is dropped and the rest are recorded, instead of failing the whole
      recording.
    • After a timeout or such an exit, the new driver first runs again the cases already recorded,
      so the original's state matches the one-process diff replay and a faithful port of a
      stateful original no longer fails.
    • record refuses when the original's source is not where the manifest says (a moved or cloned
      repository) instead of recording the driver's failure to load it.
    • gate counts recorded numbers in a file the port includes (include_str! of a renamed
      recording), treats todo! (), unimplemented!{} and todo![] as stubs, and checks unsafe
      in tests/, build.rs and every other Rust file of the crate, not only src/. Both read
      whole files, so a string or comment over several lines is not code.
    • map trusts a recording whose dropped cases the last passing gate accepted with
      --accept-dropped.
    • Switching another unit on no longer makes a recording that imports its file look stale,
      results are stamped with the port version they started on, and the port version follows
      symlinked sources.
    • A library is dated when its build started (TS napi and Python), so a source saved while cargo
      compiled makes it stale instead of being tested as the old version.
    • Python records publish cases.jsonl by rename, and two Python runs on one crate no longer
      share driver.py or the bench and source-list files.
    • --json after -- (the test command of record --from-tests) no longer turns the CLI's
      errors into JSON.
    • record --from-tests no longer copies a killed run's backup over a TS/JS file edited since:
      the backup goes back only while the file is still that copy with the capture block, a file
      edited around a stale block is left as it is with an error naming the backup, two captures of
      one file take turns, and a #! line stays the first line.
    • The MCP server kills the processes a cancelled call started, so the call lets go of the
      recording lock at once, and at the end of its input it waits up to 5 seconds for cancelled
      calls to stop, so their files are put back.
    • profile and selftest work in a folder of their own per call: two at once in the MCP
      server no longer read each other's profiles or judge each other's planted ports.
    • gate's fmt, clippy and test checks run under the batch lock, so a diff running at the
      same time no longer puts its generated batch test in front of them. When the lock cannot be
      taken, a stale generated test is still removed first.
    • A batch check killed mid-run no longer leaves its temporary copies in tests/, and a test
      someone writes at tests/rust_anything_batch.rs while one runs is never replaced.
    • Python batch checks recognize every built-in exception class, the warning classes among them,
      so a port raising UserWarning like the original no longer fails the batch check.
    • The error-cases check finds a throw after a '}' string or char literal, and a raise in
      a Python function whose signature spans several lines (Black's style).
    • MCP calls with timeout 0, a non-list effect_response or a bad selftest lang fail as
      invalid_arguments, not failed.
    • app record --http and app replay stop the whole process tree of a server that did not
      listen in time or failed its --ready request, not only the launcher, so a server left
      running can no longer answer the next replay and make a broken build pass.
    • A failed app record (a secret refused, a --db-dump failure, a literal wildcard) no longer
      replaces the --fresh snapshot or rewrites earlier cases: the snapshot is taken beside the
      saved one and swapped in when the settings are written, and HTTP cases are all checked before
      any is written.
    • app record --http refuses to write a secret-named environment variable's value and refuses
      literal [..]/... text in fields that differ between runs, as the CLI recorder already
      did.
    • HTTP requests sent by app record, app replay and app shadow now have --timeout for
      the whole response, so a streaming route (SSE, long poll) times out instead of hanging.
    • Outside commands (--db-reset, --db-dump, builds) and CLI cases end at their time limit
      even when a background or setsid descendant keeps their output pipes open.
    • The HTTP front door's original stops with everything it started whenever the front door exits
      (a router or bind panic included), receives Ctrl-C, is found on ::1 as well as 127.0.0.1,
      gets a new port if another process took the chosen one, and streams fallback answers with a
      60s per-read timeout instead of buffering them under a 60s total. A SIGTERM while the original
      starts reaches the original too, and on shutdown a response still streaming gets 10 seconds
      before the original is stopped.
    • app wire refuses routes whose path parameters clash (/users/{id} and /users/{name}, or
      a parameter and a catch-all at one place, which axum rejects at startup), refuses a crate
      whose unit name, module or switch another wired crate already has, and serializes concurrent
      wires, and a wire with app lift, with a lock outside the repository and an atomic state
      write.
    • app shadow logs a request the original did not answer (the build was not sent it either),
      keeps it with --keep, and removes its scratch folder on a failed start and the folders of shadows stopped with
      Ctrl-C.
    • The Python shadow no longer swaps sys.stdout per call: two threads calling a printing
      export at once could leave sys.stdout as a StringIO for good and count other threads'
      output as the call's. A stdout proxy is installed only while shadowed calls run, and each
      thread's prints go to its own call.
    • The Ruby shadow no longer swaps $stdout per call, for the same reason under Puma or Sidekiq
      threads: each thread's prints go to its own call, and $stdout is put back when the last
      shadowed call ends, also when another shadowed file loads during a call.
    • The Go shadow no longer points os.Stdout at /dev/null while the port runs. Concurrent
      calls could leave it on a closed file and swallow the program's output. The port's output is
      now held back through the wrapper, also when only the port prints.
    • A Python or TypeScript shadow whose original returns a value too deep to encode returns it to
      the caller and reports a mismatch, instead of raising RecursionError or RangeError (or
      rejecting the caller's promise). In TypeScript, two such values never compare equal.
    • The Ruby shadow returns binary (non-UTF-8) results instead of raising
      Encoding::UndefinedConversionError into the caller.
    • A Ruby port returning a u64 above i64::MAX gives Ruby an Integer, not a Float.
    • Go typed and wire calls whose result is over 256 or 512 bytes no longer run the port twice. A
      port with state (a counter, a cache) advanced twice per call. The result is now kept for the
      second read.
    • The C shadow gives the port a char ** cursor into the port's own copy of the buffer (the
      port panicked and aborted the caller), and frees that copy only after comparing.
    • app lift refuses to start or replay while a top-level path of the repository is still named
      *.rust-anything-hidden: a lift stopped during its final replay (Ctrl-C, a CI timeout) left
      src/ moved away, and the next lift skipped the missing path, replayed with nothing hidden
      and lifted anyway. Two lifts at once now refuse the same way.
    • app lift copies the checked crates back through a journal (rust/lift-commit.json) that
      keeps the checked copy until the lift is in audit.jsonl: a lift that stops or fails while
      copying back, or at its final build, is finished by the next app lift instead of leaving
      rust/app lifted, a unit still bound and no log entry. Every checked crate is checked before
      a file goes, the files the copy removes and the replay counts are saved first, a lift whose
      copy is done only builds again (an edit made to fix the build is kept), and the journal stays
      until the audit entry is written.
    • app lift still recognises a CLI front door's src/main.rs generated before
      RUST_ANYTHING_MODE=old was honoured there, instead of refusing it as changed by hand.
    • app lift's check that the glue no longer calls original:: reads escaped char literals
      ('\"', '\'') and raw strings (r"\", r#"…"…"#) as Rust does, so the code after them is
      no longer read as part of a string, and original:: inside a string is not a call.
    • --device runs use a device folder of their own (process id, time and a counter), so two
      hosts sharing a device, or a run after a crash, no longer share jars and results.
    • enable and disable write a unit's files all or none, each through a temporary file: a
      failed write leaves that file whole and puts back the files already written, and a file saved while enable checked the module is not overwritten. If a
      file cannot be put back, rust/audit.jsonl lists the files that did change.
    • Two units whose blocks sit at the end of one file without a final newline give the file back
      byte for byte when disabled in the order they were enabled.
    • spec approve and spec check include the input folder a case names with fs.base, so
      editing that input marks an approved case as changed. Cases that set fs.base show as
      changed once after upgrading.
    • rules --add locks the rules file from read to write, so two adds at once (CLI and MCP) keep
      both rules, and appends, so a failed write leaves the earlier rules. Agent prompts for apps made with rust-anything new name spec/RULES.md as the
      rules file.
    • rust/audit.jsonl is locked between the torn-line check and the append, so a partial line
      from another process can no longer merge with a new entry. log no longer panics on a commit
      field that is not ASCII.
    • Library front doors give a unit whose module name a numbered one already took (util,
      util_2, util) the next free name instead of a second util_2 module.
    • The shared build folder now gives a library name to one crate only, so foo-rs and foo_rs
      (both libfoo_rs) no longer install each other's library.
    • A crate with a path dependency inside its own folder builds in its own target/, since cargo
      shares that dependency's build between crates laid out alike.
    • An owner of the shared build folder keeps its names while its Cargo.toml is briefly
      unreadable. bridge, refresh and manifest saves write files through a temporary file and a
      rename.
    • rust-anything clean empties the shared folder under the owners lock and keeps
      owners.json, so a build in progress keeps its name.
    • Built libraries are copied out of the shared folder only for the crate types the crate
      builds, so a former owner's <lib>.lib or lib<lib>.a is no longer installed (the Windows
      go_cgo flake).
    • C-ABI and FFI crates write their repository root relatively, as napi and PyO3 crates do, so a
      clone of the repository no longer records against the original machine's path. A crate folder
      that does not exist yet behind a symlinked path also gets a relative root now.
    • rust-anything package writes its stamp before the package files, so an interrupted run no
      longer leaves a folder every rerun refuses.
    • setup keeps the first <file>.rust-anything.bak instead of overwriting it on every run.
    • Workspace packages are read again on each run, so a long-running MCP server follows packages
      added after it started.
    • The napi wire keeps each loaded copy of a port's index.cjs on its own buffers: a second
      evaluation (Jest resetModules, delete require.cache[...]) took over the one Rust slot,
      and calls through the first copy read the other copy's arguments and returned stale results
      with no error. A call now registers its buffers again when another copy took the slot.
    • A wired TS/JS export called again from a getter on its own argument (napi and wasm) goes
      through JSON for the inner call instead of sharing the wire's write cursor, which returned
      the inner call's answer to the outer one.
    • RUST_ANYTHING_MODE=old runs the original from the CLI front door binary too, as the package
      README says: once the postinstall put the binary in place of the Node launcher, the variable
      was ignored. A front door made earlier gets this by regenerating rust/app/src/main.rs.
    • TS/JS regular expression literals are read as one by the effect checks: /\/*$/ opened a
      block comment and hid the rest of the function, so an environment read after it was missed
      and the function bridged.
    • analyze of a TS/JS repository skips an unreadable folder and a package.json that is not
      JSON (a template's "<%= name %>") instead of stopping, and skips dist, build, out,
      target and coverage only beside a package.json, so code in src/commands/build is
      analyzed.
    • Object keys named __proto__ survive the napi and wasm wire as own keys, as on the JSON
      path, instead of being dropped or setting the prototype.
    • An exported arrow function whose parameter default is itself an arrow ((s, g = () => {}) => s.length) is judged by its own body: the default's body was taken for the function's, and an
      expression body was typed void.
    • delete aa.x (and Python del dd[...]) no longer counts as changing a parameter named a
      (or d) in place.
    • Go and Java JSON dispatchers read each argument of a printing port by its own type when
      stdout is not the last parameter, and keep NaN, infinities and -0 in Option<f64> and
      Option<Vec<f64>> results and changed arguments instead of turning them into null.
    • A PHP or Ruby parameter whose default is in parentheses ($opts = array(), width = (4 * 2)) keeps its closing parenthesis, so the generated wrapper parses.
    • A Gemfile begin ... end block or a one-line if ... then gem "x" end inside a group no
      longer ends the group early or leaves it open, nested on one line too, so dev and runtime
      gems are told apart.
    • Ruby private :name hides that method from an extend self module's exports until a later
      public :name, and public ends a private section and module_function mode.
    • The generated PHP wrapper says when PHP refused FFI because of ffi.enable (the default
      preload allows FFI only in the CLI) and how to turn it on, instead of a bare
      FFI\Exception.
    • PHP diff reports a recorded function that is no longer exported as missing instead of
      stopping with a fatal TypeError.
    • pynum's Num::max and Num::min return ValueError for no values instead of panicking;
      ports call them with ?.
    • A Python or Ruby parameter used as fmt % 3 is no longer typed as a number: % with a
      number only on the right may format a string.
    • Java, Kotlin, Go and C# record, diff and bench take a per-crate lock
      (.rust-anything/driver.lock), so two runs in one crate no longer delete or rebuild each
      other's driver while it runs.
    • bench for Go, Java, Kotlin, C# and PowerShell no longer reads an earlier run's timings when
      the driver wrote none.
    • analyze loads the project's C# records and classes, as bridge does, so a method taking a
      record counts as bridgeable.
    • go --agent that ran out of turns with stubs left now says so and points to --rounds,
      instead of asking for --agent.
    • The C# and PHP wrappers read each changed argument at its place among the port's &mut
      parameters, not by the order of the manifest's list.
    • Swift record and diff runs use their own work files and driver build, so two runs in one
      crate keep their own answers.
    • A Swift case that answered just before the time limit is kept instead of marked timed out; a
      timed-out Swift driver is killed with its whole process group, and gets 30 seconds to start.
    • PowerShell scripts with their own param() block or top-level variables ($Mode,
      $targets) no longer overwrite the driver's.
    • A var in a Kotlin companion object or nested object counts as state, and a nested object's
      functions are called on its JVM class (Outer$Inner).
    • A multipart MIME body without its closing boundary keeps its last part.
    • --redact hashes quoted object keys in mismatch paths, groups and replay problems, so a key
      like an email address no longer shows.
    • Nested-payload case generation with a count of 0 makes no cases.
    • The release job finishes on a re-run: when the GitHub release already exists it uploads the
      assets again (--clobber) and updates the notes instead of failing on gh release create.
    • The website deploy job builds the site before void deploy, and the head middleware no
      longer adds a canonical link, hreflang alternates or JSON-LD to error pages.
    • The GitHub Action gate loop no longer expands * in the crates input as a glob.
    • The npm launcher says the Linux binaries need glibc on musl systems (Alpine) and points to
      cargo install, instead of failing with a bare spawn error.
    • scripts/check-secrets.sh and scripts/rename.py handle tracked file names with spaces,
      scripts/sponsors.mjs works from a path with spaces, and scripts/gifs.mjs removes its
      frame folder when rendering fails.
    • evals/score.py --results rescores a run that was already scored with --keep, instead of
      skipping it as having no kept working folder, and replaces only its own scoring copy.
    • Integration tests: the cgo, N-API, PyO3, magnus, JNI, PHP, C# and Kotlin effects tests no
      longer share the crate name fx-rs. A new test checks that a Go port rebuilt after another
      crate gave up its name runs the new library. fixed_port skips ports a wildcard listener
      answers on, and locks each port across test processes. CLI runs drop the shell's
      RUST_ANYTHING_* settings. Scratch folders are removed when a test fails. The
      interrupted-fuzz test signals the whole process group. macOS CI now requires PHP, .NET and
      Kotlin.
    • Go diff rebuilds its driver every time, so on macOS it no longer runs an older Rust library
      than the one just built (a broken port could pass), and on Windows it no longer links another
      crate's leftover static library (the go_cgo CI flakes).
    • The MCP server stops every outside program a cancelled call started (builds, test runs,
      record drivers, the Node diff driver, app record, app replay and app drift cases on
      every worker thread), starts no new ones, and stops fuzz between rounds. An outside command
      whose descendant keeps its pipes open after it exits is stopped half a second later, not at
      its time limit.
    • The MCP record tool puts back float_tolerance, ignore_key_order and pin_clock (and the
      pinned.rs helper it wrote) when the recording fails, as the CLI does, both take the
      recording lock before they change them, Android diff takes it too, and the MCP enable tool takes the recording lock like
      the CLI.
    • go holds the recording lock from recording to switch-on, and lets go of it while its agent
      runs diff and gate.
    • fuzz --time --keep keeps the cases earlier rounds kept when a later round fails, and says
      so in the error.
    • Ruby, PHP, C#, Swift, PowerShell, C-ABI and Android builds date the installed library from
      when the build started too, and bench for Ruby and PHP no longer reads an earlier run's
      timings.
    • --device runs hold the per-crate driver lock until the dexed driver is packaged.
    • The HTTP front door requires reqwest 0.12.4 or newer, the first with read_timeout.
    • Generated Go and Java JSON dispatchers pass cargo clippy -D warnings again for exports that
      print or change arguments, so gate no longer fails them on a needless borrow.
    • A --ready request that answered a non-2xx status reports that status even when the last
      probe timed out.
    • Tests build ports under target/tmp/rust-anything-ports (.cargo/config.toml) instead of
      the shared cache in your home folder.
  • record and gate report coverage for Python units too: the record driver notes the lines
    the cases run in the unit's files with the standard library (sys.monitoring on 3.12+,
    sys.settrace before) and counts the lines that hold code from the code objects, so blank
    lines, comments and docstrings do not count (#1056, #1107 by @alex00010).

  • Python (PyO3) end-to-end tests for fuzz (with kwargs, --keep and gate) and
    record --pin-clock (time.time, datetime.now, date.today, random.random,
    random.randint), a fuzz and held-out dedup fix so fresh kwargs cases sharing positional
    arguments are not dropped, and TZ=UTC documented in record --help and docs/how-it-works.md
    (#1060, #1061, #1078 by @abiramcodes).

  • Go fixed-size array parameters and results ([4]int, [32]byte) are bridged as lists
    (Vec<T>) instead of refused. The generated Go decodes only a list of exactly that length, so
    a wrong-length argument or result is refused rather than padded or cut by encoding/json, and
    record sends exactly that many items plus one list too long (#1103 by @Harsh28-raj, #1044).

  • C# value tuple parameters and results ((int Count, int Width) Sizes(string s)) bridge as JSON
    arrays ([7,14]), so the port takes or returns serde_json::Value, instead of being refused
    for using a tuple (#1048, #1106 by @XiaoBinGan).

  • A Java function that reaches app state through a helper in another unit
    (PostDataHelper.createQueryTV reading LocaleManager.instance) stays in Java with the reason
    instead of being bridged as pure, and analyze counts the same exports as bridge. The reason
    names the call as written (Query.load), not the bare method name (#1042, #1100 by
    @XiaoBinGan).

  • bench times Swift units, running the driver on the original and then through the Rust
    library, so report and the card show a Swift port's speed. Before, it refused every Swift
    crate (#1052, #1116 by @XiaoBinGan).

  • to_plain_json in the generated js.rs escapes marker-shaped objects nested inside each
    other in linear time: each $object wrap used to shift everything written after it, so a deep
    tree of single-key $map-like objects cost the square of its depth on every call (#1095,
    #1102 by @orshih6).

  • The commands a message tells you to run quote their paths where a shell would split or change
    them: bridge's record/build/diff line, profile's bridge advice, and the fixes
    gate, diff, record, package, app shadow and the MCP errors suggest no longer break on
    a folder with a space when pasted. Windows hints use PowerShell syntax and select POSIX quotes in Git Bash.
    Ordinary folders with spaces also work at a Windows command prompt (#1175, #1178 by
    @Plastic-time).

  • diff, gate, enable, go and library replay now check custom batch indexes
    (port::<Fn>Index) against the crate's recorded cases instead of testing only the per-item
    exports. When a crate defines a custom <Fn>Index, rust-anything groups the recorded cases by
    the fixed parameters, generates tests/rust_anything_batch.rs atomically under a per-crate lock
    (.rust-anything/batch.lock), and runs it with cargo test to verify Index::run (including
    typed recorded errors, Go sentinel errors and known-diffs.jsonl) and custom rank ordering.
    Valid reports from completed indexes are kept when another index aborts, handwritten tests at
    that path are preserved rather than overwritten, and execution errors report the check failure
    directly instead of pointing at src/port.rs (#1054, #1086 by @wasabihu).

  • record and diff on a C unit (and gate, bench and the others that run diff) say on
    Windows that the C driver needs Linux or macOS (WSL on Windows), since it runs each case in a
    forked process. They used to fail inside the driver with AttributeError: module 'os' has no attribute 'fork', or with only exit code: 9009 when python3 was the Store's stand-in;
    record compiled the original first (#1155 by @Plastic-time).

  • The translated C language pages say that recording and replay need Linux or macOS (WSL on
    Windows), as the English page does (#1164, #1171 by @Plastic-time).

  • A {"$utf16": [...]} list whose items are not all code units (70000, -1, true, a nested
    value) stays a plain dict in a PyO3 port, as the Python driver already read it, instead of
    raising ValueError: invalid $utf16 code unit on every case (#1090, #1099 by @ege-arhan).

  • build (and the build step of gate and go) on a napi unit with a Rust toolchain for
    windows-gnu explains napi-rs's libnode.dll not found in any search path: such a build links
    against a libnode.dll that only MSYS2's Node ships. The error now gives the Build Tools command
    doctor prints and rustup default stable-msvc, or a new crate with --kind wasm (#1156 by
    @Plastic-time).

  • The Python shadow module takes enc from the driver instead of an old copy, so a port that
    returns a wrong path, Decimal, date, UUID, Fraction or other value of a type without a
    __dict__ is reported as a mismatch. They all used to compare equal by type name (#1093,
    #1101 by @m3lonxd).

  • app record on Windows also turns the case's folder into [CWD] where the original prints it
    with doubled backslashes, as a JSON string or the path of Node's ENOENT error does. The temp
    folder, with the user's name and the recording process's id in it, used to stay in the committed
    case, so replaying the original from another process failed those cases (#1154 by
    @Plastic-time).

  • PHP: a public static method of a final class now bridges, records and diffs like a top-level
    function when the class's file can be replaced (one declaration, no top-level code), every
    public member is a static method and the class holds no static properties. The wrapper replaces
    the class with a final class of the same name, so the original must already be final; a
    non-final class keeps its static methods in PHP. A class with public instance methods or a
    non-public constructor, static properties, other public members, a method that returns by
    reference or a default that names a class constant or an imported constant, uses __LINE__,
    __FILE__ or __DIR__, or creates an object also keeps all its static methods in PHP, with the
    reason. A class with one kept method keeps all its methods, whether the reason is a void
    return or --keep, and the wrapper keeps a default that ends in ) (array(), (1)) and a
    multiline string default byte for byte (#1046, #1109 by @Ilhan-separ).

  • The PHP wrapper names the dispatcher's response variable so no parameter can shadow it: a
    by-reference parameter named answer used to overwrite ret, after, stdout and error
    on write-back, so a successful call returned null or threw (#1109 by @Ilhan-separ).

  • PHP: two static classes in one unit with a method of the same name (Str::length,
    Arr::length) no longer refuse the unit. Only clashing methods are qualified, as str_length
    and arr_length in Rust and --keep Str::length; other exports keep their names (#1170, #1182
    by @Lewandox).

Upgrading

  • app lift now also refuses while the obligation registry has blockers, so a port made with an
    earlier release stops at its next lift. Run rust-anything obligations <repo> --check first (it
    reads the source and the recorded cases, nothing is built), then: attest the families the
    ledger cannot prove complete in one command (rust-anything obligations attest command flag route env error-path --reason "<why>", the families it names), record a case for each
    obligation listed, name the case that exercises one in rust/obligations-bindings.toml
    ([[bind]] with obligation, cases and reason), or waive what needs no case with
    rust-anything obligations waive <id>... --reason "<why>", which takes several ids and patterns
    such as 'flag:*'. Each decision writes an ADR in rust/DECISIONS.md, and commands that write
    decisions take turns through rust/.rust-anything/obligations.lock.
  • gate's coverage check now fails when an export of the unit, a method included, has no
    recorded case, so a unit whose recording never called a method fails gate, and with it
    app wire, go and app lift. Record a case that calls it, bind one, or waive its id from the
    repository.
  • Tests: three HTTP tests take fixed ports from fixed_port() (#1092, #1097 by @qwist1233-cpu),
    an MCP test accepts both of selftest's Go messages (#1126, #1127 by @AyhamJo7), the process
    tests check that child processes really exit (#1121, #1147 by @P-r-e-m-i-u-m), and the test
    targets build on Windows (#1152 by @Plastic-time).

Don't miss a new rust-anything release

NewReleases is sending notifications on new releases.