c2rust-postprocess currently verifies only that comments were transferred correctly. It does not verify that the model preserved the rest of the function structure.
This lets malformed rewrites slip through. For example, if a model output drops a closing } from a function body, that invalid Rust can still be written into the tree. The result is two failures:
- The updated source no longer builds.
- A later merge_rust invocation can fail because it parses the root Rust file up front and expects valid Rust syntax.
Failure has been observed by running c2rust-postprocess on json-c-transpile/src/linkhash.rs with gemini-3.1-flash-lite. Smarter models don't appear to exhibit this behavior, probably still worth fixing.
c2rust-postprocesscurrently verifies only that comments were transferred correctly. It does not verify that the model preserved the rest of the function structure.This lets malformed rewrites slip through. For example, if a model output drops a closing } from a function body, that invalid Rust can still be written into the tree. The result is two failures:
Failure has been observed by running
c2rust-postprocessonjson-c-transpile/src/linkhash.rswithgemini-3.1-flash-lite. Smarter models don't appear to exhibit this behavior, probably still worth fixing.