It would be good to flag bad packages but it's impossible.
Yes, it's (IMO unfortunately) possible to have non-reproducible code generation during compile time. The most prominent example is code generation based on DB schema. But such cases are quite rare and "going with the VCS" does not help here in any way.
If you mean that Rust code gets generated by a Python script and then gets uploaded to crates.io without the "origin" scrips, then I don't see any problems here.
>Or crates where the tests were in VCS but not in the crate
Tests are not used in building the final application, so they are irrelevant for reproducibility.
>prebuilt files in the crate
While I think it's a bad practice (though I haven't seen such crates myself), it does not hinder build reproducibility.
It does, because then you can run the build process yourself from the real source files and check if it is reproducible.
> If you mean that Rust code gets generated by a Python script and then gets uploaded to crates.io without the "origin" scrips, then I don't see any problems here.
Right. The problem is there is no source in the crate, just generated Rust code, so you can't know if the build process to create that Rust code is reproducible or not.
> While I think it's a bad practice (though I haven't seen such crates myself), it does not hinder build reproducibility.
The problem is that these are prebuilt files and so your build process is just copying them not building them, so you can't know if the build of them is reproducible.