Gate‑C(Core): normalize exit code for JSON file/pipe (rc mirrors return); add quick smokes (file/pipe parity).
This commit is contained in:
@ -48,12 +48,12 @@ impl NyashRunner {
|
||||
super::json_v0_bridge::maybe_dump_mir(&module);
|
||||
// Gate‑C(Core) strict OOB fail‑fast: reset observe flag before run
|
||||
if crate::config::env::oob_strict_fail() { crate::runtime::observe::reset(); }
|
||||
self.execute_mir_module(&module);
|
||||
let rc = self.execute_mir_module_quiet_exit(&module);
|
||||
if crate::config::env::oob_strict_fail() && crate::runtime::observe::oob_seen() {
|
||||
eprintln!("[gate-c][oob-strict] Out-of-bounds observed → exit(1)");
|
||||
std::process::exit(1);
|
||||
}
|
||||
return true;
|
||||
std::process::exit(rc);
|
||||
}
|
||||
Ok(None) => {}
|
||||
Err(e) => {
|
||||
@ -119,14 +119,14 @@ impl NyashRunner {
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
// Default: Execute via MIR interpreter
|
||||
// Default: Execute via MIR interpreter (quiet) and exit with rc mirrored from return value
|
||||
if crate::config::env::oob_strict_fail() { crate::runtime::observe::reset(); }
|
||||
self.execute_mir_module(&module);
|
||||
let rc = self.execute_mir_module_quiet_exit(&module);
|
||||
if crate::config::env::oob_strict_fail() && crate::runtime::observe::oob_seen() {
|
||||
eprintln!("[gate-c][oob-strict] Out-of-bounds observed → exit(1)");
|
||||
std::process::exit(1);
|
||||
}
|
||||
true
|
||||
std::process::exit(rc);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("❌ JSON v0 bridge error: {}", e);
|
||||
|
||||
Reference in New Issue
Block a user