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:
@ -19,6 +19,7 @@ pub mod semantics;
|
||||
pub mod unified_registry;
|
||||
pub mod provider_lock;
|
||||
pub mod provider_verify;
|
||||
pub mod observe; // Lightweight observability flags (OOB etc.)
|
||||
// pub mod plugin_box; // legacy - 古いPluginBox
|
||||
// pub mod plugin_loader; // legacy - Host VTable使用
|
||||
pub mod extern_registry; // ExternCall (env.*) 登録・診断用レジストリ
|
||||
|
||||
22
src/runtime/observe.rs
Normal file
22
src/runtime/observe.rs
Normal file
@ -0,0 +1,22 @@
|
||||
//! Lightweight execution observability flags used by runner policies
|
||||
//! (e.g., Gate‑C(Core) OOB strict fail‑fast).
|
||||
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
static OOB_SEEN: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
/// Reset all transient observation flags before a run.
|
||||
pub fn reset() {
|
||||
OOB_SEEN.store(false, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// Mark that an out‑of‑bounds access was observed in the runtime.
|
||||
pub fn mark_oob() {
|
||||
OOB_SEEN.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// Returns true if an out‑of‑bounds access was observed during the run.
|
||||
pub fn oob_seen() -> bool {
|
||||
OOB_SEEN.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user