In crates/node/src/cbor/fallback_decoder.rs (and after #537 merges, in crates/testgen/src/testgen.rs), the helper that looks up testgen-hs on disk validates candidates like this:
fn is_our_executable(path: &Path) -> bool {
Command::new(path).arg("--version").output().is_ok()
}
.is_ok() only means the child could be spawned and its output captured, a non-zero exit code or unrelated --version text is still accepted. An unrelated binary named testgen-hs on PATH, or a broken build, can pass this check.
The same pattern exists in crates/common/src/find_libexec.rs:77 (already carrying a TODO comment there).
Flagged by Copilot
In
crates/node/src/cbor/fallback_decoder.rs(and after #537 merges, incrates/testgen/src/testgen.rs), the helper that looks uptestgen-hson disk validates candidates like this:.is_ok()only means the child could be spawned and its output captured, a non-zero exit code or unrelated--versiontext is still accepted. An unrelated binary namedtestgen-hsonPATH, or a broken build, can pass this check.The same pattern exists in
crates/common/src/find_libexec.rs:77(already carrying aTODOcomment there).Flagged by Copilot