Gate‑C(Core) OOB strict fail‑fast; String VM handler normalization; JSON lint Stage‑B root fixes via scanner field boxing and BinOp operand slotify; docs + smokes update

This commit is contained in:
nyash-codex
2025-11-01 18:45:26 +09:00
parent c331296552
commit 47bd2d2ee2
15 changed files with 280 additions and 107 deletions

View File

@ -46,7 +46,13 @@ impl NyashRunner {
match crate::runner::json_v1_bridge::try_parse_v1_to_module(&json) {
Ok(Some(module)) => {
super::json_v0_bridge::maybe_dump_mir(&module);
// GateC(Core) strict OOB failfast: reset observe flag before run
if crate::config::env::oob_strict_fail() { crate::runtime::observe::reset(); }
self.execute_mir_module(&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;
}
Ok(None) => {}
@ -114,7 +120,12 @@ impl NyashRunner {
}
}
// Default: Execute via MIR interpreter
if crate::config::env::oob_strict_fail() { crate::runtime::observe::reset(); }
self.execute_mir_module(&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
}
Err(e) => {